Class WMHTTPRequestDTO
Data Transfer Object proxy for a WMHTTPRequest.
Inherited Members
Namespace: Quantellia.WMServer.Asset.Model.HTTP.Request
Assembly: WMServer.dll
Syntax
[PrimaryKey("ID", new string[] { "Version" })]
public class WMHTTPRequestDTO : WMAssetBaseDTO<WMHTTPRequest>, IWMAssetBaseDTO, IWMVersionableAsset, IWMOwnableResource, IWMResource, IDbEntity, IWMEntity
Constructors
WMHTTPRequestDTO()
Constructor for DTO
Declaration
public WMHTTPRequestDTO()
WMHTTPRequestDTO(string)
Constructor for DTO, with specified ID
Declaration
public WMHTTPRequestDTO(string ID)
Parameters
Type | Name | Description |
---|---|---|
string | ID |
Properties
HTTPConnectionID
The WMHTTPConnection that this request requests from.
Declaration
public string HTTPConnectionID { get; set; }
Property Value
Type | Description |
---|---|
string |
Headers
Optional headers to add to and overwrite the Headers contained in the HTTPConnectionID
Declaration
[NotMapped]
public Dictionary<string, string> Headers { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> |
HeadersSerialized
Serializes to and from Headers
Declaration
public string HeadersSerialized { get; set; }
Property Value
Type | Description |
---|---|
string |
Method
The method to call on this request.
Declaration
public WMHTTPRequest.HTTPMethod Method { get; set; }
Property Value
Type | Description |
---|---|
WMHTTPRequest.HTTPMethod |
Route
An additional path on top of the HTTPConnectionID's Endpoint
Declaration
public string Route { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
Clone(WMPrincipal, WMAssetIdentifier, VersionCreateArgs?, WMAppDbContext)
Clones the specified asset with an iterated name "AssetName (1), etc... ", iterates the version number.
Declaration
public static Task<WMHTTPRequestDTO> Clone(WMPrincipal principal, WMAssetIdentifier identifier, VersionCreateArgs? args, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
VersionCreateArgs | args | Arguments for creating a version. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<WMHTTPRequestDTO> |
Exceptions
Type | Condition |
---|---|
Exception |
Commit(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Commits the specified asset as Head.
Declaration
public static Task Commit(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
Create(WMPrincipal, WMHTTPRequestDTO, WMAppDbContext)
Create a new WMHTTPRequestDTO from the provided data.
Declaration
public static Task<WMHTTPRequest> Create(WMPrincipal principal, WMHTTPRequestDTO a_dto, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the data reader |
WMHTTPRequestDTO | a_dto | The WMHTTPRequestDTO to be created. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<WMHTTPRequest> |
Exceptions
Type | Condition |
---|---|
Exception |
Delete(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Delete the WMHTTPRequestDTO with the corresponding ID or FullPathName
Declaration
public static Task Delete(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the asset |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
Evaluate(WMPrincipal, WMAssetIdentifier, HTTPRequestArgs, WMAppDbContext)
Performs an evaluation on an existing DataReader, or a temporary one created from the arguments of the body DataReaderArgs.
Declaration
public static Task<HTTPRequestResponse> Evaluate(WMPrincipal principal, WMAssetIdentifier identifier, HTTPRequestArgs args, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | identifier | |
HTTPRequestArgs | args | |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<HTTPRequestResponse> |
FromModel()
Create this instance by reading properties from the model.
Declaration
public override void FromModel()
Overrides
Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>>)
Gets the WMHTTPRequestDTO instance with the specified id. Ensures ownership.
Declaration
public static Task<WMHTTPRequestDTO> Get(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext? context = null, Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>> propertySelector = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
WMAssetIdentifier | identifier | The identifier of the asset |
WMAppDbContext | context | |
Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>> | propertySelector | An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>)) |
Returns
Type | Description |
---|---|
Task<WMHTTPRequestDTO> |
GetFromDirectory(WMPrincipal, WMAssetIdentifier, int, WMAppDbContext, Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>>)
Gets a listing of the specified WMHTTPRequestDTO to the recursion depth specified with the ID/Dir of a WMAssetDirectory as input.
Declaration
public static Task<IEnumerable<WMHTTPRequestDTO>> GetFromDirectory(WMPrincipal principal, WMAssetIdentifier identifier = null, int recursionDepth = 0, WMAppDbContext context = null, Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>> propertySelector = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the assets being requested. |
WMAssetIdentifier | identifier | The identifier of the asset |
int | recursionDepth | Depth to which the directory subtrees under the specified directory should be traversed. |
WMAppDbContext | context | Optional reference to a WMAppDbContext instance. |
Expression<Func<WMHTTPRequestDTO, WMHTTPRequestDTO>> | propertySelector | An optional expression that allows additional mapping of the database DTO object to the instance DTO object. (i.e. excluding DocumentData and DocumentEditedText from WMDocumentDTO, which requires excessive time and bandwidth. An example of this can be found in Get(WMPrincipal, WMAssetIdentifier, WMAppDbContext?, Expression<Func<WMDocumentDTO, WMDocumentDTO>>)) |
Returns
Type | Description |
---|---|
Task<IEnumerable<WMHTTPRequestDTO>> |
ResourceDefinition()
The resource operation definition for this asset.
Declaration
public static WMResourceOperationsDefinition ResourceDefinition()
Returns
Type | Description |
---|---|
WMResourceOperationsDefinition |
Update(WMPrincipal, WMAssetIdentifier, WMHTTPRequestDTO, WMAppDbContext)
Updates the specified WMHTTPRequestDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, WMAssetIdentifier identifier, WMHTTPRequestDTO a_dto, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the asset |
WMHTTPRequestDTO | a_dto | The WMHTTPRequestDTO to be updated. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
UpdateModel(WMPrincipal, DbContext, object[]?)
Updates and returns the contained model.
Declaration
public override Task<WMHTTPRequest> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
DbContext | context | |
object[] | data |
Returns
Type | Description |
---|---|
Task<WMHTTPRequest> |
Overrides
Versions(WMPrincipal, WMAssetIdentifier, WMAppDbContext)
Gets all versions of the specified asset.
Declaration
public static Task<IEnumerable<VersionArgs>> Versions(WMPrincipal principal, WMAssetIdentifier identifier, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetIdentifier | identifier | The identifier of the directory |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task<IEnumerable<VersionArgs>> |
Exceptions
Type | Condition |
---|---|
Exception |