public UpService AddEvent(string evt) { UpService sEvent = new UpService(evt); AddEvent(sEvent); return sEvent; }
public UpDriver AddEvent(UpService evt) { if (events == null) events = new List<UpService>(); events.Add(evt); return this; }
public override bool Equals(object obj) { if (obj == null || !(obj is UpService)) { return(false); } UpService d = (UpService)obj; return(name.Equals(d.name)); }
public static UpService FromJSON(object obj) { IDictionary<string, object> json = obj as IDictionary<string, object>; UpService s = new UpService(); s.name = Util.JsonOptString(json, "name"); IDictionary<string, object> p_map = Util.JsonOptField(json, "parameters") as IDictionary<string, object>; if (p_map != null) { foreach (var p in p_map) { ParameterType parameterType = (ParameterType)System.Enum.Parse(typeof(ParameterType), p.Value as string, true); s.AddParameter(p.Key, parameterType); } } return s; }
public static UpService FromJSON(object obj) { IDictionary <string, object> json = obj as IDictionary <string, object>; UpService s = new UpService(); s.name = Util.JsonOptString(json, "name"); IDictionary <string, object> p_map = Util.JsonOptField(json, "parameters") as IDictionary <string, object>; if (p_map != null) { foreach (var p in p_map) { ParameterType parameterType = (ParameterType)System.Enum.Parse(typeof(ParameterType), p.Value as string, true); s.AddParameter(p.Key, parameterType); } } return(s); }
public UpService AddService(UpService service) { if (services == null) services = new List<UpService>(); services.Add(service); return service; }