예제 #1
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public static IList<Enrollment> DeserializeJson(JToken inputObject)
 {
     IList<Enrollment> deserializedObject = new List<Enrollment>();
     foreach (JToken iListValue in ((JArray)inputObject))
     {
         Enrollment enrollment = new Enrollment();
         enrollment.DeserializeJson(iListValue);
         deserializedObject.Add(enrollment);
     }
     return deserializedObject;
 }
예제 #2
0
 /// <param name='operations'>
 /// Reference to the ConsotoUniWebApp.IEnrollments.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='enrollment'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<object> PutEnrollmentAsync(this IEnrollments operations, int id, Enrollment enrollment, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<object> result = await operations.PutEnrollmentWithOperationResponseAsync(id, enrollment, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }
예제 #3
0
 /// <param name='operations'>
 /// Reference to the ConsotoUniWebApp.IEnrollments.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 /// <param name='enrollment'>
 /// Required.
 /// </param>
 public static object PutEnrollment(this IEnrollments operations, int id, Enrollment enrollment)
 {
     return Task.Factory.StartNew((object s) => 
     {
         return ((IEnrollments)s).PutEnrollmentAsync(id, enrollment);
     }
     , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
 }
예제 #4
0
 /// <param name='operations'>
 /// Reference to the ConsotoUniWebApp.IEnrollments.
 /// </param>
 /// <param name='enrollment'>
 /// Required.
 /// </param>
 /// <param name='cancellationToken'>
 /// Cancellation token.
 /// </param>
 public static async Task<Enrollment> PostEnrollmentAsync(this IEnrollments operations, Enrollment enrollment, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     Microsoft.Rest.HttpOperationResponse<ConsotoUniWebApp.Models.Enrollment> result = await operations.PostEnrollmentWithOperationResponseAsync(enrollment, cancellationToken).ConfigureAwait(false);
     return result.Body;
 }