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