Class WMAssetDirectoryDTO
Data Transfer Object proxy for a WMAssetDirectory.
Inheritance
Inherited Members
Namespace: Quantellia.WMServer.Asset.Directory
Assembly: WMServer.dll
Syntax
public class WMAssetDirectoryDTO : WMAssetBaseDTO<WMAssetDirectory>, IWMAssetBaseDTO, IDbEntity, IWMEntity
Constructors
WMAssetDirectoryDTO()
Constructor for WMAssetDirectoryDTO
Declaration
public WMAssetDirectoryDTO()
WMAssetDirectoryDTO(string)
Constructor for WMAssetDirectoryDTO specifying ID
Declaration
public WMAssetDirectoryDTO(string id)
Parameters
Type | Name | Description |
---|---|---|
string | id |
Properties
RootDirectoryDTO
Provisional Root WMAssetDirectoryDTO
Declaration
public static WMAssetDirectoryDTO RootDirectoryDTO { get; set; }
Property Value
Type | Description |
---|---|
WMAssetDirectoryDTO |
Methods
Create(WMPrincipal, WMAssetDirectoryDTO, WMAppDbContext, string, string)
Create a new WMAssetDirectoryDTO from the provided data.
Declaration
public static Task<WMAssetDirectory> Create(WMPrincipal principal, WMAssetDirectoryDTO ad_dto, WMAppDbContext context, string assetOwnerType, string assetOwnerID)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
WMAssetDirectoryDTO | ad_dto | The WMAssetDirectoryDTO to be created. |
WMAppDbContext | context | The DbContext |
string | assetOwnerType | TYpe of the WMPrincipal that owns the Asset. |
string | assetOwnerID | ID of the WMPrincipal that owns the Asset. |
Returns
Type | Description |
---|---|
Task<WMAssetDirectory> |
Exceptions
Type | Condition |
---|---|
Exception |
FromModel()
Create this instance by reading properties from a WMAssetDirectory
Declaration
public override void FromModel()
Overrides
Get(WMPrincipal, string, WMAppDbContext)
Returns WMAssetDirectoryDTO with dir
, throws exception if does not exist.
Declaration
public static Task<WMAssetDirectoryDTO> Get(WMPrincipal principal, string dir, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
string | dir | The ID/dir of an asset directory |
WMAppDbContext | context |
Returns
Type | Description |
---|---|
Task<WMAssetDirectoryDTO> |
Exceptions
Type | Condition |
---|---|
Exception |
Get(WMPrincipal, string, int, WMAppDbContext)
Gets a listing of the specified WMAssetDirectoryDTO to the recursion depth specified.
Declaration
public static Task<IEnumerable<WMAssetDirectoryDTO>> Get(WMPrincipal principal, string dir = null, int recursionDepth = 0, WMAppDbContext context = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the Asset Directory being requested. |
string | dir | Specification of the directory to retrieve |
int | recursionDepth | Depth to which the directory subtrees under the specified directory should be traversed. |
WMAppDbContext | context | Optional reference to a WMAppDbContext instance. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WMAssetDirectoryDTO>> |
Update(WMPrincipal, string, WMAssetDirectoryDTO, WMAppDbContext)
Updates the specified WMAssetDirectoryDTO from the provided data.
Declaration
public static Task Update(WMPrincipal principal, string id, WMAssetDirectoryDTO ad_dto, WMAppDbContext context)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | The owner of the directory |
string | id | The id or fullpath of the directory |
WMAssetDirectoryDTO | ad_dto | The WMAssetDirectoryDTO to be updated. |
WMAppDbContext | context | The DbContext |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
Exception |
UpdateModel(WMPrincipal, DbContext, object[]?)
Updates and returns the contained WMAssetDirectory.
Declaration
public override Task<WMAssetDirectory> UpdateModel(WMPrincipal principal, DbContext context, object[]? data = null)
Parameters
Type | Name | Description |
---|---|---|
WMPrincipal | principal | |
DbContext | context | |
object[] | data |
Returns
Type | Description |
---|---|
Task<WMAssetDirectory> |