52 references to InstanceType
System.Data.Services (52)
System\Data\Services\DataServiceConfiguration.cs (4)
906
Type lambdaType = typeof(Func<,>).MakeGenericType(container.ResourceType.
InstanceType
, typeof(bool));
915
Type nullableLambdaType = typeof(Func<,>).MakeGenericType(container.ResourceType.
InstanceType
, typeof(bool?));
1055
if (!elementParameterType.IsAssignableFrom(container.ResourceType.
InstanceType
))
1062
container.ResourceType.
InstanceType
);
System\Data\Services\Internal\NeedSkipTokenVisitor.cs (1)
182
if (this.rt != null && p.Type != this.rt.
InstanceType
)
System\Data\Services\Parsing\FunctionDescription.cs (3)
286
primitiveTypes[i].
InstanceType
!= typeof(Type),
289
primitiveTypes[i].
InstanceType
!= typeof(object),
291
castSignatures.Add(new FunctionDescription(FunctionNameCast, new Type[] { primitiveTypes[i].
InstanceType
, typeof(Type) }, FunctionDescription.BinaryCast));
System\Data\Services\Parsing\RequestQueryParser.cs (3)
106
Debug.Assert(typeForIt.
InstanceType
== queryElementType, "typeForIt.InstanceType == queryElementType");
275
ParameterExpression element = Expression.Parameter(this.typeForIt.
InstanceType
, "element");
2503
value = resourceType.
InstanceType
;
System\Data\Services\Providers\BasicExpandProvider.cs (5)
1083
Type segmentType = property.ResourceType.
InstanceType
;
1253
Debug.Assert(resourceType.
InstanceType
.IsAssignableFrom(source.Type), "Trying to access a property on expression of a wrong type.");
1264
MethodInfo getter = DataServiceProviderMethods.GetSequenceValueMethodInfo.MakeGenericMethod(property.ResourceType.
InstanceType
);
1568
Expression sourceExpression = Expression.TypeAs(source, resourceType.
InstanceType
);
1696
(Expression)Expression.TypeIs(source, resourceType.
InstanceType
) :
System\Data\Services\Providers\ObjectContextServiceProvider.cs (6)
255
if (set.Value.ResourceType.
InstanceType
.IsAssignableFrom(source.ElementType))
352
if (resourceType.
InstanceType
.IsAbstract)
361
resource = CreateObject(this.ObjectContext, resourceType.
InstanceType
);
426
object newInstance = CreateObject(this.ObjectContext, resourceType.
InstanceType
);
1396
PropertyInfo propertyInfo = resourceType.
InstanceType
.GetProperty(member.Name);
2353
MethodInfo genericMethod = typeof(ObjectContext).GetMethod("CreateQuery", WebUtil.PublicInstanceBindingFlags).MakeGenericMethod(container.ResourceType.
InstanceType
);
System\Data\Services\Providers\ReflectionServiceProvider.cs (8)
81
ResourceSet targetSet = InternalGetContainerForResourceType(targetType.
InstanceType
, this.EntitySets.Values);
266
Type entitySetType = entitySetInfo.Value.ResourceType.
InstanceType
;
611
HashSet<string> propertiesToBeIgnored = new HashSet<string>(IgnorePropertiesAttribute.GetProperties(parentResourceType.
InstanceType
, false /*inherit*/, bindingFlags), StringComparer.Ordinal);
617
PropertyInfo[] properties = parentResourceType.
InstanceType
.GetProperties(bindingFlags);
816
if (entitySetInfo.ResourceType.
InstanceType
.IsAssignableFrom(type))
866
Assembly assembly = resourceType.
InstanceType
.Assembly;
891
if (rootTypes[i].
InstanceType
.IsAssignableFrom(type))
921
ETagAttribute[] attributes = (ETagAttribute[])resourceType.
InstanceType
.GetCustomAttributes(typeof(ETagAttribute), inherit);
System\Data\Services\Providers\ResourceProperty.cs (3)
191
return typeof(System.Collections.Generic.IEnumerable<>).MakeGenericType(this.propertyResourceType.
InstanceType
);
195
return this.propertyResourceType.
InstanceType
;
291
if (IsOfKind(kind, ResourcePropertyKind.Key) && Nullable.GetUnderlyingType(propertyResourceType.
InstanceType
) != null)
System\Data\Services\Providers\ResourceType.cs (5)
453
WebUtil.CreateNewInstanceConstructor(this.
InstanceType
, this.FullName, typeof(object));
583
if (resourceType.
InstanceType
== type)
707
foreach (EntityPropertyMappingAttribute epmAttr in currentResourceType.
InstanceType
.GetCustomAttributes(typeof(EntityPropertyMappingAttribute), currentResourceType.BaseType != null ? false : true))
849
currentValue = PlainXmlDeserializer.ConvertValuesForXml(propertyValue, currentSegment, propertyType.
InstanceType
);
1111
propertyInfo = this.
InstanceType
.GetProperty(resourceProperty.Name, bindingFlags);
System\Data\Services\RequestQueryProcessor.cs (4)
438
ParameterExpression p = Expression.Parameter(resourceType.
InstanceType
, "p");
925
ParameterExpression p = Expression.Parameter(this.description.LastSegmentInfo.TargetResourceType.
InstanceType
, "it");
1071
Debug.Assert(this.query.ElementType == rt.
InstanceType
, "Resource type should match query element type when in this function");
1078
ParameterExpression elementParameter = Expression.Parameter(rt.
InstanceType
, "element");
System\Data\Services\RequestUriProcessor.cs (1)
1069
Type parameterType = operation.Parameters[i].ParameterType.
InstanceType
;
System\Data\Services\Serializers\JsonSerializer.cs (1)
764
(resourceType.
InstanceType
.IsAssignableFrom(customObject.GetType())),
System\Data\Services\Serializers\PlainXmlDeserializer.cs (1)
588
propertyValue = PlainXmlDeserializer.ConvertValuesForXml(propertyValue, propertyName, propertyType.
InstanceType
);
System\Data\Services\Serializers\PlainXmlSerializer.cs (2)
332
Debug.Assert(propertyResourceType.
InstanceType
== value.GetType(), "propertyResourceType.Type == valueType");
387
Debug.Assert(!expectedType.
InstanceType
.IsValueType, "!expectedType.Type.IsValueType -- checked in the resource type constructor.");
System\Data\Services\Serializers\SyndicationSerializer.cs (2)
416
Debug.Assert(!expectedType.
InstanceType
.IsValueType, "!expectedType.Type.IsValueType -- checked in the resource type constructor.");
914
Debug.Assert(propertyResourceType.
InstanceType
== valueType, "propertyResourceType.Type == valueType");
System\Data\Services\WebUtil.cs (3)
344
if (valueType.
InstanceType
== mapping.Key)
353
if (valueType.
InstanceType
== mapping.Key)
798
if (type.
InstanceType
== elementType)