private static void ComputeCommonTypeClosure() { if (TypeSemantics._commonTypeClosure != null) { return; } ReadOnlyCollection <PrimitiveType>[,] readOnlyCollectionArray = new ReadOnlyCollection <PrimitiveType> [31, 31]; for (int index = 0; index < 31; ++index) { readOnlyCollectionArray[index, index] = Helper.EmptyPrimitiveTypeReadOnlyCollection; } ReadOnlyCollection <PrimitiveType> storeTypes = EdmProviderManifest.Instance.GetStoreTypes(); for (int index1 = 0; index1 < 31; ++index1) { for (int index2 = 0; index2 < index1; ++index2) { readOnlyCollectionArray[index1, index2] = TypeSemantics.Intersect((IList <PrimitiveType>)EdmProviderManifest.Instance.GetPromotionTypes(storeTypes[index1]), (IList <PrimitiveType>)EdmProviderManifest.Instance.GetPromotionTypes(storeTypes[index2])); readOnlyCollectionArray[index2, index1] = readOnlyCollectionArray[index1, index2]; } } Interlocked.CompareExchange <ReadOnlyCollection <PrimitiveType> [, ]>(ref TypeSemantics._commonTypeClosure, readOnlyCollectionArray, (ReadOnlyCollection <PrimitiveType> [, ])null); }