Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the ReadingNotesApiApp class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public ReadingNotesApiApp(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._config       = new ConfigOperations(this);
     this._readingNotes = new ReadingNotesOperations(this);
     this._baseUri      = new Uri("https://readingnotesapiapp.azurewebsites.net");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the ReadingNotesApiApp class.
 /// </summary>
 public ReadingNotesApiApp()
     : base()
 {
     this._config       = new ConfigOperations(this);
     this._readingNotes = new ReadingNotesOperations(this);
     this._baseUri      = new Uri("https://readingnotesapiapp.azurewebsites.net");
 }
Ejemplo n.º 3
0
 /// <param name='operations'>
 /// Reference to the ReadingNotesServices.IReadingNotesOperations.
 /// </param>
 /// <param name='filename'>
 /// Required.
 /// </param>
 public static string ReProcessJSonReadingNotes(this IReadingNotesOperations operations, string filename)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReadingNotesOperations)s).ReProcessJSonReadingNotesAsync(filename);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 4
0
 /// <param name='operations'>
 /// Reference to the ReadingNotesServices.IReadingNotesOperations.
 /// </param>
 /// <param name='editionNumber'>
 /// Required.
 /// </param>
 public static ReadingNotes BuildReadingNotes(this IReadingNotesOperations operations, string editionNumber)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IReadingNotesOperations)s).BuildReadingNotesAsync(editionNumber);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 5
0
        /// <param name='operations'>
        /// Reference to the ReadingNotesServices.IReadingNotesOperations.
        /// </param>
        /// <param name='filename'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <string> ReProcessJSonReadingNotesAsync(this IReadingNotesOperations operations, string filename, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <string> result = await operations.ReProcessJSonReadingNotesWithOperationResponseAsync(filename, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
Ejemplo n.º 6
0
        /// <param name='operations'>
        /// Reference to the ReadingNotesServices.IReadingNotesOperations.
        /// </param>
        /// <param name='editionNumber'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <ReadingNotes> BuildReadingNotesAsync(this IReadingNotesOperations operations, string editionNumber, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <ReadingNotesServices.Models.ReadingNotes> result = await operations.BuildReadingNotesWithOperationResponseAsync(editionNumber, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }