public override object this[string keyword] { get { return(GetAt(GetIndex(keyword))); } set { if (value == null) { Remove(keyword); return; } switch (GetIndex(keyword)) { case Keywords.DataSource: DataSource = Convert.ToString(value, CultureInfo.InvariantCulture); return; case Keywords.Mode: Mode = ConvertToEnum <SqliteOpenMode>(keyword, value); return; case Keywords.Cache: Cache = ConvertToEnum <SqliteCacheMode>(keyword, value); return; default: Debug.Assert(false, "Unexpected keyword: " + keyword); return; } } }
private void Reset(Keywords index) { switch (index) { case Keywords.DataSource: _dataSource = string.Empty; return; case Keywords.Mode: _mode = SqliteOpenMode.ReadWriteCreate; return; case Keywords.Cache: _cache = SqliteCacheMode.Default; return; default: Debug.Fail("Unexpected keyword: " + index); return; } }