Microsoft.CSharp.RuntimeBinder.Semantics.CType.AsAggregateType C# (CSharp) Méthode

AsAggregateType() public méthode

public AsAggregateType ( ) : AggregateType
Résultat AggregateType
        public AggregateType AsAggregateType() { return this as AggregateType; }
        public ErrorType AsErrorType() { return this as ErrorType; }

Usage Example

Exemple #1
0
        public virtual bool CheckTypeAccess(CType type, Symbol symWhere)
        {
            Debug.Assert(type != null);

            // Array, Ptr, Nub, etc don't matter.
            type = type.GetNakedType(true);

            if (!type.IsAggregateType())
            {
                Debug.Assert(type.IsVoidType() || type.IsErrorType() || type.IsTypeParameterType());
                return(true);
            }

            for (AggregateType ats = type.AsAggregateType(); ats != null; ats = ats.outerType)
            {
                if (ACCESSERROR.ACCESSERROR_NOERROR != CheckAccessCore(ats.GetOwningAggregate(), ats.outerType, symWhere, null))
                {
                    return(false);
                }
            }

            TypeArray typeArgs = type.AsAggregateType().GetTypeArgsAll();

            for (int i = 0; i < typeArgs.size; i++)
            {
                if (!CheckTypeAccess(typeArgs.Item(i), symWhere))
                {
                    return(false);
                }
            }

            return(true);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.CType::AsAggregateType