System\Data\Common\DbXmlEnabledProviderManifest.cs (17)
26private System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> _primitiveTypes;
27private Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>> _facetDescriptions = new Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>>();
30private Dictionary<string, PrimitiveType> _storeTypeNameToEdmPrimitiveType = new Dictionary<string, PrimitiveType>();
31private Dictionary<string, PrimitiveType> _storeTypeNameToStorePrimitiveType = new Dictionary<string, PrimitiveType>();
54protected Dictionary<string, PrimitiveType> StoreTypeNameToEdmPrimitiveType
62protected Dictionary<string, PrimitiveType> StoreTypeNameToStorePrimitiveType
79Debug.Assert(type is PrimitiveType, "DbXmlEnabledProviderManifest.GetFacetDescriptions(): Argument is not a PrimitiveType");
80return GetReadOnlyCollection(type as PrimitiveType, _facetDescriptions, Helper.EmptyFacetDescriptionEnumerable);
83public override System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> GetStoreTypes()
110List<PrimitiveType> listOfPrimitiveTypes = new List<PrimitiveType>();
116PrimitiveType type = typeElement.PrimitiveType;
148private static System.Collections.ObjectModel.ReadOnlyCollection<T> GetReadOnlyCollection<T>(PrimitiveType type, Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<T>> typeDictionary, System.Collections.ObjectModel.ReadOnlyCollection<T> useIfEmpty)
System\Data\Metadata\Edm\Provider\EdmProviderManifest.cs (42)
28private Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>> _facetDescriptions;
29private System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> _primitiveTypes;
32private System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[] _promotionTypes;
90Debug.Assert(type is PrimitiveType, "EdmProviderManifest.GetFacetDescriptions(): Argument is not a PrimitiveType");
96if (_facetDescriptions.TryGetValue(type as PrimitiveType, out collection))
108public PrimitiveType GetPrimitiveType(PrimitiveTypeKind primitiveTypeKind)
124PrimitiveType[] primitiveTypes = new PrimitiveType[EdmConstants.NumPrimitiveTypes];
190foreach (PrimitiveType primitiveType in primitiveTypes)
196System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> readOnlyTypes = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(primitiveTypes);
199Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>>(ref _primitiveTypes, readOnlyTypes, null);
209private void InitializePrimitiveType(PrimitiveType primitiveType,
220PrimitiveType.Initialize(primitiveType,
241Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>> facetDescriptions = new Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>>();
245PrimitiveType applicableType = _primitiveTypes[(int)PrimitiveTypeKind.String];
340Interlocked.CompareExchange<Dictionary<PrimitiveType, System.Collections.ObjectModel.ReadOnlyCollection<FacetDescription>>>(ref _facetDescriptions,
735internal System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> GetPromotionTypes(PrimitiveType primitiveType)
752System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[] promotionTypes = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[EdmConstants.NumPrimitiveTypes];
756promotionTypes[i] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] { _primitiveTypes[i] });
762promotionTypes[(int)PrimitiveTypeKind.Byte] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
775promotionTypes[(int)PrimitiveTypeKind.Int16] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
787promotionTypes[(int)PrimitiveTypeKind.Int32] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
798promotionTypes[(int)PrimitiveTypeKind.Int64] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
808promotionTypes[(int)PrimitiveTypeKind.Single] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
829Interlocked.CompareExchange<System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[]>(ref _promotionTypes,
834private void InitializeSpatialPromotionGroup(System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>[] promotionTypes, PrimitiveTypeKind[] promotableKinds, PrimitiveTypeKind baseKind)
838promotionTypes[(int)promotableKind] = new System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType>(new PrimitiveType[] {
864PrimitiveType primitiveType = _primitiveTypes[primitiveTypeIndex];
879public override System.Collections.ObjectModel.ReadOnlyCollection<PrimitiveType> GetStoreTypes()
897PrimitiveType primitiveType = type.EdmType as PrimitiveType;
System\Data\Metadata\Edm\TypeUsage.cs (19)
119public static TypeUsage CreateStringTypeUsage(PrimitiveType primitiveType,
124EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
148public static TypeUsage CreateStringTypeUsage(PrimitiveType primitiveType,
152EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
173public static TypeUsage CreateBinaryTypeUsage(PrimitiveType primitiveType,
177EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
199public static TypeUsage CreateBinaryTypeUsage(PrimitiveType primitiveType, bool isFixedLength)
201EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
220public static TypeUsage CreateDateTimeTypeUsage(PrimitiveType primitiveType,
223EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
241public static TypeUsage CreateDateTimeOffsetTypeUsage(PrimitiveType primitiveType,
244EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
263public static TypeUsage CreateTimeTypeUsage(PrimitiveType primitiveType,
266EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
287public static TypeUsage CreateDecimalTypeUsage(PrimitiveType primitiveType,
291EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
309public static TypeUsage CreateDecimalTypeUsage(PrimitiveType primitiveType)
311EntityUtil.CheckArgumentNull<PrimitiveType>(primitiveType, "primitiveType");
437result = ((PrimitiveType)edmType).ProviderManifest.GetEdmType(this);
System\Data\Metadata\TypeSemantics.cs (30)
37static private objectModel.ReadOnlyCollection<PrimitiveType>[,] _commonTypeClosure;
579return IsPrimitiveType(type) && Helper.IsStrongSpatialTypeKind(((PrimitiveType)type.EdmType).PrimitiveTypeKind);
731if (!IsSubTypeOf((PrimitiveType)fromType.EdmType, (PrimitiveType)toType.EdmType))
739private static bool IsSubTypeOf(PrimitiveType subPrimitiveType, PrimitiveType superPrimitiveType)
751objectModel.ReadOnlyCollection<PrimitiveType> superTypes = EdmProviderManifest.Instance.GetPromotionTypes(subPrimitiveType);
786if (!IsSubTypeOf((PrimitiveType)fromType.EdmType, (PrimitiveType)toType.EdmType))
809return TryGetCommonType((PrimitiveType)edmType1,
810(PrimitiveType)edmType2,
869objectModel.ReadOnlyCollection<PrimitiveType> superTypes = GetPrimitiveCommonSuperTypes((PrimitiveType)type1.EdmType,
870(PrimitiveType)type2.EdmType);
880private static bool TryGetCommonType(PrimitiveType primitiveType1, PrimitiveType primitiveType2, out EdmType commonType)
896objectModel.ReadOnlyCollection<PrimitiveType> superTypes = GetPrimitiveCommonSuperTypes(primitiveType1, primitiveType2);
1114objectModel.ReadOnlyCollection<PrimitiveType>[,] commonTypeClosure = new objectModel.ReadOnlyCollection<PrimitiveType>[EdmConstants.NumPrimitiveTypes, EdmConstants.NumPrimitiveTypes];
1120objectModel.ReadOnlyCollection<PrimitiveType> primitiveTypes = EdmProviderManifest.Instance.GetStoreTypes();
1149System.Threading.Interlocked.CompareExchange<objectModel.ReadOnlyCollection<PrimitiveType>[,]>(ref _commonTypeClosure, commonTypeClosure, null);
1158private static objectModel.ReadOnlyCollection<PrimitiveType> Intersect(IList<PrimitiveType> types1, IList<PrimitiveType> types2)
1160List<PrimitiveType> commonTypes = new List<PrimitiveType>();
1174return new objectModel.ReadOnlyCollection<PrimitiveType>(commonTypes);
1183private static objectModel.ReadOnlyCollection<PrimitiveType> GetPrimitiveCommonSuperTypes(PrimitiveType primitiveType1, PrimitiveType primitiveType2)