Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IndexerType"/> class.
 /// This constructor is required for deserialization.
 /// </summary>
 public IndexerType()
 {
     FeatureTable.Seal();
     DiscreteTable.Seal();
     ConformanceTable.Seal();
     ExportTable.Seal();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FunctionType"/> class.
 /// This constructor is required for deserialization.
 /// </summary>
 public FunctionType()
 {
     FeatureTable.Seal();
     DiscreteTable.Seal();
     ConformanceTable.Seal();
     ExportTable.Seal();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProcedureType"/> class.
 /// This constructor is required for deserialization.
 /// </summary>
 public ProcedureType()
 {
     FeatureTable.Seal();
     DiscreteTable.Seal();
     ConformanceTable.Seal();
     ExportTable.Seal();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TupleType"/> class.
        /// </summary>
        /// <param name="entityDeclarationList">The resolved list of fields.</param>
        /// <param name="sharing">The type sharing.</param>
        /// <param name="renamedFieldTable">The list of fields to rename.</param>
        public TupleType(IList <IEntityDeclaration> entityDeclarationList, BaseNode.SharingType sharing, ISealableDictionary <IFeatureName, IFeatureInstance> renamedFieldTable)
        {
            EntityDeclarationList = entityDeclarationList;
            Sharing = sharing;

            FeatureTable.Merge(renamedFieldTable);
            FeatureTable.Seal();
            DiscreteTable.Seal();
            ConformanceTable.Seal();
            ExportTable.Seal();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ClassType"/> class.
        /// </summary>
        /// <param name="baseClass">The class used to instanciate this type.</param>
        /// <param name="typeArgumentTable">Arguments if the class is generic.</param>
        /// <param name="instancingClassType">The class type if this instance is a derivation (such as renaming).</param>
        /// <param name="conformanceTable">The initialized conformance table.</param>
        private ClassType(IClass baseClass, ISealableDictionary <string, ICompiledType> typeArgumentTable, ICompiledTypeWithFeature instancingClassType, ISealableDictionary <ITypeName, ICompiledType> conformanceTable)
        {
            BaseClass         = baseClass;
            TypeArgumentTable = typeArgumentTable;

            if (BaseClass.ResolvedClassType.IsAssigned)
            {
                if (conformanceTable.IsSealed)
                {
                    ConformanceTable.Merge(conformanceTable);
                    ConformanceTable.Seal();
                }
                else
                {
                    TypeInstancingRecord NewRecord = new TypeInstancingRecord();
                    NewRecord.InstancingClassType = instancingClassType;
                    NewRecord.ResolvedTypeName    = BaseClass.ResolvedClassTypeName.Item;
                    NewRecord.ResolvedType        = this;
                    BaseClass.ResolvedClassType.Item.InstancingRecordList.Add(NewRecord);
                }
            }

            NumberKind = GetDefaultNumberKind();
        }