189 references to RequestTargetKind
System.Data.Services (189)
System\Data\Services\DataService.cs (38)
519
bool allowStrongEtag = description.TargetKind ==
RequestTargetKind
.MediaResource;
664
Debug.Assert(description.TargetKind ==
RequestTargetKind
.Metadata, "This method can only be called from the $metadata path because it enumerates through all resource types.");
704
if (description.TargetKind ==
RequestTargetKind
.Metadata)
734
else if (description.TargetKind ==
RequestTargetKind
.ServiceDirectory)
797
else if (description.TargetKind ==
RequestTargetKind
.VoidServiceOperation)
863
if (description.TargetKind ==
RequestTargetKind
.MediaResource)
883
description.LinkUri ?
RequestTargetKind
.Link : description.TargetKind,
946
RequestTargetKind
targetKind,
953
if (targetKind ==
RequestTargetKind
.PrimitiveValue)
957
else if (targetKind ==
RequestTargetKind
.MediaResource)
963
else if (targetKind !=
RequestTargetKind
.OpenPropertyValue)
965
bool entityTarget = targetKind ==
RequestTargetKind
.Resource;
1114
if (!String.IsNullOrEmpty(host.RequestIfNoneMatch) && description.TargetKind !=
RequestTargetKind
.MediaResource)
1153
else if (description.IsSingleResult && description.TargetKind ==
RequestTargetKind
.Resource)
1196
else if (description.TargetKind ==
RequestTargetKind
.PrimitiveValue)
1229
else if (description.TargetKind ==
RequestTargetKind
.OpenProperty)
1234
else if (description.TargetKind ==
RequestTargetKind
.OpenPropertyValue)
1274
if (description.TargetKind ==
RequestTargetKind
.Metadata)
1283
else if (description.TargetKind ==
RequestTargetKind
.ServiceDirectory)
1356
else if (RequestDescription.IsETagHeaderAllowed(description) && description.TargetKind !=
RequestTargetKind
.MediaResource)
1365
if (resource == null && description.TargetKind ==
RequestTargetKind
.Resource)
1421
description.TargetKind ==
RequestTargetKind
.OpenProperty ||
1422
description.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
1423
description.TargetKind ==
RequestTargetKind
.MediaResource,
1431
bool rawValue = description.TargetKind ==
RequestTargetKind
.OpenPropertyValue || description.TargetKind ==
RequestTargetKind
.MediaResource;
1432
RequestTargetKind
targetKind;
1442
targetKind =
RequestTargetKind
.ComplexObject;
1449
targetKind =
RequestTargetKind
.PrimitiveValue;
1453
targetKind =
RequestTargetKind
.Primitive;
1472
targetKind =
RequestTargetKind
.Resource;
1480
targetKind =
RequestTargetKind
.Link;
1522
if (currentSegment.TargetKind ==
RequestTargetKind
.PrimitiveValue || currentSegment.TargetKind ==
RequestTargetKind
.OpenPropertyValue)
1528
if (currentSegment.TargetKind ==
RequestTargetKind
.OpenProperty)
1728
if (description.TargetKind !=
RequestTargetKind
.Batch)
1772
Debug.Assert(description.TargetKind !=
RequestTargetKind
.Batch, "description.TargetKind != RequestTargetKind.Batch");
2502
description.TargetKind ==
RequestTargetKind
.Resource || description.TargetSource == RequestTargetSource.ServiceOperation,
System\Data\Services\DataServiceConfiguration.cs (6)
630
description.TargetKind !=
RequestTargetKind
.Nothing,
633
description.TargetKind !=
RequestTargetKind
.VoidServiceOperation,
635
if (description.TargetKind ==
RequestTargetKind
.Metadata ||
636
description.TargetKind ==
RequestTargetKind
.ServiceDirectory)
640
else if (description.TargetKind ==
RequestTargetKind
.Batch)
675
if (description.TargetKind !=
RequestTargetKind
.MediaResource)
System\Data\Services\RequestDescription.cs (7)
106
internal RequestDescription(
RequestTargetKind
targetKind, RequestTargetSource targetSource, Uri resultUri)
245
internal
RequestTargetKind
TargetKind
288
return (this.segmentInfos.Length >= 3 && this.segmentInfos[this.segmentInfos.Length - 2].TargetKind ==
RequestTargetKind
.Link);
393
if (segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty &&
543
if (this.TargetKind ==
RequestTargetKind
.Resource)
574
if (this.segmentInfos[j].TargetKind ==
RequestTargetKind
.Resource || this.segmentInfos[j].HasKeyValues)
655
if (this.segmentInfos[idx].TargetKind ==
RequestTargetKind
.Link)
System\Data\Services\RequestQueryProcessor.cs (6)
105
description.TargetKind ==
RequestTargetKind
.Resource ||
106
description.TargetKind ==
RequestTargetKind
.OpenProperty ||
107
description.TargetKind ==
RequestTargetKind
.ComplexObject ||
110
this.setQueryApplicable = (description.TargetKind ==
RequestTargetKind
.Resource && !description.IsSingleResult) ||
119
this.pagingApplicable = (description.TargetKind ==
RequestTargetKind
.Resource && !description.IsSingleResult) &&
731
if (this.description.SegmentInfos.Any(si => si.TargetKind ==
RequestTargetKind
.Link))
System\Data\Services\RequestUriProcessor.cs (58)
82
RequestTargetKind
targetKind = (lastSegment == null) ?
RequestTargetKind
.ServiceDirectory : lastSegment.TargetKind;
87
if (targetKind ==
RequestTargetKind
.Metadata ||
88
targetKind ==
RequestTargetKind
.Batch ||
89
targetKind ==
RequestTargetKind
.ServiceDirectory)
93
else if (targetKind ==
RequestTargetKind
.VoidServiceOperation)
101
RequestTargetKind
.VoidServiceOperation, // targetKind
109
targetKind ==
RequestTargetKind
.ComplexObject ||
110
targetKind ==
RequestTargetKind
.OpenProperty ||
111
targetKind ==
RequestTargetKind
.OpenPropertyValue ||
112
targetKind ==
RequestTargetKind
.Primitive ||
113
targetKind ==
RequestTargetKind
.PrimitiveValue ||
114
targetKind ==
RequestTargetKind
.Resource ||
115
targetKind ==
RequestTargetKind
.MediaResource,
120
(lastSegment.TargetKind !=
RequestTargetKind
.PrimitiveValue &&
121
lastSegment.TargetKind !=
RequestTargetKind
.OpenPropertyValue &&
122
lastSegment.TargetKind !=
RequestTargetKind
.MediaResource) ?
387
if (description.TargetKind !=
RequestTargetKind
.Resource || !description.IsSingleResult || description.TargetSource != RequestTargetSource.EntitySet)
476
segment.TargetKind =
RequestTargetKind
.Metadata;
483
segment.TargetKind =
RequestTargetKind
.Batch;
558
segment.TargetKind =
RequestTargetKind
.VoidServiceOperation;
605
segment.TargetKind =
RequestTargetKind
.Resource;
689
else if (previous.TargetKind ==
RequestTargetKind
.Batch ||
690
previous.TargetKind ==
RequestTargetKind
.Metadata ||
691
previous.TargetKind ==
RequestTargetKind
.PrimitiveValue ||
692
previous.TargetKind ==
RequestTargetKind
.VoidServiceOperation ||
693
previous.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
694
previous.TargetKind ==
RequestTargetKind
.MediaResource)
705
else if (previous.TargetKind ==
RequestTargetKind
.Primitive)
718
segment.TargetKind =
RequestTargetKind
.PrimitiveValue;
720
else if (previous.TargetKind ==
RequestTargetKind
.Resource &&
726
segment.TargetKind =
RequestTargetKind
.Link;
731
previous.TargetKind ==
RequestTargetKind
.ComplexObject ||
732
previous.TargetKind ==
RequestTargetKind
.Resource ||
733
previous.TargetKind ==
RequestTargetKind
.OpenProperty ||
734
previous.TargetKind ==
RequestTargetKind
.Link,
737
postLinkSegment = (previous.TargetKind ==
RequestTargetKind
.Link);
762
Debug.Assert(previous.TargetKind ==
RequestTargetKind
.OpenProperty, "For open properties, the target resource type must be null");
767
Debug.Assert(previous.TargetKind !=
RequestTargetKind
.OpenProperty, "Since the query element type is known, this can't be open property");
774
if (previous.TargetKind !=
RequestTargetKind
.Resource)
791
segment.TargetKind =
RequestTargetKind
.PrimitiveValue;
796
(previous.TargetKind ==
RequestTargetKind
.OpenProperty || (previous.TargetKind ==
RequestTargetKind
.Resource)))
802
if (previous.TargetKind ==
RequestTargetKind
.OpenProperty)
804
segment.TargetKind =
RequestTargetKind
.OpenPropertyValue;
811
segment.TargetKind =
RequestTargetKind
.MediaResource;
831
if (previous.TargetKind ==
RequestTargetKind
.Link || hasQuery || service.OperationContext.Host.AstoriaHttpVerb == AstoriaVerbs.POST)
837
segment.TargetKind =
RequestTargetKind
.OpenProperty;
871
if (previous.TargetKind ==
RequestTargetKind
.Link &&
880
segment.TargetKind =
RequestTargetKind
.ComplexObject;
884
segment.TargetKind =
RequestTargetKind
.Resource;
894
segment.TargetKind =
RequestTargetKind
.Primitive;
934
if (segments.Length != 0 && previous.TargetKind ==
RequestTargetKind
.Link)
1258
/// <returns>An appropriate <see cref="
RequestTargetKind
"/> for the specified <paramref name="type"/>.</returns>
1259
private static
RequestTargetKind
TargetKindFromType(ResourceType type)
1266
return
RequestTargetKind
.ComplexObject;
1268
return
RequestTargetKind
.Resource;
1271
return
RequestTargetKind
.Primitive;
System\Data\Services\ResponseBodyWriter.cs (14)
72
if (this.requestDescription.TargetKind ==
RequestTargetKind
.MediaResource)
110
this.requestDescription.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
111
this.requestDescription.TargetKind ==
RequestTargetKind
.PrimitiveValue ||
112
this.requestDescription.TargetKind ==
RequestTargetKind
.MediaResource,
117
if (this.requestDescription.TargetKind ==
RequestTargetKind
.MediaResource)
132
this.requestDescription.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
133
this.requestDescription.TargetKind ==
RequestTargetKind
.PrimitiveValue,
144
Debug.Assert(this.requestDescription.TargetKind !=
RequestTargetKind
.PrimitiveValue, "this.requestDescription.TargetKind != RequestTargetKind.PrimitiveValue");
145
Debug.Assert(this.requestDescription.TargetKind !=
RequestTargetKind
.OpenPropertyValue, "this.requestDescription.TargetKind != RequestTargetKind.OpenPropertyValue");
146
Debug.Assert(this.requestDescription.TargetKind !=
RequestTargetKind
.Metadata, "this.requestDescription.TargetKind != RequestTargetKind.Metadata");
148
if (this.requestDescription.TargetKind ==
RequestTargetKind
.ServiceDirectory)
178
this.requestDescription.TargetKind ==
RequestTargetKind
.OpenProperty ||
179
this.requestDescription.TargetKind ==
RequestTargetKind
.Resource,
202
Debug.Assert(this.requestDescription.TargetKind ==
RequestTargetKind
.Metadata, "this.requestDescription.TargetKind == RequestTargetKind.Metadata");
System\Data\Services\SegmentInfo.cs (4)
50
private
RequestTargetKind
targetKind;
132
internal
RequestTargetKind
TargetKind
188
this.TargetKind ==
RequestTargetKind
.PrimitiveValue ||
189
this.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
System\Data\Services\Serializers\Deserializer.cs (26)
250
if (description.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
251
description.TargetKind ==
RequestTargetKind
.PrimitiveValue)
305
else if (description.TargetKind ==
RequestTargetKind
.MediaResource)
406
description.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
407
description.TargetKind ==
RequestTargetKind
.PrimitiveValue)
426
if (description.SegmentInfos[j].TargetKind ==
RequestTargetKind
.Resource ||
478
description.TargetKind ==
RequestTargetKind
.OpenProperty ||
479
description.TargetKind ==
RequestTargetKind
.OpenPropertyValue,
488
if (checkETag && !Deserializer.IsCrossReferencedSegment(description.SegmentInfos[modifyingResourceIndex], service) && description.TargetKind !=
RequestTargetKind
.MediaResource)
506
if (description.TargetKind ==
RequestTargetKind
.OpenProperty ||
507
description.TargetKind ==
RequestTargetKind
.OpenPropertyValue)
512
else if (description.TargetKind ==
RequestTargetKind
.MediaResource)
519
description.TargetKind ==
RequestTargetKind
.Primitive ||
520
description.TargetKind ==
RequestTargetKind
.ComplexObject ||
521
description.TargetKind ==
RequestTargetKind
.PrimitiveValue,
543
segmentInfo.TargetKind !=
RequestTargetKind
.OpenProperty &&
544
segmentInfo.TargetKind !=
RequestTargetKind
.OpenPropertyValue,
695
if (requestDescription.TargetKind ==
RequestTargetKind
.Resource)
856
result.TargetKind =
RequestTargetKind
.OpenProperty;
860
result.TargetKind =
RequestTargetKind
.Resource;
1085
if (requestDescription.TargetKind ==
RequestTargetKind
.PrimitiveValue ||
1086
requestDescription.TargetKind ==
RequestTargetKind
.Primitive ||
1087
requestDescription.TargetKind ==
RequestTargetKind
.OpenPropertyValue ||
1088
requestDescription.TargetKind ==
RequestTargetKind
.MediaResource ||
1089
requestDescription.TargetKind ==
RequestTargetKind
.ComplexObject)
1094
if (requestDescription.TargetKind ==
RequestTargetKind
.OpenProperty)
System\Data\Services\Serializers\JsonDeserializer.cs (14)
268
if (segment.TargetKind ==
RequestTargetKind
.Primitive ||
269
segment.TargetKind ==
RequestTargetKind
.OpenProperty ||
270
segment.TargetKind ==
RequestTargetKind
.ComplexObject)
278
else if (segment.TargetKind !=
RequestTargetKind
.OpenProperty)
343
if (segmentInfo.TargetKind ==
RequestTargetKind
.Primitive ||
345
(segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty && WebUtil.IsPrimitiveType(nonEntityResource.GetType())))
355
(segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty && WebUtil.IsPrimitiveType(jsonObject.GetType())) ||
356
segmentInfo.TargetKind ==
RequestTargetKind
.Primitive)
375
if (segmentInfo.TargetKind !=
RequestTargetKind
.OpenProperty)
396
if ((uri != null || resourceType.ResourceTypeKind == ResourceTypeKind.EntityType) && segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty)
473
if (segmentInfo.TargetKind ==
RequestTargetKind
.Resource)
491
Debug.Assert(segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty, "segmentInfo.TargetKind == RequestTargetKind.OpenProperty");
560
segmentInfo.TargetKind =
RequestTargetKind
.ComplexObject;
793
segmentInfo.TargetKind =
RequestTargetKind
.Resource;
System\Data\Services\Serializers\PlainXmlDeserializer.cs (4)
142
segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty ||
143
segmentInfo.TargetKind ==
RequestTargetKind
.ComplexObject ||
144
segmentInfo.TargetKind ==
RequestTargetKind
.Primitive,
158
if (segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty)
System\Data\Services\Serializers\PlainXmlSerializer.cs (2)
135
element != null || this.RequestDescription.TargetResourceType != null || this.RequestDescription.TargetKind ==
RequestTargetKind
.OpenProperty,
145
if (this.RequestDescription.TargetKind ==
RequestTargetKind
.OpenProperty)
System\Data\Services\Serializers\SyndicationDeserializer.cs (6)
367
if (segmentInfo.TargetKind ==
RequestTargetKind
.OpenProperty)
374
Debug.Assert(segmentInfo.TargetKind ==
RequestTargetKind
.Resource, "segmentInfo.TargetKind == RequestTargetKind.Resource");
406
if (segmentInfo.TargetKind ==
RequestTargetKind
.Resource)
644
Debug.Assert(propertySegment.TargetKind !=
RequestTargetKind
.OpenProperty, "Open navigation properties are not supported on OpenTypes.");
660
Debug.Assert(propertySegment.TargetKind !=
RequestTargetKind
.OpenProperty, "Open navigation properties are not supported on OpenTypes.");
677
propertySegment.TargetKind ==
RequestTargetKind
.Resource &&
System\Data\Services\Serializers\SyndicationSerializer.cs (2)
186
if (this.RequestDescription.TargetKind ==
RequestTargetKind
.OpenProperty)
232
if (this.RequestDescription.TargetKind !=
RequestTargetKind
.OpenProperty &&
System\Data\Services\WebUtil.cs (2)
463
else if (description.TargetKind ==
RequestTargetKind
.Resource ||
476
description.TargetKind !=
RequestTargetKind
.OpenProperty &&