136 references to TypeSystem
System.Data.Linq (136)
DataContext.cs (1)
1150
Type eType = System.Data.Linq.SqlClient.
TypeSystem
.GetElementType(expression.Type);
DataQuery.cs (1)
37
Type eType = System.Data.Linq.SqlClient.
TypeSystem
.GetElementType(expression.Type);
DataServices.cs (3)
257
Type elementType = System.Data.Linq.SqlClient.
TypeSystem
.GetElementType(query.Type);
290
? System.Data.Linq.SqlClient.
TypeSystem
.GetElementType(member.Type)
508
Type elementType = System.Data.Linq.SqlClient.
TypeSystem
.GetElementType(query.Type);
DataShape.cs (2)
241
Type mt = System.Data.Linq.SqlClient.
TypeSystem
.GetMemberType(mi);
249
Type memberType = System.Data.Linq.SqlClient.
TypeSystem
.GetMemberType(mi);
DbConvert.cs (1)
29
Type toType = System.Data.Linq.SqlClient.
TypeSystem
.GetNonNullableType(type);
IdentityManager.cs (1)
122
this.isKeyNullAssignable = System.Data.Linq.SqlClient.
TypeSystem
.IsNullAssignable(typeof(V));
Mapping\AttributedMetaModel.cs (8)
602
FieldInfo[] fis =
TypeSystem
.GetAllFields(this.type, flags).ToArray();
620
PropertyInfo[] pis =
TypeSystem
.GetAllProperties(this.type, flags).ToArray();
892
Type elementType =
TypeSystem
.GetElementType(mi.ReturnType);
1034
this.type =
TypeSystem
.GetMemberType(mi);
1035
this.isNullableType =
TypeSystem
.IsNullableType(this.type);
1046
Type storageType = this.storageMember != null ?
TypeSystem
.GetMemberType(this.storageMember) : this.type;
1329
this.isMany =
TypeSystem
.IsSequenceType(this.thisMember.Type);
1330
Type ot = this.isMany ?
TypeSystem
.GetElementType(this.thisMember.Type) : this.thisMember.Type;
Mapping\MappedMetaModel.cs (10)
650
FieldInfo[] fis =
TypeSystem
.GetAllFields(this.type, flags).ToArray();
671
PropertyInfo[] pis =
TypeSystem
.GetAllProperties(this.type, flags).ToArray();
967
this.type =
TypeSystem
.GetMemberType(mi);
968
this.isNullableType =
TypeSystem
.IsNullableType(this.type);
977
Type storageType = this.storageMember != null ?
TypeSystem
.GetMemberType(this.storageMember) : this.type;
1238
this.isMany =
TypeSystem
.IsSequenceType(this.thisMember.Type);
1267
Type ot = this.isMany ?
TypeSystem
.GetElementType(this.thisMember.Type) : this.thisMember.Type;
1353
Type elementType =
TypeSystem
.GetElementType(method.ReturnType);
1718
this.type =
TypeSystem
.GetMemberType(mi);
1793
get { return !this.type.IsValueType ||
TypeSystem
.IsNullableType(this.type); }
SqlClient\Common\SqlFactory.cs (2)
370
Type valueType =
TypeSystem
.GetNonNullableType(expression.ClrType);
502
Type clrType =
TypeSystem
.GetMemberType(member);
SqlClient\Common\SqlNode.cs (8)
335
if (value != null &&
TypeSystem
.GetNonNullableType(value.ClrType) != typeof(bool)) {
349
if (value != null &&
TypeSystem
.GetNonNullableType(value.ClrType) != typeof(bool)) {
596
if (
TypeSystem
.IsSequenceType(exp.ClrType))
597
return
TypeSystem
.GetElementType(exp.ClrType);
1119
&& !
TypeSystem
.GetNonNullableType(this.matchExpression.ClrType).Equals(typeof(bool))
1120
&& !
TypeSystem
.GetNonNullableType(value.ClrType).Equals(typeof(bool)))
2259
if (!
TypeSystem
.GetNonNullableType(this.ClrType).IsAssignableFrom(
TypeSystem
.GetNonNullableType(value.ClrType)))
SqlClient\Query\MethodCallConverter.cs (4)
97
return
TypeSystem
.IsNullableType(m.Expression.ClrType) && m.Member.Name == "Value";
101
return
TypeSystem
.IsNullableType(m.Expression.ClrType) && m.Member.Name == "HasValue";
336
treatType =
TypeSystem
.GetNonNullableType(treatType);
337
originalType =
TypeSystem
.GetNonNullableType(originalType);
SqlClient\Query\QueryConverter.cs (19)
595
Type sourceType =
TypeSystem
.GetElementType(sequence.Type);
748
Type nnFromType =
TypeSystem
.GetNonNullableType(fromType);
749
Type nnToType =
TypeSystem
.GetNonNullableType(toType);
754
else if (
TypeSystem
.IsSequenceType(nnFromType) ||
TypeSystem
.IsSequenceType(nnToType)) {
822
if (
TypeSystem
.IsNullableType(qn.Type) && qn.Arguments.Count == 1 &&
823
TypeSystem
.GetNonNullableType(qn.Type) == qn.Arguments[0].Type) {
975
if (
TypeSystem
.IsSequenceType(selection.ClrType) && !selection.SqlType.CanBeColumn) {
1247
Type elementType =
TypeSystem
.GetElementType(resultType);
1252
if (
TypeSystem
.IsSimpleType(elementType)) {
1379
if (
TypeSystem
.IsSimpleType(resultType)) {
1426
Type type =
TypeSystem
.GetElementType(source1.Type);
1450
Type type =
TypeSystem
.GetElementType(source1.Type);
1655
if (lambda != null && !
TypeSystem
.IsSimpleType(lambda.Body.Type)) {
1777
Type elemType =
TypeSystem
.GetElementType(sequence.Type);
1859
Type memberType =
TypeSystem
.GetMemberType(ma.Member);
1867
if (ma.Member.Name == "Count" &&
TypeSystem
.IsSequenceType(ma.Expression.Type)) {
1933
&&
TypeSystem
.GetElementType(mc.Method.DeclaringType).IsAssignableFrom(mc.Arguments[0].Type)
1964
Type elemType =
TypeSystem
.GetElementType(c.Type);
SqlClient\Query\SqlBinder.cs (7)
178
if (this.IsConstNull(bo.Left) && !
TypeSystem
.IsNullableType(bo.ClrType)) {
181
else if (this.IsConstNull(bo.Right) && !
TypeSystem
.IsNullableType(bo.ClrType)) {
187
if (this.IsConstNull(bo.Left) && !
TypeSystem
.IsNullableType(bo.ClrType)) {
190
else if (this.IsConstNull(bo.Right) && !
TypeSystem
.IsNullableType(bo.ClrType)) {
356
if (
TypeSystem
.IsSequenceType(bo.Left.ClrType)) {
359
if (
TypeSystem
.IsSequenceType(bo.Right.ClrType)) {
1462
if (!
TypeSystem
.IsSequenceType(expr.ClrType)) {
SqlClient\Query\SqlFlattener.cs (1)
176
if (
TypeSystem
.IsSequenceType(gex.ClrType)) {
SqlClient\Query\SqlMethodCallConverter.cs (11)
205
if (mc.Method.Name == "GetValueOrDefault" &&
TypeSystem
.IsNullableType(mc.Object.ClrType)) {
665
Type leftType =
TypeSystem
.GetNonNullableType(bo.Left.ClrType);
1222
Type nnType =
TypeSystem
.GetNonNullableType(expr.ClrType);
1272
(
TypeSystem
.GetNonNullableType(targetType) ==
TypeSystem
.GetNonNullableType(expr.ClrType))) {
1285
bool resultNullable =
TypeSystem
.IsNullableType(bo.ClrType);
1286
Type rightType =
TypeSystem
.GetNonNullableType(bo.Right.ClrType);
1309
Debug.Assert(
TypeSystem
.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset));
1363
return
TypeSystem
.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset) ?
1380
} else if (
TypeSystem
.GetNonNullableType(bo.Left.ClrType) == typeof(DateTimeOffset)) {
2168
Type baseClrTypeOfExpr =
TypeSystem
.GetNonNullableType(exp.ClrType);
SqlClient\Query\SqlMultiplexer.cs (1)
241
if (expr.ClrType.IsValueType && !
TypeSystem
.IsNullableType(expr.ClrType)) {
SqlClient\Query\SqlRetyper.cs (2)
39
from = System.Data.Linq.SqlClient.
TypeSystem
.GetNonNullableType(from);
40
to = System.Data.Linq.SqlClient.
TypeSystem
.GetNonNullableType(to);
SqlClient\Query\SqlSupersetValidator.cs (2)
41
if (
TypeSystem
.GetNonNullableType(col.ClrType) !=
TypeSystem
.GetNonNullableType(expr.ClrType)) {
SqlClient\Query\SqlTypeConverter.cs (2)
78
Type oldClrType =
TypeSystem
.GetNonNullableType(uo.Operand.ClrType);
79
Type newClrType =
TypeSystem
.GetNonNullableType(uo.ClrType);
SqlClient\Query\Translator.cs (4)
165
Type elementType =
TypeSystem
.GetElementType(source.Type);
231
if (exp.Type != m.Expression.Type && m.Member.Name == "Count" &&
TypeSystem
.IsSequenceType(exp.Type)) {
232
return Expression.Call(typeof(Enumerable), "Count", new Type[] {
TypeSystem
.GetElementType(exp.Type)}, exp);
254
Type memberType =
TypeSystem
.GetMemberType(metaMember.Member);
SqlClient\Query\TypeSource.cs (4)
44
type =
TypeSystem
.GetElementType(type);
50
if (sourceType != null &&
TypeSystem
.GetNonNullableType(sourceType).IsValueType) {
53
if (sourceType != null &&
TypeSystem
.HasIEnumerable(sourceType)) {
140
type =
TypeSystem
.GetNonNullableType(type); // Emulate CLR's behavior: strip nullability from type.
SqlClient\Reader\ObjectReaderCompiler.cs (30)
826
System.Diagnostics.Debug.Assert(
TypeSystem
.IsNullableType(u.Operand.ClrType));
842
System.Diagnostics.Debug.Assert(
TypeSystem
.IsNullableType(actualType));
867
Type elemType =
TypeSystem
.GetElementType(ca.ClrType);
917
if (mc.Object != null &&
TypeSystem
.IsNullableType(mc.Object.ClrType) && callOpCode == OpCodes.Callvirt){
1055
Type memberType =
TypeSystem
.GetMemberType(m);
1111
Type memberType =
TypeSystem
.GetMemberType(m);
1157
Type memberType =
TypeSystem
.GetMemberType(m);
1219
Type memberType =
TypeSystem
.GetMemberType(m);
1277
Type memberType =
TypeSystem
.GetMemberType(m);
1352
MethodInfo miCreateGroup =
TypeSystem
.FindStaticMethod(orbType, "CreateGroup", new Type[] { typeArgs[0], typeof(IEnumerable<>).MakeGenericType(typeArgs[1]) }, typeArgs);
1371
?
TypeSystem
.GetElementType(link.Member.Type)
1421
Type clientElementType = cq.Query.NodeType == SqlNodeType.Multiset ?
TypeSystem
.GetElementType(cq.ClrType) : cq.ClrType;
1437
if (clrType.IsValueType && !
TypeSystem
.IsNullableType(clrType)) {
1575
Type elemType =
TypeSystem
.GetElementType(actualType);
1576
Type seqType =
TypeSystem
.GetSequenceType(elemType);
1597
TypeSystem
.GetNonNullableType(elementType) ==
TypeSystem
.GetNonNullableType(genExpectedTypeArgs[0])
1600
MethodInfo miCast =
TypeSystem
.FindSequenceMethod("Cast", new Type[] { seqType }, genExpectedTypeArgs[0]);
1607
MethodInfo miConvert =
TypeSystem
.FindStaticMethod(orbType, "Convert", new Type[] { seqType }, genExpectedTypeArgs[0]);
1615
MethodInfo miFirst =
TypeSystem
.FindSequenceMethod("SingleOrDefault", new Type[] { seqType }, expectedType);
1620
else if (
TypeSystem
.IsNullableType(expectedType) &&
1621
TypeSystem
.GetNonNullableType(expectedType) == actualType) {
1627
else if (
TypeSystem
.IsNullableType(actualType) &&
1628
TypeSystem
.GetNonNullableType(actualType) == expectedType) {
1651
MethodInfo miFirst =
TypeSystem
.FindSequenceMethod("SingleOrDefault", new Type[] { seqType }, elemType);
1667
MethodInfo miAsQueryable =
TypeSystem
.FindQueryableMethod("AsQueryable", new Type[] { typeof(IEnumerable) });
1685
MethodInfo miAsQueryable =
TypeSystem
.FindQueryableMethod("AsQueryable", new Type[] { seqType }, elemType);
1701
MethodInfo miCreateOrderedEnumerable =
TypeSystem
.FindStaticMethod(orbType, "CreateOrderedEnumerable", new Type[] { seqType }, elemType);
1748
MethodInfo miToArray =
TypeSystem
.FindSequenceMethod("ToArray", new Type[] { seqType }, elemType);
2080
if (!throwIfNotNullable ||
TypeSystem
.IsNullableType(type)) {
SqlClient\SqlProvider.cs (12)
828
factory = this.GetReaderFactory(qi.Query,
TypeSystem
.GetElementType(qi.ResultType));
838
QueryInfo[] qis = this.BuildQuery(ResultShape.Sequence,
TypeSystem
.GetSequenceType(elementType), query, parameters, annotations);
910
factory = this.GetReaderFactory(qi.Query,
TypeSystem
.GetElementType(qi.ResultType));
970
Type clientElementType = cq.Query.NodeType == SqlNodeType.Multiset ?
TypeSystem
.GetElementType(cq.ClrType) : cq.ClrType;
1018
typeof(SequenceOfOne<>).MakeGenericType(
TypeSystem
.GetElementType(this.GetResultType(query))),
1068
sequenceMethod =
TypeSystem
.FindSequenceMethod(mce.Method.Name, sequence);
1072
sequenceMethod =
TypeSystem
.FindSequenceMethod("Single", sequence);
1077
sequenceMethod =
TypeSystem
.FindSequenceMethod("SingleOrDefault", sequence);
1105
typeof(OneTimeEnumerable<>).MakeGenericType(
TypeSystem
.GetElementType(queryInfo.ResultType)),
1116
typeof(SingleResult<>).MakeGenericType(
TypeSystem
.GetElementType(queryInfo.ResultType)),
1668
if (
TypeSystem
.IsSimpleType(rowType.Type)) {
1680
Type resultType =
TypeSystem
.GetSequenceType(rowType.Type);