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

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

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

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