コード例 #1
0
 /// <summary>
 /// Gets the Entity definition for the given GUID.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='guid'>
 /// The globally unique identifier of the entity.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <JsonAtlasEntityDef> GetEntityDefByGuidAsync(this ITypesREST operations, string guid, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetEntityDefByGuidWithHttpMessagesAsync(guid, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Gets the Entity definition for the given GUID.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='guid'>
 /// The globally unique identifier of the entity.
 /// </param>
 public static JsonAtlasEntityDef GetEntityDefByGuid(this ITypesREST operations, string guid)
 {
     return(operations.GetEntityDefByGuidAsync(guid).GetAwaiter().GetResult());
 }
コード例 #3
0
 /// <summary>
 /// Gets the classification definition by its name (unique).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// The name of the classification.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <JsonAtlasClassificationDef> GetClassificationDefByNameAsync(this ITypesREST operations, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetClassificationDefByNameWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #4
0
 /// <summary>
 /// Gets the classification definition by its name (unique).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// The name of the classification.
 /// </param>
 public static JsonAtlasClassificationDef GetClassificationDefByName(this ITypesREST operations, string name)
 {
     return(operations.GetClassificationDefByNameAsync(name).GetAwaiter().GetResult());
 }
コード例 #5
0
 /// <summary>
 /// Lists all type definitions returned as a list of minimal information
 /// header.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <JsonAtlasTypeDefHeader> > GetTypeDefHeadersAsync(this ITypesREST operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetTypeDefHeadersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #6
0
 /// <summary>
 /// Lists all type definitions returned as a list of minimal information
 /// header.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <JsonAtlasTypeDefHeader> GetTypeDefHeaders(this ITypesREST operations)
 {
     return(operations.GetTypeDefHeadersAsync().GetAwaiter().GetResult());
 }
コード例 #7
0
 /// <summary>
 /// Deletes API for all types in bulk.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='typesDef'>
 /// A composite object that captures all types to be deleted
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAtlasTypeDefsAsync(this ITypesREST operations, JsonAtlasTypesDef typesDef, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteAtlasTypeDefsWithHttpMessagesAsync(typesDef, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #8
0
 /// <summary>
 /// Deletes API for all types in bulk.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='typesDef'>
 /// A composite object that captures all types to be deleted
 /// </param>
 public static void DeleteAtlasTypeDefs(this ITypesREST operations, JsonAtlasTypesDef typesDef)
 {
     operations.DeleteAtlasTypeDefsAsync(typesDef).GetAwaiter().GetResult();
 }
コード例 #9
0
 /// <summary>
 /// Updates all types in bulk, changes detected in the type definitions would
 /// be persisted.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='typesDef'>
 /// A composite object that captures all type definition changes.
 /// </param>
 public static JsonAtlasTypesDef UpdateAtlasTypeDefs(this ITypesREST operations, JsonAtlasTypesDef typesDef)
 {
     return(operations.UpdateAtlasTypeDefsAsync(typesDef).GetAwaiter().GetResult());
 }
コード例 #10
0
 /// <summary>
 /// Gets all type definitions in Atlas in bulk.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static JsonAtlasTypesDef GetAllTypeDefs(this ITypesREST operations)
 {
     return(operations.GetAllTypeDefsAsync().GetAwaiter().GetResult());
 }