Exemplo n.º 1
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> IsAliveAsync(this IResourcesAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsAliveWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets section of text resources
 /// </summary>
 /// <remarks>
 /// Returns text resources in the specified section, for example: lykke.ios
 /// will return all text resources under this section (lykke.ios.text,
 /// lykke.ios.title etc.)
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='lang'>
 /// language
 /// </param>
 /// <param name='name'>
 /// full name of the section
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> GetTextResourceSectionAsync(this IResourcesAPI operations, string lang, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetTextResourceSectionWithHttpMessagesAsync(lang, name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets all text resources
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <TextResource> > GetAllTextResourcesAsync(this IResourcesAPI operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllTextResourcesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Gets image resource by name
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <string> GetImageResourceAsync(this IResourcesAPI operations, string name, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetImageResourceWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// Adds group resources
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// list of group resources
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ErrorResponse> AddGroupResourcesAsync(this IResourcesAPI operations, GroupResourcesModel model = default(GroupResourcesModel), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.AddGroupResourcesWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 6
0
 /// <summary>
 /// Deletes language by code
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='code'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ErrorResponse> DeleteLanguageAsync(this IResourcesAPI operations, string code, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteLanguageWithHttpMessagesAsync(code, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Gets section of text resources
 /// </summary>
 /// <remarks>
 /// Returns text resources in the specified section, for example: lykke.ios
 /// will return all text resources under this section (lykke.ios.text,
 /// lykke.ios.title etc.)
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='lang'>
 /// language
 /// </param>
 /// <param name='name'>
 /// full name of the section
 /// </param>
 public static object GetTextResourceSection(this IResourcesAPI operations, string lang, string name)
 {
     return(operations.GetTextResourceSectionAsync(lang, name).GetAwaiter().GetResult());
 }
Exemplo n.º 8
0
 /// <summary>
 /// Adds group resources
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// list of group resources
 /// </param>
 public static ErrorResponse AddGroupResources(this IResourcesAPI operations, GroupResourcesModel model = default(GroupResourcesModel))
 {
     return(operations.AddGroupResourcesAsync(model).GetAwaiter().GetResult());
 }
Exemplo n.º 9
0
 /// <summary>
 /// Adds text resource
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// text resource model
 /// </param>
 public static ErrorResponse AddTextResource(this IResourcesAPI operations, TextResourceModel model = default(TextResourceModel))
 {
     return(operations.AddTextResourceAsync(model).GetAwaiter().GetResult());
 }
Exemplo n.º 10
0
 /// <summary>
 /// Gets all text resources
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <TextResource> GetAllTextResources(this IResourcesAPI operations)
 {
     return(operations.GetAllTextResourcesAsync().GetAwaiter().GetResult());
 }
Exemplo n.º 11
0
 /// <summary>
 /// Gets image resource by name
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// </param>
 public static string GetImageResource(this IResourcesAPI operations, string name)
 {
     return(operations.GetImageResourceAsync(name).GetAwaiter().GetResult());
 }
Exemplo n.º 12
0
 /// <summary>
 /// Deletes language by code
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='code'>
 /// </param>
 public static ErrorResponse DeleteLanguage(this IResourcesAPI operations, string code)
 {
     return(operations.DeleteLanguageAsync(code).GetAwaiter().GetResult());
 }
Exemplo n.º 13
0
 /// <summary>
 /// Adds language
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// language model
 /// </param>
 public static ErrorResponse AddLanguage(this IResourcesAPI operations, Language model = default(Language))
 {
     return(operations.AddLanguageAsync(model).GetAwaiter().GetResult());
 }
Exemplo n.º 14
0
 /// <summary>
 /// Checks service is alive
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static object IsAlive(this IResourcesAPI operations)
 {
     return(operations.IsAliveAsync().GetAwaiter().GetResult());
 }
Exemplo n.º 15
0
 /// <summary>
 /// Delete image resource by name
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// </param>
 public static ErrorResponse DeleteImageResource(this IResourcesAPI operations, string name)
 {
     return(operations.DeleteImageResourceAsync(name).GetAwaiter().GetResult());
 }
Exemplo n.º 16
0
 /// <summary>
 /// Deletes group resource
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static ErrorResponse DeleteGroupResource(this IResourcesAPI operations, DeleteGroupResourceModel model = default(DeleteGroupResourceModel))
 {
     return(operations.DeleteGroupResourceAsync(model).GetAwaiter().GetResult());
 }
Exemplo n.º 17
0
 /// <summary>
 /// Gets group resource by name
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='name'>
 /// full name of the resource
 /// </param>
 public static object GetGroupResource(this IResourcesAPI operations, string name)
 {
     return(operations.GetGroupResourceAsync(name).GetAwaiter().GetResult());
 }