private void ReloadSettings() { this.Settings = this.settingsCollection.FindOne(); if (this.Settings == null) { this.Settings = CollectionSettings.CreateDefault(); this.SaveSettings(); } }
private void ReloadSettings() { using (var reader = this.loadSettings.ExecuteReader()) { while (reader.Read()) { this.Settings = this.Deserialize <CollectionSettings>(reader.GetBytes("bson")); return; } } if (this.Settings == null) { this.Settings = CollectionSettings.CreateDefault(); this.SaveSettings(); } }