Ejemplo n.º 1
0
        // See notes on IsReadVisibleTo
        internal bool IsWriteVisibleTo(Assembly accessingAssembly, Type accessingType)
        {
            if (IsWritePublicIgnoringType)
            {
                return(true);
            }
            MethodInfo setter = Setter;

            if (setter != null)
            {
                return(MemberReflector.GenericArgumentsAreVisibleTo(setter, accessingAssembly, SchemaContext) &&
                       (MemberReflector.IsInternalVisibleTo(setter, accessingAssembly, SchemaContext) ||
                        MemberReflector.IsProtectedVisibleTo(setter, accessingType, SchemaContext)));
            }
            return(false);
        }
 internal bool IsWriteVisibleTo(Assembly accessingAssembly, System.Type accessingType)
 {
     if (!this.IsWritePublicIgnoringType)
     {
         MethodInfo setter = this.Setter;
         if (setter == null)
         {
             return(false);
         }
         if (!MemberReflector.GenericArgumentsAreVisibleTo(setter, accessingAssembly, this.SchemaContext))
         {
             return(false);
         }
         if (!MemberReflector.IsInternalVisibleTo(setter, accessingAssembly, this.SchemaContext))
         {
             return(MemberReflector.IsProtectedVisibleTo(setter, accessingType, this.SchemaContext));
         }
     }
     return(true);
 }