Пример #1
0
        internal static void Deserialize(TokenizerBase tokenizer, Dictionary<string, object> fieldDict)
        {
            if (fieldDict == null || !fieldDict.Any())
                return;

            tokenizer.Version = fieldDict.GetDoubleOrNull(_VERSION);
        }
Пример #2
0
        internal static void Serialize(TokenizerBase tokenizer, Dictionary<string, object> fieldDict)
        {
            if (tokenizer == null)
                return;

            if (fieldDict == null)
                fieldDict = new Dictionary<string, object>();

            fieldDict.AddObject(_TYPE, tokenizer.Type.ToString());
            fieldDict.AddObject(_VERSION, tokenizer.Version);
        }