Ejemplo n.º 1
0
            public Info(string path)
            {
                using (SimpleDictionary dict = new SimpleDictionary(path, false, false))
                    Load(dict);


                GetFullInstance = () => new SimpleDictionary(Path);
            }
Ejemplo n.º 2
0
 public Section(List <Entry> entries, bool translationsLoaded, SimpleDictionary dictionary)
 {
     this.entries    = entries;
     this.dictionary = dictionary;
     if (translationsLoaded)
     {
         fullyLoadedEntries = entries.Count;
     }
 }
Ejemplo n.º 3
0
            public Info(SimpleDictionary dict)
            {
                Load(dict);

                // Keep a weak reference to the dictionary. This way we don't have to load the
                // dictionary again if we re-open it soon after we close it.
                var weak = new NullWeakReference <SimpleDictionary>(dict);

                GetFullInstance = () => FromWeak(weak);
            }
Ejemplo n.º 4
0
            void Load(SimpleDictionary dict)
            {
                Path   = dict.Path;
                Name   = dict.Name;
                Author = dict.Author;
                Url    = dict.Url;

                SectionNames = dict.SectionNames;
                if (dict.FirstLanguage != null || dict.SecondLanguage != null)
                {
                    Languages = new string[] { dict.FirstLanguage, dict.SecondLanguage }
                }
                ;
                SectionSizes = dict.SectionSizes;
            }
        }
Ejemplo n.º 5
0
 public Section(List<Entry> entries, bool translationsLoaded, SimpleDictionary dictionary)
 {
     this.entries = entries;
     this.dictionary = dictionary;
     if (translationsLoaded)
         fullyLoadedEntries = entries.Count;
 }
Ejemplo n.º 6
0
            void Load(SimpleDictionary dict)
            {
                Path = dict.Path;
                Name = dict.Name;
                Author = dict.Author;
                Url = dict.Url;

                SectionNames = dict.SectionNames;
                if (dict.FirstLanguage != null || dict.SecondLanguage != null)
                    Languages = new string[] { dict.FirstLanguage, dict.SecondLanguage };
                SectionSizes = dict.SectionSizes;
            }
Ejemplo n.º 7
0
            public Info(SimpleDictionary dict)
            {
                Load(dict);

                // Keep a weak reference to the dictionary. This way we don't have to load the
                // dictionary again if we re-open it soon after we close it.
                var weak = new NullWeakReference<SimpleDictionary>(dict);
                GetFullInstance = () => FromWeak(weak);
            }
Ejemplo n.º 8
0
            public Info(string path)
            {
                using (SimpleDictionary dict = new SimpleDictionary(path, false, false))
                    Load(dict);

                GetFullInstance = () => new SimpleDictionary(Path);
            }