This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FirstArgumentIsServiceSelector:DefaultTypedFactoryComponentSelector | |
{ | |
protected override Type GetComponentType(MethodInfo method, object[] arguments) | |
{ | |
return (Type)arguments.Single(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture] | |
public class Base | |
{ | |
protected int @base; | |
[SetUp] | |
public void BaseSetUp() | |
{ | |
@base = 4; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IFoo | |
{ | |
void Foo(); | |
} | |
public class Base:IFoo | |
{ | |
public void Foo() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using Castle.DynamicProxy; | |
namespace ConsoleApplication7 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in pseudo API not specific to any particular container | |
container.Register<FooBar>().AsService<IFoo,IBar>().Singleton; | |
var one = container.Resolve<IFoo>(); | |
var two = container.Resolve<IBar>(); | |
Assert.AreSame(one, two); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from http://forum.cyanogenmod.com/topic/5385-rom-cyanogenmod-6-for-desire-v600-08282010/ | |
1. Root your device and install Clockwork Recovery (Unrevoked method is recommended). | |
2. Do a Nandroid backup! | |
3. Update your radio! New radio from 2.2 roms is required, see downloads below. | |
4. WIPE | |
5. Install the ROM | |
5. Optionally install the Google Addon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\dev\rb\bin>gem install rails | |
Successfully installed rails-3.0.0 | |
1 gem installed | |
Installing ri documentation for rails-3.0.0... | |
File not found: lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult TryAuth(string openid_identifier) | |
{ | |
var openid = new OpenIdRelyingParty(); | |
var response = openid.GetResponse(); | |
if(response== null) | |
{ | |
var req = openid.CreateRequest(openid_identifier); | |
req.AddExtension(new ClaimsRequest | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class NHibernateProxyGenerationHook:IProxyGenerationHook | |
{ | |
public bool ShouldInterceptMethod(Type type, MethodInfo methodInfo) | |
{ | |
// unless for some reason you don't want to intercept everything you can | |
return true; | |
} | |
public void NonProxyableMemberNotification(Type type, MemberInfo memberInfo) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\dev\ir\bin>nu install dotless | |
unknown:0: warning: already initialized constant OPT_TABLE | |
unknown:0: warning: already initialized constant S_IF_DOOR | |
unknown:0: warning: already initialized constant METHODS | |
D:/dev/ir/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:157:in `parse': Illformed requirement [nil] (ArgumentError) | |
from D:/dev/ir/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:73:in `initialize' | |
from IronRuby.Libraries:0:in `<Map>b__3' | |
from IronRuby.Libraries:0:in `each' | |
from IronRuby.Libraries:0:in `Each' | |
from D:/dev/ir/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:72:in `map' |