/// <summary> /// Loads the supported, OData-specific serializable annotations into their in-memory representations. /// </summary> /// <param name="model">The <see cref="IEdmModel"/> to process.</param> public static void LoadODataAnnotations(this IEdmModel model) { ExceptionUtils.CheckArgumentNotNull(model, "model"); LoadODataAnnotations(model, ODataConstants.DefaultMaxEntityPropertyMappingsPerType); }
internal ODataBatchOperationReadStreamWithLength(ODataBatchReaderStream batchReaderStream, IODataBatchOperationListener listener, int length) : base(batchReaderStream, listener) { ExceptionUtils.CheckIntegerNotNegative(length, "length"); this.length = length; }
/// <summary>Returns the format used by the message reader for reading the payload.</summary> /// <returns>The format used by the messageReader for reading the payload.</returns> /// <param name="messageReader">The <see cref="T:Microsoft.Data.OData.ODataMessageReader" /> to get the read format from.</param> /// <remarks>This method must only be called once reading has started. /// This means that a read method has been called on the <paramref name="messageReader"/> or that a reader (for entries, feeds, collections, etc.) has been created. /// If the method is called prior to that it will throw.</remarks> public static ODataFormat GetReadFormat(ODataMessageReader messageReader) { ExceptionUtils.CheckArgumentNotNull(messageReader, "messageReader"); return(messageReader.GetFormat()); }
private void VerifyCanWriteStartNavigationLink(bool synchronousCall, ODataNavigationLink navigationLink) { ExceptionUtils.CheckArgumentNotNull <ODataNavigationLink>(navigationLink, "navigationLink"); this.VerifyNotDisposed(); this.VerifyCallAllowed(synchronousCall); }
private void VerifyCanWriteEntityReferenceLink(ODataEntityReferenceLink entityReferenceLink, bool synchronousCall) { ExceptionUtils.CheckArgumentNotNull <ODataEntityReferenceLink>(entityReferenceLink, "entityReferenceLink"); this.VerifyNotDisposed(); this.VerifyCallAllowed(synchronousCall); }
/// <summary>Initializes a new instance of the <see cref="T:Microsoft.Data.OData.ProjectedPropertiesAnnotation" /> class.</summary> /// <param name="projectedPropertyNames">The enumeration of projected property names.</param> public ProjectedPropertiesAnnotation(IEnumerable <string> projectedPropertyNames) { ExceptionUtils.CheckArgumentNotNull(projectedPropertyNames, "projectedPropertyNames"); this.projectedProperties = new HashSet <string>(projectedPropertyNames, StringComparer.Ordinal); }
internal override IEnumerable <ODataPayloadKind> DetectPayloadKind(IODataRequestMessage requestMessage, ODataPayloadKindDetectionInfo detectionInfo) { ExceptionUtils.CheckArgumentNotNull <IODataRequestMessage>(requestMessage, "requestMessage"); ExceptionUtils.CheckArgumentNotNull <ODataPayloadKindDetectionInfo>(detectionInfo, "detectionInfo"); return(DetectPayloadKindImplementation(detectionInfo.ContentType)); }
internal override Task <IEnumerable <ODataPayloadKind> > DetectPayloadKindAsync(IODataResponseMessageAsync responseMessage, ODataPayloadKindDetectionInfo detectionInfo) { ExceptionUtils.CheckArgumentNotNull <IODataResponseMessageAsync>(responseMessage, "responseMessage"); ExceptionUtils.CheckArgumentNotNull <ODataPayloadKindDetectionInfo>(detectionInfo, "detectionInfo"); return(TaskUtils.GetTaskForSynchronousOperation <IEnumerable <ODataPayloadKind> >(() => DetectPayloadKindImplementation(detectionInfo.ContentType))); }