protected AssetDefinitionDto(AssetDefinitionDto aAssetDefinition) : this() { Name = aAssetDefinition.Name; Url = aAssetDefinition.Url; Logo = aAssetDefinition.Logo; foreach (MetricDefinitionDto metricDefinition in aAssetDefinition.MetricDefinitions) { MetricDefinitions.Add((MetricDefinitionDto)metricDefinition.Clone()); } }
private string GetFriendlySizeName(string urlEncoded, out SizeKeyType outType) { outType = SizeKeyType.Unknown; string friendlyName = urlEncoded; if (DimensionDefinitions.Values.Contains(urlEncoded)) { friendlyName = DimensionDefinitions.First(p => p.Value == urlEncoded).Key; outType = SizeKeyType.Dimension; } else if (MetricDefinitions.Values.Contains(urlEncoded)) { friendlyName = MetricDefinitions.First(p => p.Value == urlEncoded).Key; outType = SizeKeyType.Metric; } return(friendlyName); }
private string GetFriendlySizeName(string urlEncoded) { return(DimensionDefinitions.Values.Contains(urlEncoded) ? DimensionDefinitions.First(p => p.Value == urlEncoded).Key : MetricDefinitions.Values.Contains(urlEncoded) ? MetricDefinitions.First(p => p.Value == urlEncoded).Key : urlEncoded); }