本文整理汇总了C#中Func.InvokeOrDefault方法的典型用法代码示例。如果您正苦于以下问题:C# Func.InvokeOrDefault方法的具体用法?C# Func.InvokeOrDefault怎么用?C# Func.InvokeOrDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Func
的用法示例。
在下文中一共展示了Func.InvokeOrDefault方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CatAliasesAsync
/// <inheritdoc/>
public Task<ICatResponse<CatAliasesRecord>> CatAliasesAsync(Func<CatAliasesDescriptor, ICatAliasesRequest> selector = null) =>
this.CatAliasesAsync(selector.InvokeOrDefault(new CatAliasesDescriptor()));
示例2: SnapshotStatus
/// <inheritdoc/>
public ISnapshotStatusResponse SnapshotStatus(Func<SnapshotStatusDescriptor, ISnapshotStatusRequest> selector = null) =>
this.SnapshotStatus(selector.InvokeOrDefault(new SnapshotStatusDescriptor()));
示例3: ClusterGetSettings
/// <inheritdoc/>
public IClusterGetSettingsResponse ClusterGetSettings(Func<ClusterGetSettingsDescriptor, IClusterGetSettingsRequest> selector = null) =>
this.ClusterGetSettings(selector.InvokeOrDefault(new ClusterGetSettingsDescriptor()));
示例4: PutAliasAsync
/// <inheritdoc/>
public Task<IPutAliasResponse> PutAliasAsync(Indices indices, Name alias, Func<PutAliasDescriptor, IPutAliasRequest> selector = null) =>
this.PutAliasAsync(selector.InvokeOrDefault(new PutAliasDescriptor(indices, alias)));
示例5: CatThreadPoolAsync
/// <inheritdoc/>
public Task<ICatResponse<CatThreadPoolRecord>> CatThreadPoolAsync(
Func<CatThreadPoolDescriptor, ICatThreadPoolRequest> selector = null,
CancellationToken cancellationToken = default(CancellationToken)
) => this.CatThreadPoolAsync(selector.InvokeOrDefault(new CatThreadPoolDescriptor()), cancellationToken);
示例6: PutUserAsync
/// <inheritdoc/>
public Task<IPutUserResponse> PutUserAsync(Name username, Func<PutUserDescriptor, IPutUserRequest> selector = null) =>
this.PutUserAsync(selector.InvokeOrDefault(new PutUserDescriptor(username)));
示例7: RootNodeInfo
/// <inheritdoc/>
public IRootNodeInfoResponse RootNodeInfo(Func<RootNodeInfoDescriptor, IRootNodeInfoRequest> selector = null) =>
this.RootNodeInfo(selector.InvokeOrDefault(new RootNodeInfoDescriptor()));
示例8: SnapshotAsync
/// <inheritdoc/>
public Task<ISnapshotResponse> SnapshotAsync(Name repository, Name snapshotName, Func<SnapshotDescriptor, ISnapshotRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken)) =>
this.SnapshotAsync(selector.InvokeOrDefault(new SnapshotDescriptor(repository, snapshotName)), cancellationToken);
示例9: DeleteRole
/// <inheritdoc/>
public IDeleteRoleResponse DeleteRole(Name role, Func<DeleteRoleDescriptor, IDeleteRoleRequest> selector = null) =>
this.DeleteRole(selector.InvokeOrDefault(new DeleteRoleDescriptor(role)));
示例10: CatHelp
/// <inheritdoc/>
public ICatResponse<CatHelpRecord> CatHelp(Func<CatHelpDescriptor, ICatHelpRequest> selector = null) =>
this.CatHelp(selector.InvokeOrDefault(new CatHelpDescriptor()));
示例11: Snapshot
/// <inheritdoc/>
public ISnapshotResponse Snapshot(Name repository, Name snapshotName, Func<SnapshotDescriptor, ISnapshotRequest> selector = null) =>
this.Snapshot(selector.InvokeOrDefault(new SnapshotDescriptor(repository, snapshotName)));
示例12: IndexTemplateExistsAsync
/// <inheritdoc/>
public Task<IExistsResponse> IndexTemplateExistsAsync(Name template, Func<IndexTemplateExistsDescriptor, IIndexTemplateExistsRequest> selector = null) =>
this.IndexTemplateExistsAsync(selector.InvokeOrDefault(new IndexTemplateExistsDescriptor(template)));
示例13: StartWatcherAsync
/// <inheritdoc/>
public Task<IStartWatcherResponse> StartWatcherAsync(Func<StartWatcherDescriptor, IStartWatcherRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken)) =>
this.StartWatcherAsync(selector.InvokeOrDefault(new StartWatcherDescriptor()), cancellationToken);
示例14: StartWatcher
/// <inheritdoc/>
public IStartWatcherResponse StartWatcher(Func<StartWatcherDescriptor, IStartWatcherRequest> selector = null) =>
this.StartWatcher(selector.InvokeOrDefault(new StartWatcherDescriptor()));
示例15: PutUserAsync
/// <inheritdoc/>
public Task<IPutUserResponse> PutUserAsync(Name username, Func<PutUserDescriptor, IPutUserRequest> selector = null, CancellationToken cancellationToken = default(CancellationToken)) =>
this.PutUserAsync(selector.InvokeOrDefault(new PutUserDescriptor(username)), cancellationToken);