MakeGenericAccessError() публичный Метод

public MakeGenericAccessError ( MemberTracker info ) : ErrorInfo
info MemberTracker
Результат ErrorInfo
Пример #1
0
        public override ErrorInfo GetError(ActionBinder binder)
        {
            MethodInfo getter = ResolveGetter();

            if (getter == null)
            {
                return(binder.MakeMissingMemberErrorInfo(DeclaringType, Name));
            }

            if (getter.ContainsGenericParameters)
            {
                return(binder.MakeGenericAccessError(this));
            }

            throw new InvalidOperationException();
        }
Пример #2
0
        public override ErrorInfo GetBoundError(ActionBinder binder, DynamicMetaObject instance, Type instanceType)
        {
            MethodInfo getter = ResolveGetter(instanceType, binder.PrivateBinding);

            if (getter == null) {
                return binder.MakeMissingMemberErrorInfo(DeclaringType, Name);
            }

            if (getter.ContainsGenericParameters) {
                return binder.MakeGenericAccessError(this);
            }

            if (IsStatic) {
                return binder.MakeStaticPropertyInstanceAccessError(this, false, instance);
            }

            throw new InvalidOperationException();
        }
Пример #3
0
        internal override ErrorInfo GetBoundError(ActionBinder binder, Expression instance)
        {
            MethodInfo getter = ResolveGetter();

            if (getter == null)
            {
                return(binder.MakeMissingMemberErrorInfo(DeclaringType, Name));
            }

            if (getter.ContainsGenericParameters)
            {
                return(binder.MakeGenericAccessError(this));
            }

            if (instance == null)
            {
                return(binder.MakeInvalidParametersError(Name, 0));
            }

            throw new InvalidOperationException();
        }
Пример #4
0
        public override ErrorInfo GetBoundError(ActionBinder binder, DynamicMetaObject instance, Type instanceType)
        {
            MethodInfo getter = ResolveGetter(instanceType, binder.PrivateBinding);

            if (getter == null)
            {
                return(binder.MakeMissingMemberErrorInfo(DeclaringType, Name));
            }

            if (getter.ContainsGenericParameters)
            {
                return(binder.MakeGenericAccessError(this));
            }

            if (IsStatic)
            {
                return(binder.MakeStaticPropertyInstanceAccessError(this, false, instance));
            }

            throw new InvalidOperationException();
        }
Пример #5
0
        public override ErrorInfo GetError(ActionBinder binder) {
            MethodInfo getter = ResolveGetter(binder.PrivateBinding);

            if (getter == null) {
                return binder.MakeMissingMemberErrorInfo(DeclaringType, Name);
            }

            if (getter.ContainsGenericParameters) {
                return binder.MakeGenericAccessError(this);
            }

            throw new InvalidOperationException();
        }