public ReleaseOutput ReleaseAsset(AssetBase newAsset, IResulotionConverter converter) { ReleaseOutput output = new ReleaseOutput(); var candidateAsset = _assetFactory.CreateAssets(newAsset); candidateAsset.ConvertResolution(converter); output.Id = candidateAsset.Id; output.Result = candidateAsset.UploadEntity(); return(output); }
public override void ConvertResolution(IResulotionConverter converter) { List <GraphicMap> graphics = new List <GraphicMap>(); var resolutions = Enum.GetValues(typeof(Resolution)).Cast <Resolution>().ToList(); Parallel.For(0, resolutions.Count, j => { var newGraphicPath = converter.ConvertGraphicSource(_graphicAsset.SourceFilePath, resolutions[j]); if (!string.IsNullOrEmpty(newGraphicPath)) { GraphicMap newGrapicMap = new GraphicMap() { Resolution = resolutions[j], GraphicPath = newGraphicPath }; graphics.Add(newGrapicMap); } }); _graphicAsset.Graphics = graphics; }
public override void ConvertResolution(IResulotionConverter converter) { List <VedioMap> vedios = new List <VedioMap>(); var resolutions = Enum.GetValues(typeof(Resolution)).Cast <Resolution>().ToList(); Parallel.For(0, resolutions.Count, j => { var newVedioPath = converter.ConvertGraphicSource(_vedioAsset.SourceFilePath, resolutions[j]); if (!string.IsNullOrEmpty(newVedioPath)) { VedioMap newVedioMap = new VedioMap() { Resolution = resolutions[j], VedioPath = newVedioPath }; vedios.Add(newVedioMap); } }); _vedioAsset.Vedios = vedios; }
public abstract void ConvertResolution(IResulotionConverter converter);