/// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     Collateral           = new Collateral(this);
     CollateralAgreements = new CollateralAgreements(this);
     BaseUri = new System.Uri("http://localhost:18125");
     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();
 }
示例#2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <bool?> IsExistsAsync(this ICollateralAgreements operations, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.IsExistsWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#3
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <Models.Presentation.Responses.Collateral.Collateral> > GetCollateralByCollateralAgreementAsync(this ICollateralAgreements operations, string id, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetCollateralByCollateralAgreementWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
示例#4
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static bool?IsExists(this ICollateralAgreements operations, string id)
 {
     return(operations.IsExistsAsync(id).GetAwaiter().GetResult());
 }
示例#5
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='id'>
 /// </param>
 public static IList <Models.Presentation.Responses.Collateral.Collateral> GetCollateralByCollateralAgreement(this ICollateralAgreements operations, string id)
 {
     return(operations.GetCollateralByCollateralAgreementAsync(id).GetAwaiter().GetResult());
 }