public Info(string path) { using (SimpleDictionary dict = new SimpleDictionary(path, false, false)) Load(dict); GetFullInstance = () => new SimpleDictionary(Path); }
public Section(List <Entry> entries, bool translationsLoaded, SimpleDictionary dictionary) { this.entries = entries; this.dictionary = dictionary; if (translationsLoaded) { fullyLoadedEntries = entries.Count; } }
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); }
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; } }
public Section(List<Entry> entries, bool translationsLoaded, SimpleDictionary dictionary) { this.entries = entries; this.dictionary = dictionary; if (translationsLoaded) fullyLoadedEntries = entries.Count; }
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; }
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); }