Ejemplo n.º 1
0
        public CliFullTypeDictionary(IControlledCollection <ICliMetadataTypeDefinitionTableRow> typeDefinitions, __ICliTypeParent parent)
        {
            if (typeDefinitions is IArrayReadOnlyCollection <ICliMetadataTypeDefinitionTableRow> )
            {
                var arrayTypeDefinitions = (IArrayReadOnlyCollection <ICliMetadataTypeDefinitionTableRow>)typeDefinitions;
                if (arrayTypeDefinitions.IsAggregate)
                {
                    this.typeDefinitions = arrayTypeDefinitions.AggregateArrays.ConcatinateSeries();
                }
                else
                {
                    this.typeDefinitions = arrayTypeDefinitions.InternalArray;
                }
            }
            else if (typeDefinitions != null)
            {
                this.typeDefinitions = typeDefinitions.ToArray();
            }
            else
            {
                this.typeDefinitions = new ICliMetadataTypeDefinitionTableRow[0];
            }
            int len = this.typeDefinitions.Length;

            this.resultTypes = new IType[len];
            this.resultKinds = new TypeKind[len];
            this.resultKeys  = new IGeneralTypeUniqueIdentifier[len];
            this.parent      = parent;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new <see cref="CliTypeDictionary{TIdentifier, TType}"/>
        /// with the <paramref name="parent"/>, <paramref name="master"/> and <paramref name="filterKind"/>
        /// provided.
        /// </summary>
        /// <param name="parent">The <see cref="__ICliTypeParent"/> which contains the types.</param>
        /// <param name="master">The <see cref="CliFullTypeDictionary"/>
        /// which contains the full set of types to filter out.</param>
        /// <param name="filterKind">The <see cref="TypeKind"/> which denotes the
        /// type of elements filtered by the <see cref="CliTypeDictionary{TIdentifier, TType}"/>.</param>
        public CliTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master, TypeKind filterKind)
        {
            this.master = master;

            /* *
             * Filter out the parent dictionary's types,
             * obtain the indices of the items from the parent dictionary,
             * as well as the identifiers that uniquely define each.
             * */
            var filteredSet = master.ObtainSubset <TIdentifier, TType>(filterKind).SplitSet();

            this.filteredIdentifiers = filteredSet.Item2;
            base.Initialize(filteredSet.Item1);
            this.parent     = parent;
            this.filterKind = filterKind;
        }
Ejemplo n.º 3
0
 public CliInterfaceTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master)
     : base(parent, master, TypeKind.Interface)
 {
 }
Ejemplo n.º 4
0
 public CliClassTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master)
     : base(parent, master, TypeKind.Class)
 {
 }
Ejemplo n.º 5
0
 public CliStructTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master)
     : base(parent, master, TypeKind.Struct)
 {
 }
Ejemplo n.º 6
0
 public CliDelegateTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master)
     : base(parent, master, TypeKind.Delegate)
 {
 }
Ejemplo n.º 7
0
 public CliEnumTypeDictionary(__ICliTypeParent parent, CliFullTypeDictionary master)
     : base(parent, master, TypeKind.Enumeration)
 {
 }