Ejemplo n.º 1
0
        public static Dictionary <string, ShouldEnable> MapFromJson(Dictionary <string, object> jsonMap)
        {
            Dictionary <string, ShouldEnable> result = new Dictionary <string, ShouldEnable>();

            foreach (var entry in jsonMap)
            {
                ShouldEnable value = CreateFromDictionary(entry.Value as Dictionary <string, object>);
                result.Add(entry.Key, value);
            }
            return(result);
        }
Ejemplo n.º 2
0
        public static ShouldEnable CreateFromDictionary(Dictionary<string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return null;
                }

                var request = new ShouldEnable();

                if(jsonMap.ContainsKey("booleanValue"))
                {
                    request.BooleanValue = (bool) jsonMap["booleanValue"];
                }

                return request;
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Ejemplo n.º 3
0
        public static ShouldEnable CreateFromDictionary(Dictionary <string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return(null);
                }

                var request = new ShouldEnable();


                if (jsonMap.ContainsKey("booleanValue"))
                {
                    request.BooleanValue = (bool)jsonMap["booleanValue"];
                }

                return(request);
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Ejemplo n.º 4
0
 public override void EnableGeoLocation(ShouldEnable shouldEnable)
 {
     Start();
                     Jsonable.CheckForErrors(Json.Deserialize(EnableGeoLocationJson(shouldEnable.ToJson())) as Dictionary<string, object>);
 }
Ejemplo n.º 5
0
 public abstract void EnableGeoLocation(ShouldEnable shouldEnable);
Ejemplo n.º 6
0
 public abstract void EnableTesting(ShouldEnable shouldEnable);
Ejemplo n.º 7
0
 public abstract void EnableLogging(ShouldEnable shouldEnable);
Ejemplo n.º 8
0
 public abstract void EnableGeoLocation(ShouldEnable shouldEnable);
Ejemplo n.º 9
0
 public abstract void EnableTesting(ShouldEnable shouldEnable);
Ejemplo n.º 10
0
 public abstract void EnableLogging(ShouldEnable shouldEnable);
Ejemplo n.º 11
0
 public override void EnableGeoLocation(ShouldEnable shouldEnable)
 {
     Start();
     Jsonable.CheckForErrors(Json.Deserialize(EnableGeoLocationJson(shouldEnable.ToJson())) as Dictionary <string, object>);
 }