Beispiel #1
0
 public static GetClientBaseAssetRespModel Create(ApiAssetModel asset)
 {
     return(new GetClientBaseAssetRespModel
     {
         Asset = asset
     });
 }
Beispiel #2
0
 public static AssetExtended Create(ApiAssetModel asset, AssetDescriptionModel description, ApiAssetCategoryModel category, IEnumerable <IAssetAttributesKeyValue> attributes)
 {
     return(new AssetExtended
     {
         Asset = asset,
         Description = description,
         Category = category,
         Attributes = attributes
     });
 }
        public static AssetExtended ConvertTpApiModel(this AssetExtendedInfo src)
        {
            var asset = new ApiAssetModel {
                Id = src.Id, Name = src.FullName
            };
            var description = new AssetDescriptionModel
            {
                Id          = src.Id,
                Description = src.Description,
                AssetClass  = src.AssetClass,
                FullName    = src.FullName
            };
            var category   = new ApiAssetCategoryModel();
            var attributes = new List <IAssetAttributesKeyValue>();

            return(new AssetExtended
            {
                Asset = asset,
                Description = description,
                Category = category,
                Attributes = attributes
            });
        }