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