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")); }
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")); } }
internal IMethodMapper <TInterface, TContext> Map(MethodInfo interfaceMethod, MethodInfo implementationMethod) { _compositeBuilder.MapMethod(interfaceMethod, implementationMethod); return(this); }
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")); }
internal IPropertyMapper <TInterface, TState> Bind(MethodInfo interfaceMethod, MethodInfo implementationMethod) { _builder.MapMethod(interfaceMethod, implementationMethod); return(this); }