Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol.GetIfacesAll C# (CSharp) Méthode

GetIfacesAll() public méthode

public GetIfacesAll ( ) : TypeArray
Résultat TypeArray
        public TypeArray GetIfacesAll()
        {
            return _ifacesAll;
        }

Usage Example

        public static bool IsBaseAggregate(AggregateSymbol derived, AggregateSymbol @base)
        {
            Debug.Assert(!derived.IsEnum() && [email protected]());

            if (derived == @base)
            {
                return(true);      // identity.
            }
            // refactoring error tolerance:  structs and delegates can be base classes in error scenarios so
            // we cannot filter on whether or not the base is marked as sealed.

            if (@base.IsInterface())
            {
                // Search the direct and indirect interfaces via ifacesAll, going up the base chain...

                while (derived != null)
                {
                    foreach (AggregateType iface in derived.GetIfacesAll().Items)
                    {
                        if (iface.getAggregate() == @base)
                        {
                            return(true);
                        }
                    }
                    derived = derived.GetBaseAgg();
                }

                return(false);
            }

            // base is a class. Just go up the base class chain to look for it.

            while (derived.GetBaseClass() != null)
            {
                derived = derived.GetBaseClass().getAggregate();
                if (derived == @base)
                {
                    return(true);
                }
            }
            return(false);
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.AggregateSymbol::GetIfacesAll