コード例 #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);
        }
コード例 #2
0
ファイル: ShouldEnable.cs プロジェクト: sanyuancap/GrooveGame
        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);
            }
        }
コード例 #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);
            }
        }
コード例 #4
0
 public override void EnableGeoLocation(ShouldEnable shouldEnable)
 {
     Start();
                     Jsonable.CheckForErrors(Json.Deserialize(EnableGeoLocationJson(shouldEnable.ToJson())) as Dictionary<string, object>);
 }
コード例 #5
0
 public abstract void EnableGeoLocation(ShouldEnable shouldEnable);
コード例 #6
0
 public abstract void EnableTesting(ShouldEnable shouldEnable);
コード例 #7
0
 public abstract void EnableLogging(ShouldEnable shouldEnable);
コード例 #8
0
 public abstract void EnableGeoLocation(ShouldEnable shouldEnable);
コード例 #9
0
 public abstract void EnableTesting(ShouldEnable shouldEnable);
コード例 #10
0
 public abstract void EnableLogging(ShouldEnable shouldEnable);
コード例 #11
0
 public override void EnableGeoLocation(ShouldEnable shouldEnable)
 {
     Start();
     Jsonable.CheckForErrors(Json.Deserialize(EnableGeoLocationJson(shouldEnable.ToJson())) as Dictionary <string, object>);
 }