public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.startKey) { hashcode = (hashcode * 397) + StartKey.GetHashCode(); } if (__isset.endKey) { hashcode = (hashcode * 397) + EndKey.GetHashCode(); } if (__isset.id) { hashcode = (hashcode * 397) + Id.GetHashCode(); } if (__isset.name) { hashcode = (hashcode * 397) + Name.GetHashCode(); } if (__isset.version) { hashcode = (hashcode * 397) + Version.GetHashCode(); } if (__isset.serverName) { hashcode = (hashcode * 397) + ServerName.GetHashCode(); } if (__isset.port) { hashcode = (hashcode * 397) + Port.GetHashCode(); } } return(hashcode); }
public override string ToString() { string result = ""; if ((Key != null) && (Key.Count > 0)) { result += "&key=" + Key.ToString(); } if ((StartKey != null) && (StartKey.Count > 0)) { if ((StartKey.Count == 1) && (EndKey.Count > 1)) { result += "&startkey=[" + StartKey.ToString() + "]"; } else { result += "&startkey=" + StartKey.ToString(); } } if ((EndKey != null) && (EndKey.Count > 0)) { result += "&endkey=" + EndKey.ToString(); } if (Limit.HasValue) { result += "&limit=" + Limit.Value.ToString(); } if (Skip.HasValue) { result += "&skip=" + Skip.Value.ToString(); } if (Reduce.HasValue) { result += "&reduce=" + Reduce.Value.ToString().ToLower(); } if (Group.HasValue) { result += "&group=" + Group.Value.ToString().ToLower(); } if (IncludeDocs.HasValue) { result += "&include_docs=" + IncludeDocs.Value.ToString().ToLower(); } if (InclusiveEnd.HasValue) { result += "&inclusive_end=" + InclusiveEnd.Value.ToString().ToLower(); } if (GroupLevel.HasValue) { result += "&group_level=" + GroupLevel.Value.ToString(); } if (Descending.HasValue) { result += "&descending=" + Descending.Value.ToString().ToLower(); } if (Stale.HasValue && Stale.Value) { if (!string.IsNullOrEmpty(StaleOption)) { if (StaleOption.ToLower() == "ok") { result += "&stale=ok"; } else if (StaleOption.ToLower() == "update_after") { result += "&stale=update_after"; } else { throw new ArgumentException("Invalid StaleOption provided as a CouchDB ViewOption - as of v 1.1.0, valid options include 'ok' and 'update_after'."); } } else { result += "&stale=ok"; } } if (!string.IsNullOrEmpty(StartKeyDocId)) { result += "&startkey_docid=" + StartKeyDocId; } if (!string.IsNullOrEmpty(EndKeyDocId)) { result += "&endkey_docid=" + EndKeyDocId; } return(result.Length < 1 ? "" : "?" + result.Substring(1)); }
public override string ToString() { return($"RegionInfo->Name: {Name.ToUtf8String()}, ID: {ID}, Namespace: {Namespace.ToUtf8String()}, Table: {Table.ToUtf8String()}, StartKey:{StartKey.ToUtf8String()}, StopKey: {StopKey.ToUtf8String()}"); }
private void StartKey_GotFocus(object sender, RoutedEventArgs e) { StartKey.SelectAll(); clicking = false; }
public Dictionary <string, object> ToDictionary() { var query = new Dictionary <string, object>(); if (Key != null) { query["key"] = Key.Serialize(); } if (Keys != null) { query["keys"] = Keys.Serialize(); } if (StartKey != null) { query["startkey"] = StartKey.Serialize(); } if (EndKey != null) { query["endkey"] = EndKey.Serialize(); } if (StartKeyDocId != null) { query["startkey_docid"] = StartKeyDocId; } if (EndKEyDocId != null) { query["endkey_docid"] = EndKEyDocId; } if (Limit != null) { query["limit"] = Limit; } if (Stale != null) { query["stale"] = Stale; } if (Descending.HasValue) { query["descending"] = Descending.Value ? "true" : "false"; } if (Skip != null) { query["skip"] = Skip; } if (Group.HasValue) { query["group"] = Group.Value ? "true" : "false"; } if (GroupLevel != null) { query["group_level"] = GroupLevel; } if (Reduce.HasValue) { query["reduce"] = Reduce.Value ? "true" : "false"; } ; if (IncludeDocs.HasValue) { query["include_docs"] = IncludeDocs.Value ? "true" : "false"; } ; if (InclusiveEnd.HasValue) { query["inclusive_end"] = InclusiveEnd.Value ? "true" : "false"; } ; if (UpdateSeq.HasValue) { query["update_seq"] = UpdateSeq.Value ? "true" : "false"; } ; return(query); }