3 types derived from MetaType
System.Data.Linq (3)
Mapping\AttributedMetaModel.cs (1)
526internal class AttributedMetaType : MetaType {
Mapping\MappedMetaModel.cs (2)
563internal class MappedType : MetaType { 1530internal sealed class UnmappedType : MetaType {
307 references to MetaType
System.Data.Linq (301)
ChangeDirector.cs (7)
231MetaType mt = item.Type; 260private static List<MetaDataMember> GetAutoSyncMembers(MetaType metaType, UpdateType updateType) { 316MetaType rowType = tracked.Type.GetInheritanceType(database.GetType()); 317MetaType rowTypeRoot = rowType.InheritanceRoot; 351MetaType mt = tracked.Type; 380MetaType rowType = tracked.Type; 381MetaType rowTypeRoot = rowType.InheritanceRoot;
ChangeProcessor.cs (4)
263private static void SendOnValidate(MetaType type, TrackedObject item, ChangeAction changeAction) { 390private void TrackUntrackedObjects(MetaType type, object item, Dictionary<object, object> visited) { 468private void ObserveUntrackedObjects(MetaType type, object item, Dictionary<object, object> visited) { 545MetaType mt = item.Type;
ChangeTracker.cs (17)
63private static MetaType TypeFromDiscriminator(MetaType root, object discriminator) { 64foreach (MetaType type in root.InheritanceTypes) { 86MetaType type = this.services.Model.GetMetaType(obj.GetType()); 91private TrackedObject Track(MetaType mt, object obj, Dictionary<object, object> visited, bool recurse, int level) { 138MetaType type = this.services.Model.GetTable(obj.GetType()).RowType; 154MetaType metaType = this.services.Model.GetTable(type).RowType.GetInheritanceType(type); 158private StandardTrackedObject PromoteFastTrackedObject(MetaType type, object obj) { 210private MetaType type; 248internal StandardTrackedObject(StandardChangeTracker tracker, MetaType type, object current, object original) { 260internal StandardTrackedObject(StandardChangeTracker tracker, MetaType type, object current, object original, bool isWeaklyTracked) 269internal override MetaType Type { 528MetaType rootMetaType = this.tracker.services.Model.GetTable(instanceType).RowType.InheritanceRoot; 624MetaType currentTypeFromDiscriminator = TypeFromDiscriminator(this.type, currentDiscriminator); 626MetaType dbTypeFromDiscriminator = TypeFromDiscriminator(this.type, dbDiscriminator); 636MetaType currentType = type.GetInheritanceType(this.current.GetType()); 857internal abstract MetaType Type { get; }
DataContext.cs (7)
608MetaType inheritanceRoot = services.Model.GetMetaType(o.GetType()).InheritanceRoot; 1222MetaType type = this.metaTable.RowType.GetInheritanceType(entity.GetType()); 1289private static bool IsTrackableType(MetaType type) { 1409MetaType type = this.metaTable.RowType.GetInheritanceType(entity.GetType()); 1470MetaType type = this.metaTable.RowType.GetInheritanceType(entity.GetType()); 1573MetaType type = this.Context.Mapping.GetMetaType(entity.GetType()); 1610MetaType type = this.Context.Mapping.GetMetaType(entity.GetType());
DataServices.cs (21)
58internal IEnumerable<RelatedItem> GetParents(MetaType type, object item) { 62internal IEnumerable<RelatedItem> GetChildren(MetaType type, object item) { 66private IEnumerable<RelatedItem> GetRelations(MetaType type, object item, bool isForeignKey) { 69MetaType otherType = mm.Association.OtherType; 102internal static object[] GetKeyValues(MetaType type, object instance) { 118internal object GetCachedObject(MetaType type, object[] keyValues) { 128internal object GetCachedObjectLike(MetaType type, object instance) { 138public bool IsCachedObject(MetaType type, object instance) { 148public object InsertLookupCachedObject(MetaType type, object instance) { 159public bool RemoveCachedObjectLike(MetaType type, object instance) { 169public void OnEntityMaterialized(MetaType type, object instance) { 180private static void SendOnLoaded(MetaType type, object item) { 202internal Expression GetObjectQuery(MetaType type, object[] keyValues) { 212internal Expression GetObjectQuery(MetaType type, Expression[] keyValues) { 402MetaType mt = this.member.IsAssociation ? this.member.Association.OtherType : this.member.DeclaringType; 519internal object[] GetKeyValues(MetaType type, LambdaExpression predicate) { 533private bool GetKeysFromPredicate(MetaType type, Dictionary<MetaDataMember, object> keys, Expression expr) { 556private static bool GetKeyFromPredicate(MetaType type, Dictionary<MetaDataMember, object> keys, Expression mex, Expression vex) { 592internal object GetObjectByKey(MetaType type, object[] keyValues) { 604internal MetaType Type; 606internal RelatedItem(MetaType type, object item) {
IdentityManager.cs (17)
15internal abstract object InsertLookup(MetaType type, object instance); 16internal abstract bool RemoveLike(MetaType type, object instance); 17internal abstract object Find(MetaType type, object[] keyValues); 18internal abstract object FindLike(MetaType type, object instance); 30Dictionary<MetaType, IdentityCache> caches; 32MetaType currentType; 35this.caches = new Dictionary<MetaType, IdentityCache>(); 38internal override object InsertLookup(MetaType type, object instance) { 43internal override bool RemoveLike(MetaType type, object instance) { 48internal override object Find(MetaType type, object[] keyValues) { 53internal override object FindLike(MetaType type, object instance) { 59private void SetCurrent(MetaType type) { 76static KeyManager GetKeyManager(MetaType type) { 371internal override object InsertLookup(MetaType type, object instance) { return instance; } 372internal override bool RemoveLike(MetaType type, object instance) { return false; } 373internal override object Find(MetaType type, object[] keyValues) { return null; } 374internal override object FindLike(MetaType type, object instance) { return null; }
Mapping\AttributedMetaModel.cs (54)
34internal static MetaType FindBase(MetaType derivedType) { 42MetaType metaType = null; 64Dictionary<Type, MetaType> metaTypes; 75this.metaTypes = new Dictionary<Type, MetaType>(); 179foreach (MetaType rt in metaFunction.ResultRowTypes) { 180foreach (MetaType it in rt.InheritanceTypes) { 240foreach (MetaType mt in table.RowType.InheritanceTypes) { 264public override MetaType GetMetaType(Type type) { 268MetaType mtype = null; 317MetaType rowType; 337public override MetaType RowType { 388Dictionary<Type, MetaType> types; 389Dictionary<object, MetaType> codeMap; 390ReadOnlyCollection<MetaType> inheritanceTypes; 391MetaType inheritanceDefault; 405this.types = new Dictionary<Type, MetaType>(); 407this.codeMap = new Dictionary<object, MetaType>(); 453this.inheritanceTypes = new MetaType[] { this }.ToList().AsReadOnly(); 460foreach (MetaType type in this.InheritanceTypes) { 496MetaType metaType; 507public override ReadOnlyCollection<MetaType> InheritanceTypes { 511public override MetaType GetInheritanceType(Type type) { 514MetaType metaType = null; 521public override MetaType InheritanceDefault { 537MetaType inheritanceRoot; 539MetaType inheritanceBase; 541ReadOnlyCollection<MetaType> derivedTypes; 551internal AttributedMetaType(MetaModel model, MetaTable table, Type type, MetaType inheritanceRoot) { 720public override MetaType InheritanceRoot { 723public override MetaType InheritanceBase { 737public override MetaType InheritanceDefault { 743public override ReadOnlyCollection<MetaType> InheritanceTypes { 746public override MetaType GetInheritanceType(Type inheritanceType) { 751public override ReadOnlyCollection<MetaType> DerivedTypes { 758List<MetaType> dTypes = new List<MetaType>(); 759foreach (MetaType mt in this.InheritanceTypes) { 770public override MetaType GetTypeForInheritanceCode(object key) { 773foreach (MetaType mt in this.InheritanceRoot.InheritanceTypes) { 779foreach (MetaType mt in this.InheritanceRoot.InheritanceTypes) { 863private ReadOnlyCollection<MetaType> rowTypes; 865static ReadOnlyCollection<MetaType> _emptyTypes = new List<MetaType>(0).AsReadOnly(); 893this.rowTypes = new List<MetaType>(1) { this.GetMetaType(elementType) }.AsReadOnly(); 896List<MetaType> rowTypes = new List<MetaType>(); 899MetaType mt = this.GetMetaType(type); 930private MetaType GetMetaType(Type type) { 969public override ReadOnlyCollection<MetaType> ResultRowTypes { 1077public override MetaType DeclaringType { 1080public override bool IsDeclaredBy(MetaType declaringMetaType) { 1316MetaType otherType; 1374public override MetaType OtherType {
Mapping\MappedMetaModel.cs (71)
27Dictionary<Type, MetaType> metaTypes; 40this.metaTypes = new Dictionary<Type, MetaType>(); 86foreach (MetaType mt in table.RowType.InheritanceTypes) { 140foreach (MetaType rt in func.ResultRowTypes) { 141foreach (MetaType it in rt.InheritanceTypes) { 181public override MetaType GetMetaType(Type type) { 185MetaType mtype = null; 350MetaType rowType; 369public override MetaType RowType { 416Dictionary<Type, MetaType> derivedTypes; 417Dictionary<object, MetaType> inheritanceCodes; 418ReadOnlyCollection<MetaType> inheritanceTypes; 419MetaType inheritanceDefault; 437this.derivedTypes = new Dictionary<Type, MetaType>(); 438this.inheritanceCodes = new Dictionary<object, MetaType>(); 449this.inheritanceTypes = new MetaType[] { this }.ToList().AsReadOnly(); 457foreach (MetaType type in this.InheritanceTypes) { 487private MetaType InitDerivedTypes(TypeMapping typeMap) { 497private MetaType InitInheritedType(TypeMapping typeMap, MappedType type) { 544public override ReadOnlyCollection<MetaType> InheritanceTypes { 548public override MetaType GetInheritanceType(Type type) { 551MetaType metaType = null; 558public override MetaType InheritanceDefault { 575MetaType inheritanceRoot; 577MetaType inheritanceBase; 579ReadOnlyCollection<MetaType> derivedTypes; 589internal MappedType(MetaModel model, MetaTable table, TypeMapping typeMapping, Type type, MetaType inheritanceRoot) { 798public override MetaType InheritanceDefault { 805public override MetaType InheritanceRoot { 808public override MetaType InheritanceBase { 822public override ReadOnlyCollection<MetaType> InheritanceTypes { 825public override ReadOnlyCollection<MetaType> DerivedTypes { 832List<MetaType> dTypes = new List<MetaType>(); 833foreach (MetaType mt in this.InheritanceTypes) { 844public override MetaType GetInheritanceType(Type inheritanceType) { 845foreach (MetaType mt in this.InheritanceTypes) 850public override MetaType GetTypeForInheritanceCode(object key) { 853foreach (MetaType mt in this.InheritanceRoot.InheritanceTypes) { 859foreach (MetaType mt in this.InheritanceRoot.InheritanceTypes) { 935MetaType declaringType; 963internal MappedDataMember(MetaType declaringType, MemberInfo mi, MemberMapping map, int ordinal) { 1032public override MetaType DeclaringType { 1035public override bool IsDeclaredBy(MetaType metaType) { 1216MetaType otherType; 1295public override MetaType OtherType { 1334ReadOnlyCollection<MetaType> rowTypes; 1336static ReadOnlyCollection<MetaType> _emptyTypes = new List<MetaType>(0).AsReadOnly(); 1354this.rowTypes = new List<MetaType>(1) { this.GetMetaType(map.Types[0], elementType) }.AsReadOnly(); 1357List<MetaType> rowTypes = new List<MetaType>(); 1363MetaType mt = this.GetMetaType(rtm, elementType); 1397private MetaType GetMetaType(TypeMapping tm, Type elementType) { 1428public override ReadOnlyCollection<MetaType> ResultRowTypes { 1490protected static ReadOnlyCollection<MetaDataMember> MakeKeys(MetaType mtype, string keyFields) { 1535ReadOnlyCollection<MetaType> inheritanceTypes; 1538private static ReadOnlyCollection<MetaType> _emptyTypes = new List<MetaType>().AsReadOnly(); 1577public override ReadOnlyCollection<MetaType> InheritanceTypes { 1582this.inheritanceTypes = new MetaType[] { this }.ToList().AsReadOnly(); 1589public override MetaType GetInheritanceType(Type inheritanceType) { 1594public override ReadOnlyCollection<MetaType> DerivedTypes { 1597public override MetaType GetTypeForInheritanceCode(object key) { 1609public override MetaType InheritanceRoot { 1612public override MetaType InheritanceBase { 1615public override MetaType InheritanceDefault { 1707MetaType declaringType; 1714internal UnmappedDataMember(MetaType declaringType, MemberInfo mi, int ordinal) { 1729public override MetaType DeclaringType { 1732public override bool IsDeclaredBy(MetaType metaType) {
Mapping\MetaModel.cs (13)
60public abstract MetaType GetMetaType(Type type); 86public abstract MetaType RowType { get; } 165public abstract MetaType InheritanceRoot { get; } 169public abstract MetaType InheritanceBase { get; } 173public abstract MetaType InheritanceDefault { get; } 179public abstract MetaType GetInheritanceType(Type type); 185public abstract MetaType GetTypeForInheritanceCode(object code); 190public abstract ReadOnlyCollection<MetaType> InheritanceTypes { get; } 203public abstract ReadOnlyCollection<MetaType> DerivedTypes { get; } 244public abstract MetaType DeclaringType { get; } 274public abstract bool IsDeclaredBy(MetaType type); 394public abstract ReadOnlyCollection<MetaType> ResultRowTypes { get; } 431public abstract MetaType OtherType { get; }
Provider\IDataServices.cs (3)
16bool IsCachedObject(MetaType type, object instance); 17object InsertLookupCachedObject(MetaType type, object instance); 18void OnEntityMaterialized(MetaType type, object instance);
SqlClient\Common\SqlFactory.cs (8)
290MetaType typeOf = this.model.GetMetaType((Type)value); 299internal SqlExpression StaticType(MetaType typeOf, Expression sourceExpression) { 312internal SqlExpression DiscriminatedType(SqlExpression discriminator, MetaType targetType) { 316internal SqlTable Table(MetaTable table, MetaType rowType, Expression sourceExpression) { 503MetaType metaType = this.model.GetMetaType(member.DeclaringType); 512internal SqlExpression TypeCase(Type clrType, MetaType rowType, SqlExpression discriminator, IEnumerable<SqlTypeCaseWhen> whens, Expression sourceExpression) { 516internal SqlNew New(MetaType type, ConstructorInfo cons, IEnumerable<SqlExpression> args, IEnumerable<MemberInfo> argMembers, IEnumerable<SqlMemberAssign> bindings, Expression sourceExpression) { 573internal SqlTableValuedFunctionCall TableValuedFunctionCall(MetaType rowType, Type clrType, string name, IEnumerable<SqlExpression> args, Expression source) {
SqlClient\Common\SqlNode.cs (21)
234private MetaType targetType; 235internal SqlDiscriminatedType(ProviderType sqlType, SqlExpression discriminator, MetaType targetType, Expression sourceExpression) 253internal MetaType TargetType { 380private MetaType rowType; 384internal SqlTable(MetaTable table, MetaType rowType, ProviderType sqlRowType, Expression sourceExpression) 404internal MetaType RowType { 490private MetaType rowType; 492internal SqlUserRow(MetaType rowType, ProviderType sqlType, SqlUserQuery query, Expression source) 498internal MetaType RowType { 1315private MetaType rowType; 1320internal SqlTypeCase(Type clrType, ProviderType sqlType, MetaType rowType, SqlExpression discriminator, IEnumerable<SqlTypeCaseWhen> whens, Expression sourceExpression) 1351internal MetaType RowType { 1661private MetaType metaType; 1667internal SqlNew(MetaType metaType, ProviderType sqlType, ConstructorInfo cons, IEnumerable<SqlExpression> args, IEnumerable<MemberInfo> argMembers, IEnumerable<SqlMemberAssign> members, Expression sourceExpression) 1689internal MetaType MetaType { 1791private MetaType rowType; 1798internal SqlLink(object id, MetaType rowType, Type clrType, ProviderType sqlType, SqlExpression expression, MetaDataMember member, IEnumerable<SqlExpression> keyExpressions, SqlExpression expansion, Expression sourceExpression) 1810internal MetaType RowType { 2177private MetaType rowType; 2180internal SqlTableValuedFunctionCall(MetaType rowType, Type clrType, ProviderType sqlType, string name, IEnumerable <SqlExpression > args , Expression source) 2186internal MetaType RowType {
SqlClient\Query\MethodCallConverter.cs (1)
300MetaType mt = TypeSource.GetSourceMetaType(mc.Object, this.model);
SqlClient\Query\QueryConverter.cs (6)
830MetaType mt = this.services.Model.GetMetaType(qn.Type); 850MetaType mt = this.services.Model.GetMetaType(init.Type); 1195MetaType rowType = function.ResultRowTypes[0].InheritanceRoot; 1248MetaType mType = this.services.Model.GetMetaType(elementType); 2398MetaType itemMetaType = null; 2594MetaType metaType = this.services.Model.GetMetaType(entityType);
SqlClient\Query\SqlBinder.cs (19)
99HashSet<MetaType> alreadyIncluded; 125this.alreadyIncluded = new HashSet<MetaType>(); 319MetaType[] leftPossibleTypes = GetPossibleTypes(left); 320MetaType[] rightPossibleTypes = GetPossibleTypes(right); 370private MetaType[] GetPossibleTypes(SqlExpression typeExpression) { 372return new MetaType[0]; 376List<MetaType> concreteTypes = new List<MetaType>(); 377foreach (MetaType mt in dt.TargetType.InheritanceTypes) { 386MetaType mt = this.model.GetMetaType((Type)val.Value); 387return new MetaType[] { mt }; 390HashSet<MetaType> types = new HashSet<MetaType>(); 425MetaType defaultType = tc.RowType.InheritanceDefault; 440var mt = this.model.GetMetaType(obj.ClrType).InheritanceRoot; 676MetaType otherType = mm.DeclaringType.InheritanceRoot; 994private static MetaDataMember GetRequiredInheritanceDataMember(MetaType type, MemberInfo mi) { 997MetaType root = type.GetInheritanceType(mi.DeclaringType); 1046MetaType otherType = mdm.DeclaringType.InheritanceRoot;
SqlClient\Query\SqlReorderer.cs (1)
96MetaType rowType = isTable ? tab.RowType : tvf.RowType;
SqlClient\Query\Translator.cs (14)
27internal SqlSelect BuildDefaultQuery(MetaType rowType, bool allowDeferred, SqlLink link, Expression source) { 41internal SqlExpression BuildProjection(SqlExpression item, MetaType rowType, bool allowDeferred, SqlLink link, Expression source) { 47List<MetaType> mappedTypes = new List<MetaType>(rowType.InheritanceTypes); 51MetaType root = rowType.InheritanceRoot; 56foreach (MetaType type in mappedTypes) { 88private SqlNew BuildProjectionInternal(SqlExpression item, MetaType rowType, IEnumerable<MetaDataMember> members, bool allowDeferred, SqlLink link, Expression source) { 125MetaType otherType = member.Association.OtherType; 130MetaType thisType = member.DeclaringType; 246MetaType otherType = mm.Association.OtherType; 309MetaType mtLeft = TypeSource.GetSourceMetaType(eLeft, this.services.Model); 310MetaType mtRight = TypeSource.GetSourceMetaType(eRight, this.services.Model); 504private IEnumerable<MetaDataMember> GetIdentityMembers(MetaType type) { 511private List<SqlExpression> GetIdentityExpressions(MetaType type, SqlExpression expr) {
SqlClient\Query\TypeSource.cs (1)
136internal static MetaType GetSourceMetaType(SqlNode node, MetaModel model) {
SqlClient\Reader\ObjectReaderCompiler.cs (8)
976iMeta = this.AddGlobal(typeof(MetaType), sn.MetaType); 1985private Type GenerateDiscriminatedType(MetaType targetType, LocalBuilder locDiscriminator, ProviderType discriminatorType) { 1988MetaType defType = null; 1991foreach (MetaType imt in targetType.InheritanceTypes) { 2542MetaType mType = (MetaType)this.Globals[iMetaType]; 2547MetaType mType = (MetaType)this.Globals[iMetaType];
SqlClient\SqlBuilder.cs (4)
80foreach (MetaType type in table.RowType.InheritanceTypes) { 88private static int BuildFieldDeclarations(MetaType type, Dictionary<object, string> memberNameToMappedName, StringBuilder sb) { 146foreach (MetaType type in table.RowType.InheritanceTypes) { 153private static IEnumerable<String> GetCreateForeignKeyCommands(MetaType type) {
SqlClient\SqlProvider.cs (4)
1223MetaType rowType = services.Model.GetMetaType(elementType); 1661private IObjectReaderFactory GetDefaultFactory(MetaType rowType) { 1978MetaType metaType = null; 1982foreach (MetaType mt in function.ResultRowTypes) {
System.Web.DynamicData (5)
DynamicData\ModelProviders\DLinqDataModelProvider.cs (3)
7using LinqMetaType = System.Data.Linq.Mapping.MetaType; 50private void ProcessTable(LinqMetaTable table, LinqMetaType rowType, string name, PropertyInfo prop) { 53foreach (LinqMetaType derivedType in rowType.DerivedTypes)
DynamicData\ModelProviders\DLinqTableProvider.cs (2)
12private MetaType _rowType; 15public DLinqTableProvider(DLinqDataModelProvider dataModel, MetaType rowType, string name, PropertyInfo prop)
System.Web.Extensions (1)
UI\WebControls\LinqDataSourceView.cs (1)
630MetaType rowMetaData = tableMetaData.Model.GetMetaType(dataObjectType);