コード例 #1
0
ファイル: ODataUtils.cs プロジェクト: tapika/swupd
 /// <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);
 }
コード例 #2
0
 internal ODataBatchOperationReadStreamWithLength(ODataBatchReaderStream batchReaderStream, IODataBatchOperationListener listener, int length) : base(batchReaderStream, listener)
 {
     ExceptionUtils.CheckIntegerNotNegative(length, "length");
     this.length = length;
 }
コード例 #3
0
ファイル: ODataUtils.cs プロジェクト: tapika/swupd
 /// <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());
 }
コード例 #4
0
 private void VerifyCanWriteStartNavigationLink(bool synchronousCall, ODataNavigationLink navigationLink)
 {
     ExceptionUtils.CheckArgumentNotNull <ODataNavigationLink>(navigationLink, "navigationLink");
     this.VerifyNotDisposed();
     this.VerifyCallAllowed(synchronousCall);
 }
コード例 #5
0
 private void VerifyCanWriteEntityReferenceLink(ODataEntityReferenceLink entityReferenceLink, bool synchronousCall)
 {
     ExceptionUtils.CheckArgumentNotNull <ODataEntityReferenceLink>(entityReferenceLink, "entityReferenceLink");
     this.VerifyNotDisposed();
     this.VerifyCallAllowed(synchronousCall);
 }
コード例 #6
0
        /// <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);
        }
コード例 #7
0
 internal override IEnumerable <ODataPayloadKind> DetectPayloadKind(IODataRequestMessage requestMessage, ODataPayloadKindDetectionInfo detectionInfo)
 {
     ExceptionUtils.CheckArgumentNotNull <IODataRequestMessage>(requestMessage, "requestMessage");
     ExceptionUtils.CheckArgumentNotNull <ODataPayloadKindDetectionInfo>(detectionInfo, "detectionInfo");
     return(DetectPayloadKindImplementation(detectionInfo.ContentType));
 }
コード例 #8
0
 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)));
 }