/// <summary>
 /// Gets the schema for a given workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <SearchGetSchemaResponse> GetAsync(this ISchemaOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#2
0
 /// <summary>
 /// Default constructor with logging injected
 /// </summary>
 /// <param name="schemaOperations">Access schema definitions operations</param>
 /// <param name="loggingService">Logging for all end points</param>
 public SchemaController(ISchemaOperations schemaOperations, ILoggingService loggingService)
 {
     _loggingService   = loggingService;
     _schemaOperations = schemaOperations;
 }
 /// <summary>
 /// Gets the schema for a given workspace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 public static SearchGetSchemaResponse Get(this ISchemaOperations operations, string resourceGroupName, string workspaceName)
 {
     return(operations.GetAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult());
 }