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

AsTypeParameterType() public méthode

public AsTypeParameterType ( ) : Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType
Résultat Microsoft.CSharp.RuntimeBinder.Semantics.TypeParameterType
        public TypeParameterType AsTypeParameterType() { return this as TypeParameterType; }

Usage Example

Exemple #1
0
        public bool DependsOn(TypeParameterType pType)
        {
            Debug.Assert(pType != null);

            // * If a type parameter T is used as a constraint for type parameter S
            //   then S depends on T.
            // * If a type parameter S depends on a type parameter T and T depends on
            //   U then S depends on U.

            TypeArray pConstraints = GetBounds();

            for (int iConstraint = 0; iConstraint < pConstraints.Count; ++iConstraint)
            {
                CType pConstraint = pConstraints[iConstraint];
                if (pConstraint == pType)
                {
                    return(true);
                }
                if (pConstraint.IsTypeParameterType() &&
                    pConstraint.AsTypeParameterType().DependsOn(pType))
                {
                    return(true);
                }
            }
            return(false);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.CType::AsTypeParameterType