Пример #1
0
 internal static void SerializeFacetInfo(FacetBase facet, Dictionary<string, object> facetDict)
 {
     facetDict.AddObject(_SIZE, facet.Size, _SIZE_DEFAULT);
     facetDict.AddObject(_NESTED, facet.NestedObject);
     facetDict.AddObject(_GLOBAL, facet.IsScopeGlobal, _GLOBAL_DEFAULT);
     facetDict.AddObject(_FACET_FILTER, facet.FacetFilter);
 }
Пример #2
0
 internal static void DeserializeFacetInfo(FacetBase facet, Dictionary<string, object> facetDict)
 {
     if (facetDict.ContainsKey(_FACET_FILTER))
         facet.FacetFilter = JsonConvert.DeserializeObject<IFilter>(facetDict.GetString(_FACET_FILTER));
     facet.IsScopeGlobal = facetDict.GetBool(_GLOBAL, _GLOBAL_DEFAULT);
     facet.NestedObject = facetDict.GetStringOrDefault(_NESTED);
     facet.Size = facetDict.GetInt32(_SIZE, _SIZE_DEFAULT);
 }