Example #1
0
 protected override void Map(ICompositeBuilder <IPropertyInterface, IPropertyState> builder)
 {
     builder.MapMethod(typeof(IPropertyInterface).GetProperty("Text").GetGetMethod(), GetType().GetMethod("GetTextImpl"));
     builder.MapMethod(typeof(IPropertyInterface).GetProperty("Text").GetSetMethod(), GetType().GetMethod("SetTextImpl"));
     builder.MapMethod(typeof(IPropertyInterface).GetProperty("SetOnly").GetSetMethod(), GetType().GetMethod("SetOnlyImpl"));
     builder.MapMethod(typeof(IPropertyInterface).GetProperty("GetOnly").GetGetMethod(), GetType().GetMethod("GetOnlyImpl"));
 }
Example #2
0
        protected override void Map(ICompositeBuilder <ISimpleInterface, INoState> builder)
        {
            builder.MapMethod(typeof(ISimpleInterface).GetMethod("Foo"), GetType().GetMethod("FooImpl"));

            if (!_incomplete)
            {
                builder.MapMethod(typeof(ISimpleInterface).GetMethod("Bar"), GetType().GetMethod("BarImpl"));
                builder.MapMethod(typeof(ISimpleInterface).GetMethod("Baz"), GetType().GetMethod("BazImpl"));
            }
        }
Example #3
0
 internal IMethodMapper <TInterface, TContext> Map(MethodInfo interfaceMethod, MethodInfo implementationMethod)
 {
     _compositeBuilder.MapMethod(interfaceMethod, implementationMethod);
     return(this);
 }
Example #4
0
 protected override void Map(ICompositeBuilder <IStatefulInterface, IState> builder)
 {
     builder.MapMethod(typeof(IStatefulInterface).GetMethod("SetText"), GetType().GetMethod("SetTextImpl"));
     builder.MapMethod(typeof(IStatefulInterface).GetMethod("GetText"), GetType().GetMethod("GetTextImpl"));
 }
Example #5
0
 internal IPropertyMapper <TInterface, TState> Bind(MethodInfo interfaceMethod, MethodInfo implementationMethod)
 {
     _builder.MapMethod(interfaceMethod, implementationMethod);
     return(this);
 }