/// <summary> /// Index object to the default index and the inferred type name for T, using index parameters to further control the operation /// </summary> public Task <IIndexResponse> IndexAsync <T>(T @object, IndexParameters indexParameters) where T : class { var path = this.PathResolver.CreateIdOptionalPathFor <T>(@object); path = this.PathResolver.AppendParametersToPath(path, indexParameters); return(this._indexAsyncToPath(@object, path)); }
/// <summary> /// Index object to the specified index and the inferred type name for T, using index parameters to further control the operation /// </summary> public IIndexResponse Index <T>(T @object, string index, IndexParameters indexParameters) where T : class { var path = this.PathResolver.CreateIdOptionalPathFor <T>(@object, index); path = this.PathResolver.AppendParametersToPath(path, indexParameters); return(this._indexToPath <T>(@object, path)); }
public ConnectionStatus Index <T>(T @object, string index, string type, IndexParameters indexParameters) where T : class { var path = this.CreatePathFor <T>(@object, index, type); path = this.AppendParametersToPath(path, indexParameters); return(this._indexToPath <T>(@object, path)); }
public void IndexAsync <T>(T @object, string index, string type, int id, IndexParameters indexParameters, Action <ConnectionStatus> continuation) where T : class { var path = this.CreatePathFor <T>(@object, index, type, id.ToString()); path = this.AppendParametersToPath(path, indexParameters); this._indexAsyncToPath(@object, path, continuation); }
public void IndexAsync <T>(T @object, IndexParameters indexParameters) where T : class { var path = this.CreatePathFor <T>(@object); path = this.AppendParametersToPath(path, indexParameters); this._indexAsyncToPath(@object, path, (s) => { }); }
/// <summary> /// Index object to the specified index and the inferred type name for T, using index parameters to further control the operation /// </summary> public Task <ConnectionStatus> IndexAsync <T>(T @object, string index, IndexParameters indexParameters) where T : class { var path = this.CreatePathFor <T>(@object, index); path = this.AppendParametersToPath(path, indexParameters); return(this._indexAsyncToPath(@object, path)); }
private List <string> AppendIndexParameters(List <string> parameters, IndexParameters indexParameters) { if (indexParameters == null) { return(parameters); } if (!indexParameters.Timeout.IsNullOrEmpty()) { parameters.Add("timeout=" + indexParameters.Timeout); } if (indexParameters.VersionType != VersionType.Internal) //internal == default { parameters.Add("version_type=" + indexParameters.VersionType.ToString().ToLower()); } return(parameters); }