93 references to SessionData
System.Data.Entity (93)
System\Data\Metadata\ObjectLayer\ObjectItemAssemblyLoader.cs (3)
50
LoadAssemblies(CacheEntry.ClosureAssemblies,
SessionData
);
143
Debug.Assert(!_sessionData.KnownAssemblies.Contains(_assembly,
SessionData
.ObjectItemAssemblyLoaderFactory, _sessionData.EdmItemCollection), "This assembly must not be present in the list of known assemblies");
144
_sessionData.KnownAssemblies.Add(_assembly, new KnownAssemblyEntry(CacheEntry,
SessionData
.EdmItemCollection != null));
System\Data\Metadata\ObjectLayer\ObjectItemAttributeAssemblyLoader.cs (37)
70
Debug.Assert(!
SessionData
.KnownAssemblies.Contains(SourceAssembly,
SessionData
.ObjectItemAssemblyLoaderFactory,
SessionData
.EdmItemCollection), "InternalLoadAssemblyFromCache: This assembly must not be present in the list of known assemblies");
77
SessionData
.AssembliesLoaded.Add(SourceAssembly, CacheEntry);
88
if (
SessionData
.TypesInLoading.TryGetValue(clrType.FullName, out edmType) ||
94
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NewTypeConflictsWithExistingType(
139
Debug.Assert(!
SessionData
.TypesInLoading.ContainsKey(clrType.FullName), "This should be called only after looking in typesInLoading");
140
Debug.Assert(
SessionData
.EdmItemErrors.Count > 0 || // had an error during loading
146
if (
SessionData
.LockedAssemblyCache.TryGetValue(clrType.Assembly, out immutableCacheEntry))
148
Debug.Assert(
SessionData
.KnownAssemblies.Contains(clrType.Assembly,
SessionData
.LoaderCookie,
SessionData
.EdmItemCollection), "We should only be loading things directly from the cache if they are already in the collection");
182
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.GenericTypeNotSupported(type.FullName), null));
192
SessionData
.RegisterForLevel1PostSessionProcessing(this);
197
SessionData
.RegisterForLevel2PostSessionProcessing(this);
222
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.SameRoleNameOnRelationshipAttribute(roleAttribute.RelationshipName, roleAttribute.Role2Name),
231
SessionData
.TypesInLoading.Add(associationType.FullName, associationType);
261
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.RoleTypeInEdmRelationshipAttributeIsInvalidType(associationType.Name, roleName, clrType),
277
Debug.Assert(!
SessionData
.TypesInLoading.ContainsKey(clrType.FullName), "Trying to load a type that is already loaded???");
290
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NestedClassNotSupported(clrType.FullName, clrType.Assembly.FullName), null));
297
SessionData
.EdmItemErrors.Add(new EdmItemError(Strings.Validator_TypeHasNoNamespace, edmType));
321
SessionData
.EdmItemErrors.Add(
343
SessionData
.TypesInLoading.Add(clrType.FullName, edmType);
382
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullRelationshipNameforEdmRelationshipAttribute(SourceAssembly.FullName), null));
390
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullParameterForEdmRelationshipAttribute(
397
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullParameterForEdmRelationshipAttribute(
404
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullParameterForEdmRelationshipAttribute(
411
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullParameterForEdmRelationshipAttribute(
418
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NullParameterForEdmRelationshipAttribute(
540
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.Validator_OSpace_InvalidNavPropReturnType(propertyInfo.Name, propertyInfo.DeclaringType.FullName, propertyInfo.PropertyType.FullName), null));
552
if (
SessionData
.TypesInLoading.TryGetValue(attribute.RelationshipNamespaceName + "." + attribute.RelationshipName, out type) &&
575
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.TargetRoleNameInNavigationPropertyNotValid(
583
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.NavigationPropertyRelationshipEndTypeMismatch(
595
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.RelationshipNameInNavigationPropertyNotValid(
630
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.Validator_OSpace_ScalarPropertyNotPrimitive(property.Name, property.DeclaringType.FullName, property.PropertyType.FullName), null));
666
SessionData
.EdmItemErrors.Add(
703
SessionData
.EdmItemErrors.Add(new EdmItemError(System.Data.Entity.Strings.Validator_OSpace_ComplexPropertyNotComplex(clrProperty.Name, clrProperty.DeclaringType.FullName, clrProperty.PropertyType.FullName), null));
System\Data\Metadata\ObjectLayer\ObjectItemCachedAssemblyLoader.cs (2)
34
if (!
SessionData
.TypesInLoading.ContainsKey(type.Identity))
36
SessionData
.TypesInLoading.Add(type.Identity, type);
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (48)
32
SessionData
.RegisterForLevel1PostSessionProcessing(this);
44
SessionData
.LoadMessageLogger.LogLoadMessage(Strings.Validator_OSpace_Convention_Struct(cspaceType.FullName, type.FullName), cspaceType);
56
if (!
SessionData
.CspaceToOspace.ContainsKey(cspaceType))
58
SessionData
.CspaceToOspace.Add(cspaceType, ospaceType);
63
EdmType previousOSpaceType =
SessionData
.CspaceToOspace[cspaceType];
64
SessionData
.EdmItemErrors.Add(
71
if (
SessionData
.TypesInLoading.Count == 0)
76
SessionData
.ObjectItemAssemblyLoaderFactory = null;
83
SessionData
.AssembliesLoaded.Add(SourceAssembly, CacheEntry);
90
if (
SessionData
.ConventionCSpaceTypeNames.TryGetValue(type.Name, out pair))
101
SessionData
.EdmItemErrors.Add(new EdmItemError(Strings.Validator_OSpace_Convention_MultipleTypesWithSameName(type.Name), pair.Key));
127
SessionData
.LoadMessageLogger.LogLoadMessage(
182
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
194
SessionData
.TypesInLoading.Add(type.FullName, ospaceType);
233
SessionData
.TypesInLoading.Add(enumType.FullName, newOSpaceType);
257
SessionData
.LoadMessageLogger.LogLoadMessage(
265
SessionData
.LoadMessageLogger.LogLoadMessage(
313
SessionData
.LoadMessageLogger.LogLoadMessage(
338
bool foundValue =
SessionData
.CspaceToOspace.TryGetValue(baseCSpaceType, out ospaceType);
342
SessionData
.LoadMessageLogger.CreateErrorMessageWithTypeSpecificLoadLogs(
345
SessionData
.EdmItemErrors.Add(new EdmItemError(message, ospaceType));
399
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
438
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
488
if (
SessionData
.CspaceToOspace.TryGetValue((StructuralType)cspaceProperty.TypeUsage.EdmType, out propertyType))
498
SessionData
.LoadMessageLogger.CreateErrorMessageWithTypeSpecificLoadLogs(
501
SessionData
.EdmItemErrors.Add(new EdmItemError(message, ospaceType));
509
if (
SessionData
.CspaceToOspace.TryGetValue(cspaceProperty.RelationshipType, out ospaceRelationship))
518
foundTarget =
SessionData
.CspaceToOspace.TryGetValue((StructuralType)((CollectionType)cspaceProperty.TypeUsage.EdmType).TypeUsage.EdmType, out findType);
529
foundTarget =
SessionData
.CspaceToOspace.TryGetValue((StructuralType)cspaceProperty.TypeUsage.EdmType, out findType);
554
SessionData
.LoadMessageLogger.CreateErrorMessageWithTypeSpecificLoadLogs(
557
SessionData
.EdmItemErrors.Add(new EdmItemError(message, ospaceType));
578
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
585
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
592
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
613
SessionData
.LoadMessageLogger.LogLoadMessage(message, cspaceType);
641
if (
SessionData
.CspaceToOspace.TryGetValue(cspaceProperty.TypeUsage.EdmType, out propertyType))
650
SessionData
.LoadMessageLogger.CreateErrorMessageWithTypeSpecificLoadLogs(
654
SessionData
.EdmItemErrors.Add(new EdmItemError(message, ospaceType));
660
SessionData
.LoadMessageLogger.CreateErrorMessageWithTypeSpecificLoadLogs(
664
SessionData
.EdmItemErrors.Add(new EdmItemError(message, ospaceType));
670
if (
SessionData
.ConventionBasedRelationshipsAreLoaded)
676
SessionData
.ConventionBasedRelationshipsAreLoaded = true;
679
foreach (AssociationType cspaceAssociation in
SessionData
.EdmItemCollection.GetItems<AssociationType>())
683
if (
SessionData
.CspaceToOspace.ContainsKey(cspaceAssociation))
690
if (
SessionData
.CspaceToOspace.TryGetValue(GetRelationshipEndType(cspaceAssociation.RelationshipEndMembers[0]), out ospaceEndTypes[0]) &&
691
SessionData
.CspaceToOspace.TryGetValue(GetRelationshipEndType(cspaceAssociation.RelationshipEndMembers[1]), out ospaceEndTypes[1]))
707
SessionData
.TypesInLoading.Add(ospaceAssociation.FullName, ospaceAssociation);
708
SessionData
.CspaceToOspace.Add(cspaceAssociation, ospaceAssociation);
System\Data\Metadata\ObjectLayer\ObjectItemNoOpAssemblyLoader.cs (3)
22
if (!
SessionData
.KnownAssemblies.Contains(SourceAssembly,
SessionData
.ObjectItemAssemblyLoaderFactory,
SessionData
.EdmItemCollection))