Mercurial > pub > ImplabNet
comparison Implab/JSON/StringTranslator.cs @ 158:130781364799 v2
refactoring, code cleanup
author | cin |
---|---|
date | Thu, 18 Feb 2016 14:34:02 +0300 |
parents | c0bf853aa04f |
children |
comparison
equal
deleted
inserted
replaced
157:948c015a9011 | 158:130781364799 |
---|---|
33 _hexMap[hexs[i]] = ints[i]; | 33 _hexMap[hexs[i]] = ints[i]; |
34 | 34 |
35 } | 35 } |
36 | 36 |
37 public StringTranslator() | 37 public StringTranslator() |
38 : base(JSONGrammar.Instance.JsonStringDFA) { | 38 : base(JSONGrammar.Instance.JsonStringDFA.States, JSONGrammar.Instance.JsonStringDFA.Alphabet.GetTranslationMap()) { |
39 } | 39 } |
40 | 40 |
41 public string Translate(string data) { | 41 public string Translate(string data) { |
42 Safe.ArgumentNotNull(data, "data"); | 42 Safe.ArgumentNotNull(data, "data"); |
43 return Translate(data.ToCharArray()); | 43 return Translate(data.ToCharArray()); |