当前位置: 首页>>代码示例>>C#>>正文


C# Index.CreateAsync方法代码示例

本文整理汇总了C#中Index.CreateAsync方法的典型用法代码示例。如果您正苦于以下问题:C# Index.CreateAsync方法的具体用法?C# Index.CreateAsync怎么用?C# Index.CreateAsync使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Index的用法示例。


在下文中一共展示了Index.CreateAsync方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateIndexAsync

 /// <summary>
 /// Asynchronously creates a new index.
 /// </summary>
 /// <param name="name">
 /// Name of the index to create.
 /// </param>
 /// <param name="coldPath">
 /// Location for storing the cold databases for the index identified by
 /// <see cref="name"/>. A value of <c>null</c> or <c>""</c> specifies 
 /// that the cold databases should be stored at the default location.
 /// </param>
 /// <param name="homePath">
 /// Location for storing the hot and warm buckets for the index 
 /// identified by <see cref="name"/>. A value of <c>null</c> or <c>""
 /// </c> specifies that the hot and warm buckets should be stored at 
 /// the default location.
 /// </param>
 /// <param name="thawedPath">
 /// <summary>
 /// Specifies the absolute path for storing the resurrected databases 
 /// for the index identified by <see cref="name"/>. A value of <c>null
 /// </c> or <c>""</c> specifies that the resurrected databases should 
 /// be stored at the default location.
 /// </param>
 /// <param name="attributes">
 /// Attributes to set on the newly created index.
 /// </param>
 /// <returns>
 /// An object representing the newly created index.
 /// </returns>
 /// <remarks>
 /// This method uses the <a href="http://goo.gl/yDfQ4T">POST
 /// data/indexes</a> endpoint to create the <see cref="Index"/> object
 /// it returns.
 /// </remarks>
 public async Task<Index> CreateIndexAsync(string name, string coldPath = null, string homePath = null, 
     string thawedPath = null, IndexAttributes attributes = null)
 {
     var entity = new Index(this.Context, this.Namespace, name);
     await entity.CreateAsync(coldPath, homePath, thawedPath, attributes);
     return entity;
 }
开发者ID:paulcbetts,项目名称:splunk-sdk-csharp-pcl,代码行数:42,代码来源:Service.cs


注:本文中的Index.CreateAsync方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。