/// <summary>
 /// Constructs an instance of the DataServiceHostWrapper object.
 /// </summary>
 /// <param name="host">IDataServiceHost instance to wrap.</param>
 internal DataServiceHostWrapper(IDataServiceHost host)
 {
     Debug.Assert(host != null, "host != null");
     this.host                 = host;
     this.astoriaHttpVerb      = AstoriaVerbs.None;
     this.requestAccept        = host.RequestAccept;
     this.requestAcceptCharSet = host.RequestAcceptCharSet;
     this.requestContentType   = host.RequestContentType;
     this.requestIfMatch       = host.RequestIfMatch;
     this.requestIfNoneMatch   = host.RequestIfNoneMatch;
     this.requestMaxVersion    = host.RequestMaxVersion;
     this.requestVersion       = host.RequestVersion;
 }
Пример #2
0
 /// <summary>
 /// Make sure binding operations cannot be performed in PUT operations
 /// </summary>
 /// <param name="requestVerb">http method name for the request.</param>
 protected static void CheckForBindingInPutOperations(AstoriaVerbs requestVerb)
 {
     // Cannot bind in PUT operations.
     if (requestVerb == AstoriaVerbs.PUT)
     {
         throw DataServiceException.CreateBadRequestError(Strings.BadRequest_CannotUpdateRelatedEntitiesInPut);
     }
 }