public KeySegment(IEnumerable <KeyValuePair <string, object> > keys, IEdmEntityType edmType, IEdmNavigationSource navigationSource) { this.keys = new ReadOnlyCollection <KeyValuePair <string, object> >(keys.ToList()); this.edmType = edmType; this.navigationSource = navigationSource; // Check that the type they gave us is related to the type of the set if (navigationSource != null) { UriParserErrorHelper.ThrowIfTypesUnrelated(edmType, navigationSource.EntityType(), "KeySegments"); } }
public KeySegment(IEnumerable <KeyValuePair <string, object> > keys, IEdmEntityType edmType, IEdmEntitySet entitySet) { DebugUtils.CheckNoExternalCallers(); this.keys = new ReadOnlyCollection <KeyValuePair <string, object> >(keys.ToList()); this.edmType = edmType; this.entitySet = entitySet; // Check that the type they gave us is related to the type of the set if (entitySet != null) { UriParserErrorHelper.ThrowIfTypesUnrelated(edmType, entitySet.ElementType, "KeySegments"); } }
public TypeSegment(IEdmType edmType, IEdmEntitySet entitySet) { ExceptionUtils.CheckArgumentNotNull(edmType, "type"); this.edmType = edmType; this.entitySet = entitySet; this.TargetEdmType = edmType; this.TargetEdmEntitySet = entitySet; // Check that the type they gave us is related to the type of the set if (entitySet != null) { UriParserErrorHelper.ThrowIfTypesUnrelated(edmType, entitySet.ElementType, "TypeSegments"); } }
public TypeSegment(IEdmType edmType, IEdmNavigationSource navigationSource) { ExceptionUtils.CheckArgumentNotNull(edmType, "type"); this.edmType = edmType; this.navigationSource = navigationSource; this.TargetEdmType = edmType; this.TargetEdmNavigationSource = navigationSource; // Check that the type they gave us is related to the type of the set if (navigationSource != null) { UriParserErrorHelper.ThrowIfTypesUnrelated(edmType, navigationSource.EntityType(), "TypeSegments"); } }
public BatchReferenceSegment(string contentId, IEdmType edmType, IEdmEntitySetBase entitySet) { ExceptionUtils.CheckArgumentNotNull(edmType, "resultingType"); ExceptionUtils.CheckArgumentNotNull(contentId, "contentId"); if (!ODataPathParser.ContentIdRegex.IsMatch(contentId)) { throw new ODataException(ODataErrorStrings.BatchReferenceSegment_InvalidContentID(contentId)); } this.edmType = edmType; this.entitySet = entitySet; this.contentId = contentId; this.Identifier = this.ContentId; this.TargetEdmType = edmType; this.TargetEdmNavigationSource = this.EntitySet; this.SingleResult = true; this.TargetKind = RequestTargetKind.Resource; if (entitySet != null) { UriParserErrorHelper.ThrowIfTypesUnrelated(edmType, entitySet.EntityType(), "BatchReferenceSegments"); } }