Пример #1
0
        public Binding(MemberInfo toMemberInfo, BindingType bindingType, Mapper mapper,
            FromDefinition fromDefinition = null)
        {
            Require.NotNull(toMemberInfo, "toMemberInfo");

            BindingType = bindingType;
            Mapper = mapper;
            ToDefinition = new ToDefinition(toMemberInfo);
            FromDefinition = fromDefinition ?? FromUndefinedDefinition.Default;
        }
Пример #2
0
 public static MemberDefinitionError Create(ToDefinition toDefinition, string reasonFormat, params object[] reasonArgs)
 {
     var reason = string.Format(reasonFormat, reasonArgs);
     return Create(toDefinition, reason);
 }
Пример #3
0
 public static MemberDefinitionError Create(ToDefinition toDefinition, string reason)
 {
     return new MemberDefinitionError(toDefinition.DeclaringType, toDefinition.MemberType, toDefinition.MemberName, reason);
 }