Skip to content

Instantly share code, notes, and snippets.

View kkozmic's full-sized avatar
🎯
Focusing

Krzysztof Kozmic kkozmic

🎯
Focusing
View GitHub Profile
public class FirstArgumentIsServiceSelector:DefaultTypedFactoryComponentSelector
{
protected override Type GetComponentType(MethodInfo method, object[] arguments)
{
return (Type)arguments.Single();
}
}
[TestFixture]
public class Base
{
protected int @base;
[SetUp]
public void BaseSetUp()
{
@base = 4;
}
public interface IFoo
{
void Foo();
}
public class Base:IFoo
{
public void Foo()
{
}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using Castle.DynamicProxy;
namespace ConsoleApplication7
{
// 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);
// 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
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
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
{
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)
{
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'