2 using System.Collections.Generic;
4 using Tizen.NUI.Binding;
6 namespace Tizen.NUI.EXaml
8 internal class GetValueAction : Action
10 public GetValueAction(char sign, Action parent)
16 private Action parent;
18 private delegate object GetValueByString(string value);
20 private static GetValueByString[] getValueByStrings = null;
21 private static GetValueByString[] GetValueByStrings
25 if (null == getValueByStrings)
27 getValueByStrings = new GetValueByString['p' - 'a' + 2];
29 getValueByStrings[0] = (string value) =>
35 getValueByStrings[1] = (string value) =>
37 int index = int.Parse(value);
38 return new Instance(index);
42 getValueByStrings[2] = (string value) =>
44 return SByte.Parse(value);
48 getValueByStrings[3] = (string value) =>
50 return Int16.Parse(value);
54 getValueByStrings[4] = (string value) =>
56 return Int32.Parse(value);
60 getValueByStrings[5] = (string value) =>
62 return Int64.Parse(value);
66 getValueByStrings[6] = (string value) =>
68 return Byte.Parse(value);
72 getValueByStrings[7] = (string value) =>
74 return UInt16.Parse(value);
78 getValueByStrings[8] = (string value) =>
80 return UInt32.Parse(value);
84 getValueByStrings[9] = (string value) =>
86 return UInt64.Parse(value);
90 getValueByStrings[10] = (string value) =>
92 return Single.Parse(value);
96 getValueByStrings[11] = (string value) =>
98 return Double.Parse(value);
102 getValueByStrings[12] = (string value) =>
104 return Boolean.Parse(value);
108 getValueByStrings[13] = (string value) =>
110 return TimeSpan.Parse(value);
114 getValueByStrings[14] = (string value) =>
116 return decimal.Parse(value);
120 getValueByStrings[15] = (string value) =>
122 //Should be deal prev
127 return getValueByStrings;
131 public Action DealChar(char c)
138 Value = GetValueByStrings[0](valueString);
146 Value = GetValueByStrings[c - 'a' + 1](valueString);
164 getValueList = new GetValueListAction(')', this);
174 private string valueString;
176 private GetValueListAction getValueList;
189 public void OnActive()