Ejemplo n.º 1
0
        public UpService AddEvent(string evt)
        {
            UpService sEvent = new UpService(evt);

            AddEvent(sEvent);

            return sEvent;
        }
Ejemplo n.º 2
0
        public UpDriver AddEvent(UpService evt)
        {
            if (events == null)
                events = new List<UpService>();

            events.Add(evt);

            return this;
        }
Ejemplo n.º 3
0
        public override bool Equals(object obj)
        {
            if (obj == null || !(obj is UpService))
            {
                return(false);
            }

            UpService d = (UpService)obj;

            return(name.Equals(d.name));
        }
Ejemplo n.º 4
0
        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;
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        public UpService AddService(UpService service)
        {
            if (services == null)
                services = new List<UpService>();

            services.Add(service);

            return service;
        }