117 references to ResourceTypeKind
System.Data.Services (117)
System\Data\Services\DataService.cs (5)
1433
switch (resourceType.
ResourceTypeKind
)
1458
Debug.Assert(ResourceTypeKind.EntityType == resourceType.
ResourceTypeKind
, "ResourceTypeKind.EntityType == " + resourceType.
ResourceTypeKind
);
1532
if (openTypeParentResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
1539
Debug.Assert(openTypeParentResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "Entity Type expected");
System\Data\Services\DataServiceConfiguration.cs (1)
455
if (resourceType.
ResourceTypeKind
!= ResourceTypeKind.ComplexType)
System\Data\Services\Epm\EpmContentSerializer.cs (1)
266
switch (node.ResourceType.
ResourceTypeKind
)
System\Data\Services\Internal\NeedSkipTokenVisitor.cs (1)
167
this.property != null && this.property.ResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive,
System\Data\Services\Parsing\RequestQueryParser.cs (2)
79
Debug.Assert(typeForIt.
ResourceTypeKind
!= ResourceTypeKind.EntityType || setForIt != null, "setForIt cannot be null if typeForIt is an entity type.");
103
Debug.Assert(typeForIt.
ResourceTypeKind
!= ResourceTypeKind.EntityType || setForIt != null, "setForIt cannot be null if typeForIt is an entity type.");
System\Data\Services\Providers\BaseServiceProvider.cs (3)
793
(resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType ||
794
resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)))
822
if (resourceType != null && resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
System\Data\Services\Providers\DataServiceProviderWrapper.cs (2)
809
Debug.Assert(resourceType != null && resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "Resource should be non-null and of an entity type");
827
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
System\Data\Services\Providers\ObjectContextServiceProvider.cs (8)
360
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "resourceType.ResourceTypeKind == ResourceTypeKind.EntityType - expecting an entity type");
367
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType - expecting a complex type");
422
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
452
else if (resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
892
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
2744
if (property.ResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
2778
if (resultType != null && resultType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
2785
resultType == null || resultType.
ResourceTypeKind
!= ResourceTypeKind.EntityType ||
System\Data\Services\Providers\ReflectionServiceProvider.cs (15)
79
Debug.Assert(targetType != null && targetType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "targetType != null && targetType.ResourceTypeKind == ResourceTypeKind.EntityType");
559
else if (baseResourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
652
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
655
if (parentResourceType.BaseType == null && parentResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType && IsPropertyKeyProperty(property, out currentKeyKind))
683
else if (resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
687
else if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
698
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
704
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "Must be an entity type");
714
(resourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType && collection) ||
715
(resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType && parentResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType))
733
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
762
if (parentResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType &&
847
resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
861
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
System\Data\Services\Providers\ResourceContainer.cs (1)
56
if (elementType.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
System\Data\Services\Providers\ResourceProperty.cs (5)
127
if (this.ResourceType.
ResourceTypeKind
!= ResourceTypeKind.Primitive)
180
return this.ResourceType.
ResourceTypeKind
;
269
if (propertyResourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
277
if (propertyResourceType.
ResourceTypeKind
!= ResourceTypeKind.Primitive)
285
if (propertyResourceType.
ResourceTypeKind
!= ResourceTypeKind.ComplexType)
System\Data\Services\Providers\ResourceType.cs (12)
336
(this.
ResourceTypeKind
!= ResourceTypeKind.EntityType && this.keyProperties.Count == 0) ||
337
(this.
ResourceTypeKind
== ResourceTypeKind.EntityType && this.keyProperties.Count > 0),
619
if (this.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
658
if (this.BaseType.IsOpenType && this.
ResourceTypeKind
!= ResourceTypeKind.ComplexType)
788
(!deserializer.Service.Configuration.EnableTypeConversion && clientProp.ResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive))
799
if (propertyType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
820
switch (propertyType.
ResourceTypeKind
)
846
propertyType.
ResourceTypeKind
== ResourceTypeKind.Primitive,
847
"property.TypeKind == ResourceTypeKind.Primitive -- metadata shouldn't return " + propertyType.
ResourceTypeKind
);
1065
if (this.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
1077
if (this.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
1224
else if (this.
ResourceTypeKind
== ResourceTypeKind.EntityType)
System\Data\Services\Providers\ServiceOperation.cs (2)
78
if ((resultType == null || resultType.
ResourceTypeKind
!= ResourceTypeKind.EntityType) && resultSet != null)
83
if (resultType != null && resultType.
ResourceTypeKind
== ResourceTypeKind.EntityType && (resultSet == null || !resultSet.ResourceType.IsAssignableFrom(resultType)))
System\Data\Services\Providers\ServiceOperationParameter.cs (1)
41
if (parameterType.
ResourceTypeKind
!= ResourceTypeKind.Primitive)
System\Data\Services\RequestQueryProcessor.cs (1)
725
if (this.description.TargetResourceType == null || (this.description.TargetResourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType))
System\Data\Services\RequestUriProcessor.cs (2)
1263
switch (type.
ResourceTypeKind
)
1270
Debug.Assert(type.
ResourceTypeKind
== ResourceTypeKind.Primitive, "typeKind == ResourceTypeKind.Primitive");
System\Data\Services\Serializers\Deserializer.cs (2)
1012
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "resourceType.ResourceTypeKind == ResourceTypeKind.EntityType");
1105
if (WebUtil.GetNonPrimitiveResourceType(provider, requestValue).
ResourceTypeKind
== ResourceTypeKind.ComplexType)
System\Data\Services\Serializers\JsonDeserializer.cs (9)
380
targetResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType || targetResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType,
394
Debug.Assert((resourceType != null && resourceType.
ResourceTypeKind
!= ResourceTypeKind.Primitive) || uri != null, "Either uri or resource type must be specified");
396
if ((uri != null || resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType) && segmentInfo.TargetKind == RequestTargetKind.OpenProperty)
403
if ((resourceType != null && resourceType.
ResourceTypeKind
!= ResourceTypeKind.ComplexType) ||
464
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
649
if (openPropertyResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
655
Debug.Assert(openPropertyResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "resource must be of entity type");
715
if (targetType == null || targetType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
System\Data\Services\Serializers\JsonSerializer.cs (8)
391
Debug.Assert(uriPath != null || resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "uri can be null for complex types");
397
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
550
switch (resourceType.
ResourceTypeKind
)
588
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive, "resourceType.ResourceTypeKind == ResourceTypeKind.Primitive");
623
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "resource must be entity type");
637
Debug.Assert(resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "resource must be complex type");
767
Debug.Assert(resourceType.
ResourceTypeKind
!= ResourceTypeKind.Primitive, "resourceType.ResourceTypeKind == ResourceTypeKind.Primitive");
776
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
System\Data\Services\Serializers\MetadataSerializer.cs (9)
163
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
293
if (ResourceTypeKind.EntityType == type.
ResourceTypeKind
)
299
Debug.Assert(ResourceTypeKind.ComplexType == type.
ResourceTypeKind
, "this must be a complex type");
319
Debug.Assert(entityType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "Type must be entityType");
446
Debug.Assert(complexType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "Type must be complexType");
496
if (type.
ResourceTypeKind
== ResourceTypeKind.EntityType &&
979
if (property.ResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
1187
if (resultType != null && resultType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
1194
resultType == null || resultType.
ResourceTypeKind
!= ResourceTypeKind.EntityType ||
System\Data\Services\Serializers\PlainXmlDeserializer.cs (6)
166
segmentInfo.ProjectedProperty.ResourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType,
486
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
511
(!this.Service.Configuration.EnableTypeConversion && resourceProperty.ResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive);
532
switch (propertyType.
ResourceTypeKind
)
580
propertyType.
ResourceTypeKind
== ResourceTypeKind.Primitive,
581
"property.TypeKind == ResourceTypeKind.Primitive -- metadata shouldn't return " + propertyType.
ResourceTypeKind
);
System\Data\Services\Serializers\PlainXmlSerializer.cs (7)
324
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
330
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
337
Debug.Assert(propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "EntityType expected.");
374
Debug.Assert(expectedType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "Must be complex type");
413
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
420
resourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType,
421
"resourceType.ResourceTypeKind == ResourceTypeKind.ComplexType -- POX doesn't support " + resourceType.
ResourceTypeKind
);
System\Data\Services\Serializers\Serializer.cs (1)
461
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
System\Data\Services\Serializers\SyndicationDeserializer.cs (2)
357
if (currentResourceType.
ResourceTypeKind
!= ResourceTypeKind.EntityType)
381
Debug.Assert(currentResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType, "only expecting entity types");
System\Data\Services\Serializers\SyndicationSerializer.cs (11)
203
resourcePropertyType.
ResourceTypeKind
== ResourceTypeKind.EntityType,
407
Debug.Assert(expectedType.
ResourceTypeKind
== ResourceTypeKind.ComplexType, "Must be complex type");
752
if (absoluteUri == null && resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
764
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)
901
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
912
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
926
propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType,
991
if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.Primitive)
1005
else if (propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.ComplexType)
1028
propertyResourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType,
1037
if (resourceType.
ResourceTypeKind
== ResourceTypeKind.EntityType)