3 overrides of Type
System.Data.Linq (3)
Mapping\AttributedMetaModel.cs (1)
675
public override Type
Type
{
Mapping\MappedMetaModel.cs (2)
749
public override Type
Type
{
1553
public override Type
Type
{
123 references to Type
System.Data.Linq (117)
ChangeConflicts.cs (1)
318
if (!member.DeclaringType.
Type
.IsAssignableFrom(this.database.GetType())) {
ChangeDirector.cs (14)
235
ParameterExpression p = Expression.Parameter(item.Type.Table.RowType.
Type
, "p");
239
return Expression.Call(typeof(DataManipulation), "Insert", new Type[] { item.Type.InheritanceRoot.
Type
, resultSelector.Body.Type }, Expression.Constant(item.Current), resultSelector);
242
return Expression.Call(typeof(DataManipulation), "Insert", new Type[] { item.Type.InheritanceRoot.
Type
}, Expression.Constant(item.Current));
319
ParameterExpression p = Expression.Parameter(rowTypeRoot.
Type
, "p");
322
pv = Expression.Convert(p, rowType.
Type
);
336
return Expression.Call(typeof(DataManipulation), "Update", new Type[] { rowTypeRoot.
Type
, resultSelector.Body.Type }, Expression.Constant(tracked.Current), check, resultSelector);
339
return Expression.Call(typeof(DataManipulation), "Update", new Type[] { rowTypeRoot.
Type
, resultSelector.Body.Type }, Expression.Constant(tracked.Current), resultSelector);
343
return Expression.Call(typeof(DataManipulation), "Update", new Type[] { rowTypeRoot.
Type
}, Expression.Constant(tracked.Current), check);
346
return Expression.Call(typeof(DataManipulation), "Update", new Type[] { rowTypeRoot.
Type
}, Expression.Constant(tracked.Current));
382
ParameterExpression p = Expression.Parameter(rowTypeRoot.
Type
, "p");
385
pv = Expression.Convert(p, rowType.
Type
);
391
return Expression.Call(typeof(DataManipulation), "Delete", new Type[] { rowTypeRoot.
Type
}, Expression.Constant(original), check);
394
return Expression.Call(typeof(DataManipulation), "Delete", new Type[] { rowTypeRoot.
Type
}, Expression.Constant(original));
399
ITable table = this.context.GetTable(tracked.Type.InheritanceRoot.
Type
);
ChangeProcessor.cs (2)
618
return string.CompareOrdinal(x.Type.
Type
.FullName, y.Type.
Type
.FullName);
ChangeTracker.cs (7)
358
System.Diagnostics.Debug.Assert(originalState.GetType() == this.type.
Type
);
450
if (!mm.IsAssociation && (this.Type.
Type
== instanceType || mm.DeclaringType.
Type
.IsAssignableFrom(instanceType))) {
524
System.Diagnostics.Debug.Assert(instance.GetType() == this.type.
Type
);
526
object copy = Activator.CreateInstance(this.Type.
Type
);
530
if (this.Type.
Type
!= instanceType && !mm.DeclaringType.
Type
.IsAssignableFrom(instanceType)) {
DataBindingList.cs (2)
16
ITable table = context.GetTable(metaTable.RowType.
Type
);
17
Type bindingType = typeof(DataBindingList<>).MakeGenericType(metaTable.RowType.
Type
);
DataContext.cs (12)
364
throw Error.CouldNotGetTableForSubtype(typeof(TEntity), metaTable.RowType.
Type
);
385
if (metaTable.RowType.
Type
!= type) {
386
throw Error.CouldNotGetTableForSubtype(type, metaTable.RowType.
Type
);
396
Type tbType = typeof(Table<>).MakeGenericType(metaTable.RowType.
Type
);
408
throw Error.NonEntityAssociationMapping(assoc.ThisMember.DeclaringType.
Type
, assoc.ThisMember.Name, assoc.ThisMember.DeclaringType.
Type
);
411
throw Error.NonEntityAssociationMapping(assoc.ThisMember.DeclaringType.
Type
, assoc.ThisMember.Name, assoc.OtherType.
Type
);
609
GetTable(inheritanceRoot.
Type
);
1224
throw Error.TypeCouldNotBeAdded(type.
Type
);
1411
throw Error.TypeCouldNotBeTracked(type.
Type
);
1472
throw Error.TypeCouldNotBeTracked(type.
Type
);
DataServices.cs (14)
213
ITable table = this.context.GetTable(type.InheritanceRoot.
Type
);
238
Type rootType = association.ThisMember.DeclaringType.InheritanceRoot.
Type
;
240
if (rootType != association.ThisMember.DeclaringType.
Type
) {
241
thisSource = Expression.Call(typeof(Enumerable), "Cast", new Type[] { association.ThisMember.DeclaringType.
Type
}, thisSource);
243
Expression thisInstance = Expression.Call(typeof(Enumerable), "FirstOrDefault", new Type[] { association.ThisMember.DeclaringType.
Type
},
246
Expression otherSource = Expression.Constant(context.GetTable(association.OtherType.InheritanceRoot.
Type
));
247
if (association.OtherType.
Type
!=association.OtherType.InheritanceRoot.
Type
) {
248
otherSource = Expression.Call(typeof(Enumerable), "Cast", new Type[] { association.OtherType.
Type
}, otherSource);
260
if (elementType != member.DeclaringType.
Type
)
261
e = Expression.Convert(e, member.DeclaringType.
Type
);
559
memex.Expression.NodeType != ExpressionType.Parameter || memex.Expression.Type != type.
Type
) {
562
if (!type.
Type
.IsAssignableFrom(memex.Member.ReflectedType) && !memex.Member.ReflectedType.IsAssignableFrom(type.
Type
)) {
IdentityManager.cs (3)
65
typeof(IdentityCache<,>).MakeGenericType(type.
Type
, km.KeyType),
81
typeof(SingleKeyManager<,>).MakeGenericType(type.
Type
, mm.Type),
89
typeof(MultiKeyManager<,,>).MakeGenericType(type.
Type
, mm.Type, km.KeyType),
Mapping\AttributedMetaModel.cs (14)
35
if (derivedType.
Type
== typeof(object)) {
39
var clrType = derivedType.
Type
; // start
40
var rootClrType = derivedType.InheritanceRoot.
Type
; // end
181
if (!this.metaTypes.ContainsKey(it.
Type
)) {
182
this.metaTypes.Add(it.
Type
, it);
241
this.metaTables.Add(mt.
Type
, table);
368
new Type[] { rowType.
Type
}
374
new Type[] { rowType.
Type
}
380
new Type[] { rowType.
Type
}
462
TableAttribute[] attrs = (TableAttribute[])type.
Type
.GetCustomAttributes(typeof(TableAttribute), false);
464
throw Error.InheritanceSubTypeIsAlsoRoot(type.
Type
);
760
if (mt.
Type
.BaseType == this.type)
1084
return declaringMetaType.
Type
== this.declaringType;
1242
new Type[] { this.DeclaringType.
Type
}
Mapping\MappedMetaModel.cs (14)
87
this.metaTypes.Add(mt.
Type
, mt);
88
this.metaTables.Add(mt.
Type
, table);
142
if (!this.metaTypes.ContainsKey(it.
Type
)) {
143
this.metaTypes.Add(it.
Type
, it);
396
new Type[] { rowType.
Type
}
402
new Type[] { rowType.
Type
}
408
new Type[] { rowType.
Type
}
700
Type aboveRoot = inheritanceRoot.
Type
.BaseType;
834
if (mt.
Type
.BaseType == this.type)
846
if (mt.
Type
== inheritanceType)
1039
return metaType.
Type
== this.member.DeclaringType;
1147
new Type[] { this.DeclaringType.
Type
}
1495
MemberInfo[] rmis = mtype.
Type
.GetMember(names[i], BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
1736
return metaType.
Type
== this.member.DeclaringType;
SqlClient\Common\SqlFactory.cs (2)
305
return new SqlValue(typeof(Type), this.typeProvider.From(typeof(Type)), typeOf.
Type
, false, sourceExpression);
517
SqlNew tb = new SqlNew(type, typeProvider.From(type.
Type
), cons, args, argMembers, bindings, sourceExpression);
SqlClient\Common\SqlNode.cs (6)
493
: base(SqlNodeType.UserRow, rowType.
Type
, sqlType, source) {
593
return tvf.RowType.
Type
;
605
return tab.RowType.
Type
;
1668
: base(SqlNodeType.New, metaType.
Type
, sqlType, sourceExpression) {
1671
if (cons == null && metaType.
Type
.IsClass) { // structs do not need to have a constructor
2018
if (!this.table.RowType.
Type
.IsAssignableFrom(value.ClrType))
SqlClient\Query\MethodCallConverter.cs (1)
333
Type originalType = model.GetMetaType(t.Operand.ClrType).InheritanceRoot.
Type
;
SqlClient\Query\QueryConverter.cs (7)
2396
Expression source = this.services.Context.GetTable(metaTable.RowType.
Type
).Expression;
2418
ConstructorInfo cons = itemMetaType.
Type
.GetConstructor(Type.EmptyTypes);
2561
Expression source = this.services.Context.GetTable(metaTable.RowType.
Type
).Expression;
2562
Type rowType = metaTable.RowType.
Type
;
2595
ITable table = this.services.Context.GetTable(metaType.InheritanceRoot.
Type
);
2645
Expression source = this.services.Context.GetTable(metaTable.RowType.
Type
).Expression;
2646
Type rowType = metaTable.RowType.
Type
;
SqlClient\Query\SqlBinder.cs (1)
378
if (!mt.
Type
.IsAbstract) {
SqlClient\Query\Translator.cs (5)
74
return sql.TypeCase(root.
Type
, root, dm, whens.ToArray(), source);
111
ConstructorInfo cons = rowType.
Type
.GetConstructor(BindingFlags.Instance|BindingFlags.Public|BindingFlags.NonPublic, null, System.Type.EmptyTypes, null);
113
throw Error.MappedTypeMustHaveDefaultConstructor(rowType.
Type
);
247
Type tableType = otherType.InheritanceRoot.
Type
;
249
Expression source = new LinkedTableExpression(link, table, typeof(IQueryable<>).MakeGenericType(otherType.
Type
));
SqlClient\Query\TypeSource.cs (3)
73
sourceType = ((SqlTypeCase)node).RowType.
Type
;
76
sourceType = ((SqlLink)node).RowType.
Type
;
79
sourceType = ((SqlTable)node).RowType.
Type
;
SqlClient\Reader\ObjectReaderCompiler.cs (2)
2003
this.GenerateConstant(typeof(Type), imt.
Type
);
2012
this.GenerateConstant(typeof(Type), defType.
Type
);
SqlClient\SqlBuilder.cs (1)
84
throw Error.CreateDatabaseFailedBecauseOfClassWithNoMembers(table.RowType.
Type
);
SqlClient\SqlProvider.cs (6)
1668
if (TypeSystem.IsSimpleType(rowType.
Type
)) {
1671
SqlUserColumn col = new SqlUserColumn(rowType.
Type
, typeProvider.From(rowType.
Type
), suq, "", false, suq.SourceExpression);
1680
Type resultType = TypeSystem.GetSequenceType(rowType.
Type
);
1682
return this.GetReaderFactory(qis[qis.Length - 1].Query, rowType.
Type
);
1983
metaType = mt.InheritanceTypes.SingleOrDefault(it => it.
Type
== typeof(T));
System.Web.DynamicData (6)
DynamicData\ModelProviders\DLinqAssociationProvider.cs (1)
82
ToTable = ((DLinqDataModelProvider)FromColumn.Table.DataModel).DLinqTables.Single(tp => tp.EntityType == association.OtherType.
Type
);
DynamicData\ModelProviders\DLinqDataModelProvider.cs (1)
38
return context.Mapping.GetTables().First(t => t.RowType.
Type
== entityType);
DynamicData\ModelProviders\DLinqTableProvider.cs (4)
21
EntityType = rowType.
Type
;
22
ParentEntityType = rowType.InheritanceBase != null ? rowType.InheritanceBase.
Type
: null;
23
RootEntityType = rowType.Table.RowType.
Type
;
29
foreach (PropertyInfo propInfo in GetOrderedProperties(rowType.
Type
)) {