Example #1
0
 /// <summary>
 /// Returns a list of the temporary, vacant or department chart positions
 /// defined for the chart
 /// </summary>
 /// <remarks>
 /// Sample request:
 ///
 /// GET /api/v1/remappings/53bec490-1cdc-42f5-8983-e6efe66dc685
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chartId'>
 /// ID of the chart definition
 /// </param>
 /// <param name='version'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Remapping> > GetRemappingsAsync(this IRemappingsApi operations, string chartId, string version, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetRemappingsWithHttpMessagesAsync(chartId, version, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #2
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     ChartDataApi          = new ChartDataApi(this);
     ChartsApi             = new ChartsApi(this);
     PositionsApi          = new PositionsApi(this);
     RemappingsApi         = new RemappingsApi(this);
     BaseUri               = new System.Uri("https://localhost:44320");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new  List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
Example #3
0
 /// <summary>
 /// Creates a new or updates an existing remapping in the chart.
 /// </summary>
 /// <remarks>
 /// Sample request:
 ///
 /// POST /api/v1/remappings/53bec490-1cdc-42f5-8983-e6efe66dc685
 /// [{
 /// "Id": 0,
 /// "UniqueId": "string",
 /// "FriendlyUniqueId": "string",
 /// "ManagerId": "string",
 /// "FriendlyManagerId": "string",
 /// "MappedId": "string",
 /// "FriendlyMappedId": "string"
 /// }]
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chartId'>
 /// ID of the chart definition
 /// </param>
 /// <param name='model'>
 /// Remapping model
 /// </param>
 /// <param name='version'>
 /// </param>
 public static Remapping AddRemapping(this IRemappingsApi operations, string chartId, Remapping model, string version)
 {
     return(operations.AddRemappingAsync(chartId, model, version).GetAwaiter().GetResult());
 }
Example #4
0
 /// <summary>
 /// Returns a list of the temporary, vacant or department chart positions
 /// defined for the chart
 /// </summary>
 /// <remarks>
 /// Sample request:
 ///
 /// GET /api/v1/remappings/53bec490-1cdc-42f5-8983-e6efe66dc685
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chartId'>
 /// ID of the chart definition
 /// </param>
 /// <param name='version'>
 /// </param>
 public static IList <Remapping> GetRemappings(this IRemappingsApi operations, string chartId, string version)
 {
     return(operations.GetRemappingsAsync(chartId, version).GetAwaiter().GetResult());
 }
Example #5
0
 /// <summary>
 /// Removes a remapping from the chart.
 /// </summary>
 /// <remarks>
 /// Sample request:
 ///
 /// DELETE /api/v1/remappings/53bec490-1cdc-42f5-8983-e6efe66dc685/123456
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chartId'>
 /// ID of the chart definition
 /// </param>
 /// <param name='remappingId'>
 /// ID of the mapping
 /// </param>
 /// <param name='version'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteRemappingAsync(this IRemappingsApi operations, string chartId, int remappingId, string version, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteRemappingWithHttpMessagesAsync(chartId, remappingId, version, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Example #6
0
 /// <summary>
 /// Removes a remapping from the chart.
 /// </summary>
 /// <remarks>
 /// Sample request:
 ///
 /// DELETE /api/v1/remappings/53bec490-1cdc-42f5-8983-e6efe66dc685/123456
 /// </remarks>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='chartId'>
 /// ID of the chart definition
 /// </param>
 /// <param name='remappingId'>
 /// ID of the mapping
 /// </param>
 /// <param name='version'>
 /// </param>
 public static void DeleteRemapping(this IRemappingsApi operations, string chartId, int remappingId, string version)
 {
     operations.DeleteRemappingAsync(chartId, remappingId, version).GetAwaiter().GetResult();
 }