@ -1,4 +1,8 @@
//----------------------
// <auto-generated>
// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
// </auto-generated>
//----------------------
#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
@ -25,7 +29,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
#pragma warning restore 8618
private System . Net . Http . HttpClient _ httpClient ;
private static System . Lazy < System . Tex t. Json . JsonSerializerOption s > _ settings = new System . Lazy < System . Tex t. Json . JsonSerializerOption s > ( CreateSerializerSettings , true ) ;
private static System . Lazy < Newtonsof t. Json . JsonSerializerSetting s > _ settings = new System . Lazy < Newtonsof t. Json . JsonSerializerSetting s > ( CreateSerializerSettings , true ) ;
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public Client ( string baseUrl , System . Net . Http . HttpClient httpClient )
@ -35,9 +39,9 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
_ httpClient = httpClient ;
}
private static System . Tex t. Json . JsonSerializerOption s CreateSerializerSettings ( )
private static Newtonsof t. Json . JsonSerializerSetting s CreateSerializerSettings ( )
{
var settings = new System . Tex t. Json . JsonSerializerOption s ( ) ;
var settings = new Newtonsof t. Json . JsonSerializerSetting s ( ) ;
UpdateJsonSerializerSettings ( settings ) ;
return settings ;
}
@ -53,9 +57,9 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
}
}
protected System . Tex t. Json . JsonSerializerOption s JsonSerializerSettings { get { return _ settings . Value ; } }
protected Newtonsof t. Json . JsonSerializerSetting s JsonSerializerSettings { get { return _ settings . Value ; } }
static partial void UpdateJsonSerializerSettings ( System . Tex t. Json . JsonSerializerOption s settings ) ;
static partial void UpdateJsonSerializerSettings ( Newtonsof t. Json . JsonSerializerSetting s settings ) ;
partial void PrepareRequest ( System . Net . Http . HttpClient client , System . Net . Http . HttpRequestMessage request , string url ) ;
partial void PrepareRequest ( System . Net . Http . HttpClient client , System . Net . Http . HttpRequestMessage request , System . Text . StringBuilder urlBuilder ) ;
@ -208,15 +212,15 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System . Threading . Tasks . Task < System . Collections . Generic . ICollection < ResponCargoItem > > GetCargoStaticAsync ( int? a reaID)
public virtual System . Threading . Tasks . Task < System . Collections . Generic . ICollection < ResponCargoItem > > GetCargoStaticAsync ( string p_A reaID)
{
return GetCargoStaticAsync ( a reaID, System . Threading . CancellationToken . None ) ;
return GetCargoStaticAsync ( p_A reaID, System . Threading . CancellationToken . None ) ;
}
/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual async System . Threading . Tasks . Task < System . Collections . Generic . ICollection < ResponCargoItem > > GetCargoStaticAsync ( int? a reaID, System . Threading . CancellationToken cancellationToken )
public virtual async System . Threading . Tasks . Task < System . Collections . Generic . ICollection < ResponCargoItem > > GetCargoStaticAsync ( string p_A reaID, System . Threading . CancellationToken cancellationToken )
{
var client_ = _ httpClient ;
var disposeClient_ = false ;
@ -233,9 +237,9 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
// Operation Path: "CargoState/GetCargoStatic"
urlBuilder_ . Append ( "CargoState/GetCargoStatic" ) ;
urlBuilder_ . Append ( '?' ) ;
if ( a reaID ! = null )
if ( p_A reaID ! = null )
{
urlBuilder_ . Append ( System . Uri . EscapeDataString ( "AreaID" ) ) . Append ( '=' ) . Append ( System . Uri . EscapeDataString ( ConvertToString ( a reaID, System . Globalization . CultureInfo . InvariantCulture ) ) ) . Append ( '&' ) ;
urlBuilder_ . Append ( System . Uri . EscapeDataString ( "p_ AreaID" ) ) . Append ( '=' ) . Append ( System . Uri . EscapeDataString ( ConvertToString ( p_A reaID, System . Globalization . CultureInfo . InvariantCulture ) ) ) . Append ( '&' ) ;
}
urlBuilder_ . Length - - ;
@ -378,10 +382,10 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
var responseText = await response . Content . ReadAsStringAsync ( ) . ConfigureAwait ( false ) ;
try
{
var typedBody = System . Tex t. Json . JsonSerializer . Deserialize < T > ( responseText , JsonSerializerSettings ) ;
var typedBody = Newtonsof t. Json . JsonConvert . DeserializeObject < T > ( responseText , JsonSerializerSettings ) ;
return new ObjectResponseResult < T > ( typedBody , responseText ) ;
}
catch ( System . Tex t. Json . JsonException exception )
catch ( Newtonsof t. Json . JsonException exception )
{
var message = "Could not deserialize the response body string as " + typeof ( T ) . FullName + "." ;
throw new ApiException ( message , ( int ) response . StatusCode , responseText , headers , exception ) ;
@ -392,12 +396,15 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
try
{
using ( var responseStream = await response . Content . ReadAsStreamAsync ( ) . ConfigureAwait ( false ) )
using ( var streamReader = new System . IO . StreamReader ( responseStream ) )
using ( var jsonTextReader = new Newtonsoft . Json . JsonTextReader ( streamReader ) )
{
var typedBody = await System . Text . Json . JsonSerializer . DeserializeAsync < T > ( responseStream , JsonSerializerSettings , cancellationToken ) . ConfigureAwait ( false ) ;
var serializer = Newtonsoft . Json . JsonSerializer . Create ( JsonSerializerSettings ) ;
var typedBody = serializer . Deserialize < T > ( jsonTextReader ) ;
return new ObjectResponseResult < T > ( typedBody , string . Empty ) ;
}
}
catch ( System . Tex t. Json . JsonException exception )
catch ( Newtonsof t. Json . JsonException exception )
{
var message = "Could not deserialize the response body stream as " + typeof ( T ) . FullName + "." ;
throw new ApiException ( message , ( int ) response . StatusCode , string . Empty , headers , exception ) ;
@ -463,20 +470,19 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceErrorInfo
{
[System.Text.Json.Serialization.JsonPropertyName("code")]
[Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Code { get ; set ; }
[System.Text.Json.Serialization.JsonPropertyName("message" )]
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public string Message { get ; set ; }
[System.Text.Json.Serialization.JsonPropertyName("details" )]
[Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public string Details { get ; set ; }
[System.Text.Json.Serialization.JsonPropertyName("data" )]
[Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public System . Collections . Generic . IDictionary < string , object > Data { get ; set ; }
[System.Text.Json.Serialization.JsonPropertyName("validationErrors" )]
[Newtonsoft.Json.JsonProperty("validationErrors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public System . Collections . Generic . ICollection < RemoteServiceValidationErrorInfo > ValidationErrors { get ; set ; }
}
@ -484,8 +490,7 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceErrorResponse
{
[System.Text.Json.Serialization.JsonPropertyName("error")]
[Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public RemoteServiceErrorInfo Error { get ; set ; }
}
@ -493,11 +498,10 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class RemoteServiceValidationErrorInfo
{
[System.Text.Json.Serialization.JsonPropertyName("message")]
[Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Message { get ; set ; }
[System.Text.Json.Serialization.JsonPropertyName("members" )]
[Newtonsoft.Json.JsonProperty("members", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public System . Collections . Generic . ICollection < string > Members { get ; set ; }
}
@ -508,29 +512,25 @@ namespace Win_in.Sfs.Wms.DataExchange.Fawtyg.InjectionMoldingTaskAgent.Incoming
/// <summary>
/// 区域ID
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("areaID")]
public int AreaID { get ; set ; }
[Newtonsoft.Json.JsonProperty("areaID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string AreaID { get ; set ; }
/// <summary>
/// 货位号
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("cargoID")]
[Newtonsoft.Json.JsonProperty("cargoID", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string CargoID { get ; set ; }
/// <summary>
/// 零件号
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("partCode")]
[Newtonsoft.Json.JsonProperty("partCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string PartCode { get ; set ; }
/// <summary>
/// 货位状态
/// </summary>
[System.Text.Json.Serialization.JsonPropertyName("flag")]
[Newtonsoft.Json.JsonProperty("flag", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public int Flag { get ; set ; }
}