/// <summary>
            /// Constructs a new type information.
            /// </summary>
            /// <param name="parent">The parent type manager.</param>
            /// <param name="type">The .Net type.</param>
            /// <param name="fields">All managed fields.</param>
            /// <param name="fieldTypes">All managed field types.</param>
            /// <param name="fieldIndices">Maps fields to their indices.</param>
            /// <param name="isBlittable">True, if this type is blittable.</param>
            internal TypeInformation(
                TypeInformationManager parent,
                Type type,
                ImmutableArray <FieldInfo> fields,
                ImmutableArray <Type> fieldTypes,
                ImmutableDictionary <FieldInfo, int> fieldIndices,
                bool isBlittable)
            {
                Debug.Assert(parent != null, "Invalid parent");
                Debug.Assert(type != null, "Invalid type");

                Parent       = parent;
                ManagedType  = type;
                Fields       = fields;
                FieldTypes   = fieldTypes;
                FieldIndices = fieldIndices;
                IsBlittable  = isBlittable;
            }
Exemple #2
0
            /// <summary>
            /// Constructs a new type information.
            /// </summary>
            /// <param name="parent">The parent type manager.</param>
            /// <param name="type">The .Net type.</param>
            /// <param name="fields">All managed fields.</param>
            /// <param name="fieldOffsets">All field offsets.</param>
            /// <param name="fieldTypes">All managed field types.</param>
            /// <param name="numFlattenedFiels">The number of flattened fields.</param>
            /// <param name="isBlittable">True, if this type is blittable.</param>
            internal TypeInformation(
                TypeInformationManager parent,
                Type type,
                ImmutableArray <FieldInfo> fields,
                ImmutableArray <int> fieldOffsets,
                ImmutableArray <Type> fieldTypes,
                int numFlattenedFiels,
                bool isBlittable)
            {
                Debug.Assert(parent != null, "Invalid parent");
                Debug.Assert(type != null, "Invalid type");

                Parent              = parent;
                ManagedType         = type;
                Fields              = fields;
                FieldOffsets        = fieldOffsets;
                FieldTypes          = fieldTypes;
                IsBlittable         = isBlittable;
                NumFlattendedFields = numFlattenedFiels;
            }