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