System\Data\Common\CommandTrees\Internal\Validator.cs (14)
21private readonly DataSpace requiredSpace;
22private readonly DataSpace[] allowedMetadataSpaces;
23private readonly DataSpace[] allowedFunctionSpaces;
29internal DbExpressionValidator(MetadataWorkspace metadata, DataSpace expectedDataSpace)
33this.allowedFunctionSpaces = new[] { DataSpace.CSpace, DataSpace.SSpace };
34if (expectedDataSpace == DataSpace.SSpace)
36this.allowedMetadataSpaces = new[] { DataSpace.SSpace, DataSpace.CSpace };
40this.allowedMetadataSpaces = new[] { DataSpace.CSpace };
141private TMetadata ValidateMetadata<TMetadata>(TMetadata metadata, Func<TMetadata, TMetadata> map, Func<TMetadata, DataSpace> getDataSpace, DataSpace[] allowedSpaces)
149DataSpace resultSpace = getDataSpace(result);
164ThrowInvalid(Strings.Cqt_Validator_InvalidIncorrectDataSpaceMetadata(typeof(TMetadata).Name, Enum.GetName(typeof(DataSpace), this.requiredSpace)));
System\Data\Mapping\DefaultObjectMappingItemCollection.cs (17)
36ObjectItemCollection objectCollection) : base(DataSpace.OCSpace)
61internal override Map GetMap(string identity, DataSpace typeSpace, bool ignoreCase)
79internal override bool TryGetMap(string identity, DataSpace typeSpace, bool ignoreCase, out Map map)
83if (typeSpace == DataSpace.CSpace)
111else if (typeSpace == DataSpace.OSpace)
159internal override Map GetMap(string identity, DataSpace typeSpace)
171internal override bool TryGetMap(string identity, DataSpace typeSpace, out Map map)
205DataSpace typeSpace = item.DataSpace;
240private Map GetOCMapForTransientType(EdmType edmType, DataSpace typeSpace)
242Debug.Assert(typeSpace == DataSpace.CSpace || typeSpace == DataSpace.OSpace || Helper.IsRowType(edmType) || Helper.IsCollectionType(edmType));
246if (typeSpace != DataSpace.OSpace)
258else if (typeSpace == DataSpace.OSpace)
416objectMap.DataSpace = DataSpace.OCSpace;
505Debug.Assert(edmMember.DeclaringType.DataSpace == DataSpace.CSpace, "the cspace member is not on a cspace type");
506Debug.Assert(objectMember.DeclaringType.DataSpace == DataSpace.OSpace, "the ospace member is not on a cspace type");
834Debug.Assert(cspaceItem.DataSpace == DataSpace.CSpace, "ContainsMap: It must be a CSpace item");
System\Data\Mapping\StorageMappingItemCollection.ViewDictionary.cs (8)
83EntityContainer counterpartContainer = container.DataSpace == DataSpace.CSpace ?
347return GeneratedView.CreateGeneratedViewForFKAssociationSet(aSet, aSet.ElementType, new DbQueryCommandTree(workspace, DataSpace.SSpace, qView), storageMappingItemCollection, m_config);
357(extent.EntityContainer.DataSpace==DataSpace.SSpace)?"Table":"EntitySet",extent.Name));
411workspace.GetItemCollection(DataSpace.CSSpace).GetItems<StorageEntityContainerMapping>(), out storageEntityContainerMapping))
470var mappingCollection = (workspace.GetItemCollection(DataSpace.CSSpace) as StorageMappingItemCollection);
501if (!workspace.TryGetItem<EntityContainer>(entityContainerName, DataSpace.CSpace, out entityContainer))
503workspace.TryGetItem<EntityContainer>(entityContainerName, DataSpace.SSpace, out entityContainer);
543if (!workspace.TryGetItemCollection(DataSpace.OSpace, out itemCollection))
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (3)
65DbDeleteCommandTree commandTree = new DbDeleteCommandTree(m_translator.MetadataWorkspace, DataSpace.SSpace, target, predicate);
128new DbUpdateCommandTree(m_translator.MetadataWorkspace, DataSpace.SSpace, target, predicate, setClauses.AsReadOnly(), returning);
160new DbInsertCommandTree(m_translator.MetadataWorkspace, DataSpace.SSpace, target, setClauses.AsReadOnly(), returning);
System\Data\Metadata\ClrPerspective.cs (7)
30: base(metadataWorkspace, DataSpace.CSpace)
67if (this.MetadataWorkspace.TryGetMap(type, DataSpace.OCSpace, out map))
98if (this.MetadataWorkspace.TryGetMap(fullName, DataSpace.OSpace, ignoreCase, DataSpace.OCSpace, out map))
104PrimitiveType primitiveType = this.MetadataWorkspace.GetMappedPrimitiveType(((PrimitiveType)map.EdmItem).PrimitiveTypeKind, DataSpace.CSpace);
112Debug.Assert(((GlobalItem)map.EdmItem).DataSpace == DataSpace.CSpace);
134if (!MetadataWorkspace.TryGetEntityContainer(defaultContainerName, DataSpace.CSpace, out container))
System\Data\Metadata\MetadataWorkspace.cs (71)
86DataSpace dataSpace = DataSpace.CSpace;
95dataSpace = DataSpace.SSpace;
104dataSpace = DataSpace.CSSpace;
148/// Create an <see cref="eSQL.EntitySqlParser"/> configured to use the <see cref="DataSpace.CSpace"/> data space.
165return new DbQueryCommandTree(this, DataSpace.CSpace, query);
177public ItemCollection GetItemCollection(DataSpace dataSpace)
203case DataSpace.CSpace:
223case DataSpace.SSpace:
230case DataSpace.OSpace:
235case DataSpace.CSSpace:
242Debug.Assert(collection.DataSpace == DataSpace.OCSpace, "Invalid DataSpace Enum value: " + collection.DataSpace);
260if (collection.DataSpace == DataSpace.CSpace)
268if (collection.DataSpace == DataSpace.SSpace)
276if (collection.DataSpace == DataSpace.CSSpace)
300case DataSpace.CSpace:
304case DataSpace.SSpace:
308case DataSpace.CSSpace:
363ObjectItemCollection collection = (ObjectItemCollection)GetItemCollection(DataSpace.OSpace);
370if (!TryGetItemCollection(DataSpace.CSpace, out itemCollection))
402if (TryGetItemCollection(DataSpace.OSpace, out collection))
406TryGetItemCollection(DataSpace.CSpace, out edmItemCollection);
450if (!TryGetMap(type, DataSpace.OCSpace, out map))
455ObjectItemCollection ospaceCollection = GetItemCollection(DataSpace.OSpace) as ObjectItemCollection;
477public T GetItem<T>(string identity, DataSpace dataSpace) where T:GlobalItem
492public bool TryGetItem<T>(string identity, DataSpace space, out T item ) where T:GlobalItem
513public T GetItem<T>(string identity, bool ignoreCase, DataSpace dataSpace) where T : GlobalItem
529public bool TryGetItem<T>(string identity, bool ignoreCase, DataSpace dataSpace, out T item) where T : GlobalItem
546public ReadOnlyCollection<T> GetItems<T>(DataSpace dataSpace) where T : GlobalItem
564public EdmType GetType(string name, string namespaceName, DataSpace dataSpace)
579public bool TryGetType(string name, string namespaceName, DataSpace dataSpace, out EdmType type)
601public EdmType GetType(string name, string namespaceName, bool ignoreCase, DataSpace dataSpace)
618DataSpace dataSpace, out EdmType type)
637public EntityContainer GetEntityContainer(string name, DataSpace dataSpace)
650public bool TryGetEntityContainer(string name, DataSpace dataSpace, out EntityContainer entityContainer)
671public EntityContainer GetEntityContainer(string name, bool ignoreCase, DataSpace dataSpace)
686DataSpace dataSpace, out EntityContainer entityContainer)
709public ReadOnlyCollection<EdmFunction> GetFunctions(string name, string namespaceName, DataSpace dataSpace)
731DataSpace dataSpace,
758DataSpace dataSpace,
778public ReadOnlyCollection<PrimitiveType> GetPrimitiveTypes(DataSpace dataSpace)
792public ReadOnlyCollection<GlobalItem> GetItems(DataSpace dataSpace)
807internal PrimitiveType GetMappedPrimitiveType(PrimitiveTypeKind primitiveTypeKind, DataSpace dataSpace)
822internal bool TryGetMap(string typeIdentity, DataSpace typeSpace, bool ignoreCase, DataSpace mappingSpace, out Map map)
836internal Map GetMap(string identity, DataSpace typeSpace, DataSpace dataSpace)
848internal Map GetMap(GlobalItem item, DataSpace dataSpace)
861internal bool TryGetMap(GlobalItem item, DataSpace dataSpace, out Map map)
888public bool TryGetItemCollection(DataSpace dataSpace, out ItemCollection collection)
901internal ItemCollection GetItemCollection(DataSpace dataSpace, bool required)
906case DataSpace.CSpace:
909case DataSpace.OSpace:
912case DataSpace.OCSpace:
915case DataSpace.CSSpace:
918case DataSpace.SSpace:
1033if (edmSpaceType.DataSpace != DataSpace.CSpace)
1041if (this.TryGetMap(edmSpaceType, DataSpace.OCSpace, out map))
1149if (objectSpaceType.DataSpace != DataSpace.OSpace)
1157if (this.TryGetMap(objectSpaceType, DataSpace.OCSpace, out map))
1186ItemCollection collection = GetItemCollection(DataSpace.CSSpace, true);
1197ItemCollection collection = GetItemCollection(DataSpace.CSSpace, true);
1210ItemCollection collection = GetItemCollection(DataSpace.CSpace, true);
1223ReadOnlyCollection<StorageEntityContainerMapping> entityContainerMaps = this.GetItems<StorageEntityContainerMapping>(DataSpace.CSSpace);
1266ItemCollection collection = GetItemCollection(DataSpace.OSpace, true);
1272ItemCollection collection = GetItemCollection(DataSpace.OCSpace, true);
1295internal bool IsItemCollectionAlreadyRegistered(DataSpace dataSpace)
1310Debug.Assert(this.IsItemCollectionAlreadyRegistered(DataSpace.CSSpace) &&
1311other.IsItemCollectionAlreadyRegistered(DataSpace.CSSpace),
1437if (entitySet.EntityContainer.DataSpace != DataSpace.CSpace)
1464var mappingCollection = (StorageMappingItemCollection)GetItemCollection(DataSpace.CSSpace, true);