public override string ToString() { var values = new AdvancedCollection("{", "}", "},{", ":"); values.Add <double>("gamma", Gamma, Gamma.HasValue); values.Add <bool>("invert_lightness", InvertLightness, InvertLightness.HasValue); values.Add <int>("lightness", Lightness, Lightness.HasValue); values.Add <int>("saturation", Saturation, Saturation.HasValue); values.Add <int>("weight", Weight, Weight.HasValue); if (Color.HasValue) { values.Add <string>("color", JavascriptHelper.GetStringFromColor(Color.Value)); } if (Hue.HasValue) { values.Add <string>("hue", JavascriptHelper.GetStringFromColor(Hue.Value)); } if (Visibility.HasValue) { values.Add <string>("visibility", Visibility.Value.ToString().ToLowerInvariant()); } return("[" + values.ToString() + "]"); }
public override string ToString() { var css = new AdvancedCollection(" style=\"", "\"", ";", ":"); css.Add("height", Height, Height != null); css.Add("width", Width, Width != null); return css.ToString(); }
public override string ToString() { var css = new AdvancedCollection(" style=\"", "\"", ";", ":"); css.Add("height", Height, Height != null); css.Add("width", Width, Width != null); return(css.ToString()); }
IEnumerable <Mod> GetServerMods(AdvancedCollection customCollection, Server server) { if (!server.Mods.Any()) { return(Enumerable.Empty <Mod>()); } return(customCollection != null ? GetCustomRepoServerMods(server, customCollection) : GetServerMods(server)); }
IEnumerable <Mod> GetCustomRepoServerMods(Server server, AdvancedCollection ms) => ContentManager.GetMods(_modding, server.Mods, ms.CustomRepoMods);
public override string ToString() { var values = new AdvancedCollection("{", "}", "},{", ":"); values.Add<double>("gamma", Gamma, Gamma.HasValue); values.Add<bool>("invert_lightness", InvertLightness, InvertLightness.HasValue); values.Add<int>("lightness", Lightness, Lightness.HasValue); values.Add<int>("saturation", Saturation, Saturation.HasValue); values.Add<int>("weight", Weight, Weight.HasValue); if (Color.HasValue) { values.Add<string>("color", JavascriptHelper.GetStringFromColor(Color.Value)); } if (Hue.HasValue) { values.Add<string>("hue", JavascriptHelper.GetStringFromColor(Hue.Value)); } if (Visibility.HasValue) { values.Add<string>("visibility", Visibility.Value.ToString().ToLowerInvariant()); } return "[" + values.ToString() + "]"; }