public File(Asset asset, Version version, Models.Assets.File model) { if (asset == null) { throw new ArgumentNullException("asset"); } if (version == null) { throw new ArgumentNullException("version"); } _asset = asset; _version = version; _model = model; Path = _version.Path; while (Path.EndsWith("\\") || Path.EndsWith("/")) { Path = Path.TrimEnd('\\').TrimEnd('/'); } Path += System.IO.Path.DirectorySeparatorChar.ToString() + _model.Id; if (!string.IsNullOrEmpty(_model.Extension)) { Path += _model.Extension; } }
public File(Asset asset, Version version, Models.Assets.File model) { if (asset == null) throw new ArgumentNullException("asset"); if (version == null) throw new ArgumentNullException("version"); _asset = asset; _version = version; _model = model; Path = _version.Path; while (Path.EndsWith("\\") || Path.EndsWith("/")) Path = Path.TrimEnd('\\').TrimEnd('/'); Path += System.IO.Path.DirectorySeparatorChar.ToString() + _model.Id; if (!string.IsNullOrEmpty(_model.Extension)) Path += _model.Extension; }