Esempio n. 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;
        }
 public static MemberDefinitionError Create(ToDefinition toDefinition, string reasonFormat, params object[] reasonArgs)
 {
     var reason = string.Format(reasonFormat, reasonArgs);
     return Create(toDefinition, reason);
 }
 public static MemberDefinitionError Create(ToDefinition toDefinition, string reason)
 {
     return new MemberDefinitionError(toDefinition.DeclaringType, toDefinition.MemberType, toDefinition.MemberName, reason);
 }