Example #1
0
        private List <Dictionary <string, object> > GetOrCreateTypeStores(ITypeSerializationInfo type)
        {
            // we have to search all paths
            List <Dictionary <string, object> > paths;

            if (!pathStore.TryGetValue(type, out paths))
            {
                paths = new List <Dictionary <string, object> >();
                foreach (var pair in idStore)
                {
                    if (type.IsAssignableFrom(pair.Key))
                    {
                        paths.Add(pair.Value);
                    }
                }
                pathStore.Add(type, paths);
            }

            return(paths);
        }