112 references to ResourcePropertyKind
System.Data.Services (112)
System\Data\Services\DataService.cs (7)
1048
description.Property.Kind ==
ResourcePropertyKind
.ResourceSetReference,
1075
Debug.Assert(description.Property.Kind ==
ResourcePropertyKind
.ResourceSetReference, "Expecting POST resource set property");
1108
else if (description.LinkUri && description.Property.Kind !=
ResourcePropertyKind
.ResourceReference)
1122
else if (description.Property != null && description.Property.IsOfKind(
ResourcePropertyKind
.Key))
1207
if (description.Property != null && description.Property.IsOfKind(
ResourcePropertyKind
.Key))
1635
if (description.Property.Kind ==
ResourcePropertyKind
.ResourceReference)
1641
Debug.Assert(description.Property.Kind ==
ResourcePropertyKind
.ResourceSetReference, "expecting collection nav properties");
System\Data\Services\Parsing\RequestQueryParser.cs (2)
2084
bool singleResult = property.Kind ==
ResourcePropertyKind
.ResourceReference;
2100
property.Kind ==
ResourcePropertyKind
.ResourceSetReference);
System\Data\Services\Providers\BasicExpandProvider.cs (2)
1084
child.AssignTypeForExpected(segmentType, property.Kind !=
ResourcePropertyKind
.ResourceSetReference);
1262
if (property.Kind ==
ResourcePropertyKind
.ResourceSetReference)
System\Data\Services\Providers\EntityPropertyMappingInfo.cs (2)
203
if (!resourceProperty.IsOfKind(currentSegment == srcPathSegments.Length - 1 ?
ResourcePropertyKind
.Primitive :
ResourcePropertyKind
.ComplexType))
System\Data\Services\Providers\ObjectContextServiceProvider.cs (14)
750
if (!property.IsOfKind(
ResourcePropertyKind
.Key))
1395
ResourcePropertyKind
kind = (
ResourcePropertyKind
)(-1);
1411
kind =
ResourcePropertyKind
.Key |
ResourcePropertyKind
.Primitive;
1415
kind =
ResourcePropertyKind
.Primitive;
1420
kind =
ResourcePropertyKind
.ComplexType;
1424
kind =
ResourcePropertyKind
.ResourceReference;
1428
kind =
ResourcePropertyKind
.ResourceSetReference;
2126
if (resourceProperty.IsOfKind(
ResourcePropertyKind
.ComplexType) && propertyInformation.PathGiven)
2158
if (resourceProperty.IsOfKind(
ResourcePropertyKind
.ComplexType))
2175
if (resourceProperty.IsOfKind(
ResourcePropertyKind
.ComplexType))
2259
if (subProperty.IsOfKind(
ResourcePropertyKind
.ComplexType))
2412
if (resourceProperty.Kind ==
ResourcePropertyKind
.ResourceReference)
System\Data\Services\Providers\ReflectionServiceProvider.cs (15)
628
ResourcePropertyKind
kind = (
ResourcePropertyKind
)(-1);
666
kind =
ResourcePropertyKind
.Key |
ResourcePropertyKind
.Primitive;
671
kind =
ResourcePropertyKind
.Key |
ResourcePropertyKind
.Primitive;
675
kind =
ResourcePropertyKind
.Primitive;
680
kind =
ResourcePropertyKind
.Primitive;
685
kind =
ResourcePropertyKind
.ComplexType;
689
kind = collection ?
ResourcePropertyKind
.ResourceSetReference :
ResourcePropertyKind
.ResourceReference;
700
kind =
ResourcePropertyKind
.ComplexType;
705
kind = collection ?
ResourcePropertyKind
.ResourceSetReference :
ResourcePropertyKind
.ResourceReference;
744
kind |=
ResourcePropertyKind
.ETag;
System\Data\Services\Providers\ResourceAssociationTypeEnd.cs (1)
75
if (this.fromProperty != null && this.fromProperty.Kind ==
ResourcePropertyKind
.ResourceReference)
System\Data\Services\Providers\ResourceProperty.cs (22)
34
private
ResourcePropertyKind
kind;
58
ResourcePropertyKind
kind,
142
public
ResourcePropertyKind
Kind
189
if (this.Kind ==
ResourcePropertyKind
.ResourceSetReference)
223
internal bool IsOfKind(
ResourcePropertyKind
checkKind)
234
private static bool IsOfKind(
ResourcePropertyKind
propertyKind,
ResourcePropertyKind
kind)
244
private static void CheckResourcePropertyKind(
ResourcePropertyKind
kind, string parameterName)
247
if (kind !=
ResourcePropertyKind
.ResourceReference &&
248
kind !=
ResourcePropertyKind
.ResourceSetReference &&
249
kind !=
ResourcePropertyKind
.ComplexType &&
250
kind !=
ResourcePropertyKind
.Primitive &&
251
kind != (
ResourcePropertyKind
.Primitive |
ResourcePropertyKind
.Key) &&
252
kind != (
ResourcePropertyKind
.Primitive |
ResourcePropertyKind
.ETag))
263
private static void ValidatePropertyParameters(
ResourcePropertyKind
kind, ResourceType propertyResourceType)
267
if (IsOfKind(kind,
ResourcePropertyKind
.ResourceReference) || IsOfKind(kind,
ResourcePropertyKind
.ResourceSetReference))
275
if (IsOfKind(kind,
ResourcePropertyKind
.Primitive))
283
if (IsOfKind(kind,
ResourcePropertyKind
.ComplexType))
291
if (IsOfKind(kind,
ResourcePropertyKind
.Key) && Nullable.GetUnderlyingType(propertyResourceType.InstanceType) != null)
System\Data\Services\Providers\ResourceType.cs (10)
321
List<ResourceProperty> key = rootType.Properties.Where(p => p.IsOfKind(
ResourcePropertyKind
.Key)).ToList();
351
ReadOnlyCollection<ResourceProperty> etag = new ReadOnlyCollection<ResourceProperty>(this.Properties.Where(p => p.IsOfKind(
ResourcePropertyKind
.ETag)).ToList());
852
if (!deserializer.IsUpdateOperation || clientProp == null || !clientProp.IsOfKind(
ResourcePropertyKind
.Key))
871
Debug.Assert(key[0].IsOfKind(
ResourcePropertyKind
.Key), "must be key property");
874
property.Kind = property.Kind ^
ResourcePropertyKind
.Key;
1058
if (property.IsOfKind(
ResourcePropertyKind
.Key))
1071
Debug.Assert(!property.IsOfKind(
ResourcePropertyKind
.ETag), "This check must have been done in ResourceProperty.ValidatePropertyParameters method");
1072
Debug.Assert(property.IsOfKind(
ResourcePropertyKind
.Primitive), "This check must have been done in ResourceProperty.ValidatePropertyParameters method");
1075
if (property.IsOfKind(
ResourcePropertyKind
.ETag))
1226
if (this.propertiesDeclaredOnThisType.Where(p => p.IsOfKind(
ResourcePropertyKind
.Key)).FirstOrDefault() == null)
System\Data\Services\RequestQueryProcessor.cs (3)
431
bool singleResult = property.Kind ==
ResourcePropertyKind
.ResourceReference;
454
if (!keyProp.IsOfKind(
ResourcePropertyKind
.Key))
1062
if (!keyProp.IsOfKind(
ResourcePropertyKind
.Key))
System\Data\Services\RequestUriProcessor.cs (11)
128
projectedProperty.Kind !=
ResourcePropertyKind
.ResourceSetReference) ||
849
ResourcePropertyKind
propertyKind = segment.ProjectedProperty.Kind;
850
segment.SingleResult = (propertyKind !=
ResourcePropertyKind
.ResourceSetReference);
879
case
ResourcePropertyKind
.ComplexType:
882
case
ResourcePropertyKind
.ResourceReference:
883
case
ResourcePropertyKind
.ResourceSetReference:
893
Debug.Assert(segment.ProjectedProperty.IsOfKind(
ResourcePropertyKind
.Primitive), "must be primitive type property");
1114
Debug.Assert(property.Kind !=
ResourcePropertyKind
.ResourceSetReference, "property != ResourcePropertyKind.ResourceSetReference");
1133
Debug.Assert(property.Kind ==
ResourcePropertyKind
.ResourceSetReference, "property == ResourcePropertyKind.ResourceSetReference");
1197
Debug.Assert(property != null && property.Kind ==
ResourcePropertyKind
.ResourceSetReference && !property.CanReflectOnInstanceTypeProperty, "property != null && property.Kind == ResourcePropertyKind.ResourceSetReference && !property.CanReflectOnInstanceTypeProperty");
1224
Debug.Assert(keyProperty.IsOfKind(
ResourcePropertyKind
.Key), "keyProperty.IsOfKind(ResourcePropertyKind.Key)");
System\Data\Services\Serializers\Deserializer.cs (1)
751
Debug.Assert(requestDescription.Property.Kind ==
ResourcePropertyKind
.ResourceSetReference, "Expecting POST resource set property");
System\Data\Services\Serializers\JsonDeserializer.cs (3)
568
if (!this.Update || !resourceProperty.IsOfKind(
ResourcePropertyKind
.Key))
790
if (resourceProperty.Kind ==
ResourcePropertyKind
.ResourceReference)
802
else if (resourceProperty.Kind ==
ResourcePropertyKind
.ResourceSetReference)
System\Data\Services\Serializers\JsonSerializer.cs (1)
786
objectIsResource || !property.IsOfKind(
ResourcePropertyKind
.Key),
System\Data\Services\Serializers\MetadataSerializer.cs (3)
508
else if (resourceProperty.Kind ==
ResourcePropertyKind
.ComplexType)
559
Debug.Assert(resourceProperty.IsOfKind(
ResourcePropertyKind
.Primitive), "property must be of primitive type");
562
if (resourceProperty.IsOfKind(
ResourcePropertyKind
.Key) || (resourceProperty.Type.IsValueType && Nullable.GetUnderlyingType(resourceProperty.Type) == null))
System\Data\Services\Serializers\PlainXmlDeserializer.cs (1)
443
if (this.Update && property.IsOfKind(
ResourcePropertyKind
.Key))
System\Data\Services\Serializers\Serializer.cs (3)
516
if ((property.Kind & (
ResourcePropertyKind
.ResourceReference |
ResourcePropertyKind
.ResourceSetReference)) != 0)
745
Debug.Assert(property.IsOfKind(
ResourcePropertyKind
.Key), "must be key property");
System\Data\Services\Serializers\SyndicationDeserializer.cs (7)
201
if (property.Kind ==
ResourcePropertyKind
.ResourceReference)
486
if (property != null && property.Kind ==
ResourcePropertyKind
.ResourceSetReference)
504
if (property != null && property.Kind ==
ResourcePropertyKind
.ResourceReference)
517
if (property.Kind ==
ResourcePropertyKind
.ResourceReference)
634
if (property.Kind !=
ResourcePropertyKind
.ResourceReference)
651
if (property.Kind !=
ResourcePropertyKind
.ResourceSetReference)
668
propertySegment.ProjectedProperty.Kind ==
ResourcePropertyKind
.ResourceSetReference)
System\Data\Services\Serializers\SyndicationSerializer.cs (4)
1045
navProperty.IsOfKind(
ResourcePropertyKind
.ResourceReference) ||
1046
navProperty.IsOfKind(
ResourcePropertyKind
.ResourceSetReference),
1050
string linkType = navProperty.IsOfKind(
ResourcePropertyKind
.ResourceReference) ? XmlConstants.AtomEntryElementName : XmlConstants.AtomFeedElementName;
1086
if (navProperty.IsOfKind(
ResourcePropertyKind
.ResourceSetReference))