2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-06-13 14:38:43 +00:00
This commit is contained in:
2026-06-08 16:15:57 +03:00
parent 8143da2eee
commit 340798a5fa
111 changed files with 20647 additions and 27 deletions
+479
View File
@@ -0,0 +1,479 @@
/**
* <auto-generated>
* Autogenerated by Thrift Compiler (0.19.0)
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* </auto-generated>
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Thrift;
using Thrift.Collections;
using Thrift.Protocol;
using Thrift.Protocol.Entities;
using Thrift.Protocol.Utilities;
using Thrift.Transport;
using Thrift.Transport.Client;
using Thrift.Transport.Server;
using Thrift.Processor;
#pragma warning disable IDE0079 // remove unnecessary pragmas
#pragma warning disable IDE0017 // object init can be simplified
#pragma warning disable IDE0028 // collection init can be simplified
#pragma warning disable IDE1006 // parts of the code use IDL spelling
#pragma warning disable CA1822 // empty DeepCopy() methods still non-static
#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions
namespace Echo.ThriftModel
{
public partial class Party : TBase
{
private long _id;
private string _name;
private string _taxId;
private string _email;
private string _phone;
private global::Echo.ThriftModel.Address _address;
private string _preferredLanguage;
public long Id
{
get
{
return _id;
}
set
{
__isset.@id = true;
this._id = value;
}
}
public string Name
{
get
{
return _name;
}
set
{
__isset.@name = true;
this._name = value;
}
}
public string TaxId
{
get
{
return _taxId;
}
set
{
__isset.taxId = true;
this._taxId = value;
}
}
public string Email
{
get
{
return _email;
}
set
{
__isset.@email = true;
this._email = value;
}
}
public string Phone
{
get
{
return _phone;
}
set
{
__isset.@phone = true;
this._phone = value;
}
}
public global::Echo.ThriftModel.Address Address
{
get
{
return _address;
}
set
{
__isset.@address = true;
this._address = value;
}
}
public string PreferredLanguage
{
get
{
return _preferredLanguage;
}
set
{
__isset.preferredLanguage = true;
this._preferredLanguage = value;
}
}
public Isset __isset;
public struct Isset
{
public bool @id;
public bool @name;
public bool taxId;
public bool @email;
public bool @phone;
public bool @address;
public bool preferredLanguage;
}
public Party()
{
}
public Party DeepCopy()
{
var tmp20 = new Party();
if(__isset.@id)
{
tmp20.Id = this.Id;
}
tmp20.__isset.@id = this.__isset.@id;
if((Name != null) && __isset.@name)
{
tmp20.Name = this.Name;
}
tmp20.__isset.@name = this.__isset.@name;
if((TaxId != null) && __isset.taxId)
{
tmp20.TaxId = this.TaxId;
}
tmp20.__isset.taxId = this.__isset.taxId;
if((Email != null) && __isset.@email)
{
tmp20.Email = this.Email;
}
tmp20.__isset.@email = this.__isset.@email;
if((Phone != null) && __isset.@phone)
{
tmp20.Phone = this.Phone;
}
tmp20.__isset.@phone = this.__isset.@phone;
if((Address != null) && __isset.@address)
{
tmp20.Address = (global::Echo.ThriftModel.Address)this.Address.DeepCopy();
}
tmp20.__isset.@address = this.__isset.@address;
if((PreferredLanguage != null) && __isset.preferredLanguage)
{
tmp20.PreferredLanguage = this.PreferredLanguage;
}
tmp20.__isset.preferredLanguage = this.__isset.preferredLanguage;
return tmp20;
}
public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
{
iprot.IncrementRecursionDepth();
try
{
TField field;
await iprot.ReadStructBeginAsync(cancellationToken);
while (true)
{
field = await iprot.ReadFieldBeginAsync(cancellationToken);
if (field.Type == TType.Stop)
{
break;
}
switch (field.ID)
{
case 1:
if (field.Type == TType.I64)
{
Id = await iprot.ReadI64Async(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 2:
if (field.Type == TType.String)
{
Name = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 3:
if (field.Type == TType.String)
{
TaxId = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 4:
if (field.Type == TType.String)
{
Email = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 5:
if (field.Type == TType.String)
{
Phone = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 6:
if (field.Type == TType.Struct)
{
Address = new global::Echo.ThriftModel.Address();
await Address.ReadAsync(iprot, cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
case 7:
if (field.Type == TType.String)
{
PreferredLanguage = await iprot.ReadStringAsync(cancellationToken);
}
else
{
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
}
break;
default:
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
break;
}
await iprot.ReadFieldEndAsync(cancellationToken);
}
await iprot.ReadStructEndAsync(cancellationToken);
}
finally
{
iprot.DecrementRecursionDepth();
}
}
public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken)
{
oprot.IncrementRecursionDepth();
try
{
var tmp21 = new TStruct("Party");
await oprot.WriteStructBeginAsync(tmp21, cancellationToken);
var tmp22 = new TField();
if(__isset.@id)
{
tmp22.Name = "id";
tmp22.Type = TType.I64;
tmp22.ID = 1;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteI64Async(Id, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Name != null) && __isset.@name)
{
tmp22.Name = "name";
tmp22.Type = TType.String;
tmp22.ID = 2;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteStringAsync(Name, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((TaxId != null) && __isset.taxId)
{
tmp22.Name = "taxId";
tmp22.Type = TType.String;
tmp22.ID = 3;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteStringAsync(TaxId, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Email != null) && __isset.@email)
{
tmp22.Name = "email";
tmp22.Type = TType.String;
tmp22.ID = 4;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteStringAsync(Email, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Phone != null) && __isset.@phone)
{
tmp22.Name = "phone";
tmp22.Type = TType.String;
tmp22.ID = 5;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteStringAsync(Phone, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((Address != null) && __isset.@address)
{
tmp22.Name = "address";
tmp22.Type = TType.Struct;
tmp22.ID = 6;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await Address.WriteAsync(oprot, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
if((PreferredLanguage != null) && __isset.preferredLanguage)
{
tmp22.Name = "preferredLanguage";
tmp22.Type = TType.String;
tmp22.ID = 7;
await oprot.WriteFieldBeginAsync(tmp22, cancellationToken);
await oprot.WriteStringAsync(PreferredLanguage, cancellationToken);
await oprot.WriteFieldEndAsync(cancellationToken);
}
await oprot.WriteFieldStopAsync(cancellationToken);
await oprot.WriteStructEndAsync(cancellationToken);
}
finally
{
oprot.DecrementRecursionDepth();
}
}
public override bool Equals(object that)
{
if (!(that is Party other)) return false;
if (ReferenceEquals(this, other)) return true;
return ((__isset.@id == other.__isset.@id) && ((!__isset.@id) || (global::System.Object.Equals(Id, other.Id))))
&& ((__isset.@name == other.__isset.@name) && ((!__isset.@name) || (global::System.Object.Equals(Name, other.Name))))
&& ((__isset.taxId == other.__isset.taxId) && ((!__isset.taxId) || (global::System.Object.Equals(TaxId, other.TaxId))))
&& ((__isset.@email == other.__isset.@email) && ((!__isset.@email) || (global::System.Object.Equals(Email, other.Email))))
&& ((__isset.@phone == other.__isset.@phone) && ((!__isset.@phone) || (global::System.Object.Equals(Phone, other.Phone))))
&& ((__isset.@address == other.__isset.@address) && ((!__isset.@address) || (global::System.Object.Equals(Address, other.Address))))
&& ((__isset.preferredLanguage == other.__isset.preferredLanguage) && ((!__isset.preferredLanguage) || (global::System.Object.Equals(PreferredLanguage, other.PreferredLanguage))));
}
public override int GetHashCode() {
int hashcode = 157;
unchecked {
if(__isset.@id)
{
hashcode = (hashcode * 397) + Id.GetHashCode();
}
if((Name != null) && __isset.@name)
{
hashcode = (hashcode * 397) + Name.GetHashCode();
}
if((TaxId != null) && __isset.taxId)
{
hashcode = (hashcode * 397) + TaxId.GetHashCode();
}
if((Email != null) && __isset.@email)
{
hashcode = (hashcode * 397) + Email.GetHashCode();
}
if((Phone != null) && __isset.@phone)
{
hashcode = (hashcode * 397) + Phone.GetHashCode();
}
if((Address != null) && __isset.@address)
{
hashcode = (hashcode * 397) + Address.GetHashCode();
}
if((PreferredLanguage != null) && __isset.preferredLanguage)
{
hashcode = (hashcode * 397) + PreferredLanguage.GetHashCode();
}
}
return hashcode;
}
public override string ToString()
{
var tmp23 = new StringBuilder("Party(");
int tmp24 = 0;
if(__isset.@id)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("Id: ");
Id.ToString(tmp23);
}
if((Name != null) && __isset.@name)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("Name: ");
Name.ToString(tmp23);
}
if((TaxId != null) && __isset.taxId)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("TaxId: ");
TaxId.ToString(tmp23);
}
if((Email != null) && __isset.@email)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("Email: ");
Email.ToString(tmp23);
}
if((Phone != null) && __isset.@phone)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("Phone: ");
Phone.ToString(tmp23);
}
if((Address != null) && __isset.@address)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("Address: ");
Address.ToString(tmp23);
}
if((PreferredLanguage != null) && __isset.preferredLanguage)
{
if(0 < tmp24++) { tmp23.Append(", "); }
tmp23.Append("PreferredLanguage: ");
PreferredLanguage.ToString(tmp23);
}
tmp23.Append(')');
return tmp23.ToString();
}
}
}