更新常量字符串
This commit is contained in:
parent
66a4d18f33
commit
6f5854816d
Binary file not shown.
118
Scripts/DR_Generated/DRConstantString.cs
Normal file
118
Scripts/DR_Generated/DRConstantString.cs
Normal file
@ -0,0 +1,118 @@
|
||||
// 此文件由 ThriftIntegratedPipeline 自动生成,请勿手动修改
|
||||
// 配置类: ConstantString
|
||||
// 数据类: ConstantStringItem
|
||||
|
||||
using UnityEngine;
|
||||
using Byway.Config;
|
||||
using Byway.Thrift.Data;
|
||||
using UnityGameFramework.Runtime;
|
||||
|
||||
namespace CrazyMaple
|
||||
{
|
||||
/// <summary>
|
||||
/// ConstantString 数据行
|
||||
/// </summary>
|
||||
public class DRConstantString : DataRowBase
|
||||
{
|
||||
private ConstantStringItem _configData;
|
||||
|
||||
/// <summary>
|
||||
/// 唯一标识
|
||||
/// </summary>
|
||||
public override int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return _configData?.Id ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ConstantKey
|
||||
/// </summary>
|
||||
public string ConstantKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _configData?.ConstantKey ?? "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ConstantValue
|
||||
/// </summary>
|
||||
public string ConstantValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return _configData?.ConstantValue ?? "";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从配置加载数据(优先使用传入的配置实例)
|
||||
/// </summary>
|
||||
public void LoadFromConfig(int id, ConstantString config = null)
|
||||
{
|
||||
if (config == null)
|
||||
{
|
||||
config = ConfigManager.Instance.GetConfig<ConstantString>();
|
||||
}
|
||||
|
||||
if (config?.Constantstrings != null)
|
||||
{
|
||||
config.Constantstrings.TryGetValue(id, out _configData);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 直接设置配置数据(性能优化:跳过字典查询)
|
||||
/// </summary>
|
||||
public void SetConfigData(ConstantStringItem configData)
|
||||
{
|
||||
_configData = configData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 解析数据行(优化:使用 userData 传入的配置实例,避免重复调用 GetConfig)
|
||||
/// </summary>
|
||||
public override bool ParseDataRow(string dataRowString, object userData)
|
||||
{
|
||||
int id = 0;
|
||||
if (!int.TryParse(dataRowString, out id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// 性能优化:尝试从 userData 获取配置字典,直接获取 Item
|
||||
if (userData is System.Collections.Generic.Dictionary<string, object> userDataDict)
|
||||
{
|
||||
// 优先尝试从缓存的字典直接获取 Item(最快)
|
||||
if (userDataDict.TryGetValue("ConfigDict", out object dictObj))
|
||||
{
|
||||
var dict = dictObj as System.Collections.Generic.Dictionary<int, ConstantStringItem>;
|
||||
if (dict != null && dict.TryGetValue(id, out var item))
|
||||
{
|
||||
_configData = item;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// 备选方案:从配置实例获取
|
||||
if (userDataDict.TryGetValue("ConfigInstance", out object configObj))
|
||||
{
|
||||
var config = configObj as ConstantString;
|
||||
if (config != null)
|
||||
{
|
||||
LoadFromConfig(id, config);
|
||||
return _configData != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 兜底方案:直接查询(最慢)
|
||||
LoadFromConfig(id);
|
||||
return _configData != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Scripts/DR_Generated/DRConstantString.cs.meta
Normal file
11
Scripts/DR_Generated/DRConstantString.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 86c61335b5eb98741907e1dd08c2045d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -124,6 +124,7 @@ namespace Byway.Thrift.Data
|
||||
private global::Byway.Thrift.Data.WeekTaskReward _WeekTaskReward;
|
||||
private global::Byway.Thrift.Data.LevelLauncherData _LevelLauncherData;
|
||||
private global::Byway.Thrift.Data.NickNameRandomData _NickNameRandomData;
|
||||
private global::Byway.Thrift.Data.ConstantString _ConstantString;
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public global::Byway.Thrift.Data.AdGiftData AdGiftData
|
||||
@ -1301,6 +1302,20 @@ namespace Byway.Thrift.Data
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public global::Byway.Thrift.Data.ConstantString ConstantString
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ConstantString;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.ConstantString = true;
|
||||
this._ConstantString = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DataMember(Order = 1)]
|
||||
public Isset __isset;
|
||||
@ -1475,6 +1490,8 @@ namespace Byway.Thrift.Data
|
||||
public bool LevelLauncherData;
|
||||
[DataMember]
|
||||
public bool NickNameRandomData;
|
||||
[DataMember]
|
||||
public bool ConstantString;
|
||||
}
|
||||
|
||||
#region XmlSerializer support
|
||||
@ -1899,6 +1916,11 @@ namespace Byway.Thrift.Data
|
||||
return __isset.NickNameRandomData;
|
||||
}
|
||||
|
||||
public bool ShouldSerializeConstantString()
|
||||
{
|
||||
return __isset.ConstantString;
|
||||
}
|
||||
|
||||
#endregion XmlSerializer support
|
||||
|
||||
public AllConfigs()
|
||||
@ -2328,6 +2350,11 @@ namespace Byway.Thrift.Data
|
||||
tmp0.NickNameRandomData = (global::Byway.Thrift.Data.NickNameRandomData)this.NickNameRandomData.DeepCopy();
|
||||
}
|
||||
tmp0.__isset.NickNameRandomData = this.__isset.NickNameRandomData;
|
||||
if((ConstantString != null) && __isset.ConstantString)
|
||||
{
|
||||
tmp0.ConstantString = (global::Byway.Thrift.Data.ConstantString)this.ConstantString.DeepCopy();
|
||||
}
|
||||
tmp0.__isset.ConstantString = this.__isset.ConstantString;
|
||||
return tmp0;
|
||||
}
|
||||
|
||||
@ -3272,6 +3299,17 @@ namespace Byway.Thrift.Data
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 85:
|
||||
if (field.Type == TType.Struct)
|
||||
{
|
||||
ConstantString = new global::Byway.Thrift.Data.ConstantString();
|
||||
await ConstantString.ReadAsync(iprot, cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
break;
|
||||
@ -4052,6 +4090,15 @@ namespace Byway.Thrift.Data
|
||||
await NickNameRandomData.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((ConstantString != null) && __isset.ConstantString)
|
||||
{
|
||||
tmp2.Name = "ConstantString";
|
||||
tmp2.Type = TType.Struct;
|
||||
tmp2.ID = 85;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await ConstantString.WriteAsync(oprot, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
await oprot.WriteFieldStopAsync(cancellationToken);
|
||||
await oprot.WriteStructEndAsync(cancellationToken);
|
||||
}
|
||||
@ -4148,7 +4195,8 @@ namespace Byway.Thrift.Data
|
||||
&& ((__isset.WashStartMerge == other.__isset.WashStartMerge) && ((!__isset.WashStartMerge) || (global::System.Object.Equals(WashStartMerge, other.WashStartMerge))))
|
||||
&& ((__isset.WeekTaskReward == other.__isset.WeekTaskReward) && ((!__isset.WeekTaskReward) || (global::System.Object.Equals(WeekTaskReward, other.WeekTaskReward))))
|
||||
&& ((__isset.LevelLauncherData == other.__isset.LevelLauncherData) && ((!__isset.LevelLauncherData) || (global::System.Object.Equals(LevelLauncherData, other.LevelLauncherData))))
|
||||
&& ((__isset.NickNameRandomData == other.__isset.NickNameRandomData) && ((!__isset.NickNameRandomData) || (global::System.Object.Equals(NickNameRandomData, other.NickNameRandomData))));
|
||||
&& ((__isset.NickNameRandomData == other.__isset.NickNameRandomData) && ((!__isset.NickNameRandomData) || (global::System.Object.Equals(NickNameRandomData, other.NickNameRandomData))))
|
||||
&& ((__isset.ConstantString == other.__isset.ConstantString) && ((!__isset.ConstantString) || (global::System.Object.Equals(ConstantString, other.ConstantString))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
@ -4490,6 +4538,10 @@ namespace Byway.Thrift.Data
|
||||
{
|
||||
hashcode = (hashcode * 397) + NickNameRandomData.GetHashCode();
|
||||
}
|
||||
if((ConstantString != null) && __isset.ConstantString)
|
||||
{
|
||||
hashcode = (hashcode * 397) + ConstantString.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
@ -5002,6 +5054,12 @@ namespace Byway.Thrift.Data
|
||||
tmp3.Append("NickNameRandomData: ");
|
||||
NickNameRandomData.ToString(tmp3);
|
||||
}
|
||||
if((ConstantString != null) && __isset.ConstantString)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("ConstantString: ");
|
||||
ConstantString.ToString(tmp3);
|
||||
}
|
||||
tmp3.Append(')');
|
||||
return tmp3.ToString();
|
||||
}
|
||||
|
||||
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.22.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 Thrift;
|
||||
using Thrift.Collections;
|
||||
using System.Runtime.Serialization;
|
||||
using Thrift.Protocol;
|
||||
|
||||
|
||||
#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 IDE0305 // collection init can be simplified
|
||||
#pragma warning disable IDE0034 // simplify default expression
|
||||
#pragma warning disable IDE0066 // use switch expression
|
||||
#pragma warning disable IDE0090 // simplify new expression
|
||||
#pragma warning disable IDE0290 // use primary CTOR
|
||||
#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 Byway.Thrift.Data
|
||||
{
|
||||
public static class ConstantStringExtensions
|
||||
{
|
||||
public static bool Equals(this Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> instance, object that)
|
||||
{
|
||||
if (!(that is Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> other)) return false;
|
||||
if (ReferenceEquals(instance, other)) return true;
|
||||
|
||||
return TCollections.Equals(instance, other);
|
||||
}
|
||||
|
||||
|
||||
public static int GetHashCode(this Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> instance)
|
||||
{
|
||||
return TCollections.GetHashCode(instance);
|
||||
}
|
||||
|
||||
|
||||
public static Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> DeepCopy(this Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> source)
|
||||
{
|
||||
if (source == null)
|
||||
return null;
|
||||
|
||||
var tmp15 = new Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem>(source.Count);
|
||||
foreach (var pair in source)
|
||||
tmp15.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null);
|
||||
return tmp15;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ab3051e10dd3c847be039d50c934996
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
214
Scripts/thrift/gen-netstd/Byway/Thrift/Data/ConstantString.cs
Normal file
214
Scripts/thrift/gen-netstd/Byway/Thrift/Data/ConstantString.cs
Normal file
@ -0,0 +1,214 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.22.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 Thrift;
|
||||
using Thrift.Collections;
|
||||
using System.Runtime.Serialization;
|
||||
using Thrift.Protocol;
|
||||
using Thrift.Protocol.Entities;
|
||||
using Thrift.Protocol.Utilities;
|
||||
using Thrift.Transport;
|
||||
using Thrift.Transport.Client;
|
||||
|
||||
|
||||
#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 IDE0305 // collection init can be simplified
|
||||
#pragma warning disable IDE0034 // simplify default expression
|
||||
#pragma warning disable IDE0066 // use switch expression
|
||||
#pragma warning disable IDE0090 // simplify new expression
|
||||
#pragma warning disable IDE0290 // use primary CTOR
|
||||
#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 Byway.Thrift.Data
|
||||
{
|
||||
|
||||
[DataContract(Namespace="")]
|
||||
public partial class ConstantString : TBase
|
||||
{
|
||||
private Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> _constantstrings;
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem> Constantstrings
|
||||
{
|
||||
get
|
||||
{
|
||||
return _constantstrings;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.@constantstrings = true;
|
||||
this._constantstrings = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DataMember(Order = 1)]
|
||||
public Isset __isset;
|
||||
[DataContract]
|
||||
public struct Isset
|
||||
{
|
||||
[DataMember]
|
||||
public bool @constantstrings;
|
||||
}
|
||||
|
||||
#region XmlSerializer support
|
||||
|
||||
public bool ShouldSerializeConstantstrings()
|
||||
{
|
||||
return __isset.@constantstrings;
|
||||
}
|
||||
|
||||
#endregion XmlSerializer support
|
||||
|
||||
public ConstantString()
|
||||
{
|
||||
}
|
||||
|
||||
public ConstantString DeepCopy()
|
||||
{
|
||||
var tmp5 = new ConstantString();
|
||||
if((Constantstrings != null) && __isset.@constantstrings)
|
||||
{
|
||||
tmp5.Constantstrings = this.Constantstrings.DeepCopy();
|
||||
}
|
||||
tmp5.__isset.@constantstrings = this.__isset.@constantstrings;
|
||||
return tmp5;
|
||||
}
|
||||
|
||||
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.Map)
|
||||
{
|
||||
{
|
||||
var _map6 = await iprot.ReadMapBeginAsync(cancellationToken);
|
||||
Constantstrings = new Dictionary<int, global::Byway.Thrift.Data.ConstantStringItem>(_map6.Count);
|
||||
for(int _i7 = 0; _i7 < _map6.Count; ++_i7)
|
||||
{
|
||||
int _key8;
|
||||
global::Byway.Thrift.Data.ConstantStringItem _val9;
|
||||
_key8 = await iprot.ReadI32Async(cancellationToken);
|
||||
_val9 = new global::Byway.Thrift.Data.ConstantStringItem();
|
||||
await _val9.ReadAsync(iprot, cancellationToken);
|
||||
Constantstrings[_key8] = _val9;
|
||||
}
|
||||
await iprot.ReadMapEndAsync(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 tmp10 = new TStruct("ConstantString");
|
||||
await oprot.WriteStructBeginAsync(tmp10, cancellationToken);
|
||||
var tmp11 = new TField();
|
||||
if((Constantstrings != null) && __isset.@constantstrings)
|
||||
{
|
||||
tmp11.Name = "constantstrings";
|
||||
tmp11.Type = TType.Map;
|
||||
tmp11.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp11, cancellationToken);
|
||||
await oprot.WriteMapBeginAsync(new TMap(TType.I32, TType.Struct, Constantstrings.Count), cancellationToken);
|
||||
foreach (int _iter12 in Constantstrings.Keys)
|
||||
{
|
||||
await oprot.WriteI32Async(_iter12, cancellationToken);
|
||||
await Constantstrings[_iter12].WriteAsync(oprot, cancellationToken);
|
||||
}
|
||||
await oprot.WriteMapEndAsync(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 ConstantString other)) return false;
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
return ((__isset.@constantstrings == other.__isset.@constantstrings) && ((!__isset.@constantstrings) || (TCollections.Equals(Constantstrings, other.Constantstrings))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if((Constantstrings != null) && __isset.@constantstrings)
|
||||
{
|
||||
hashcode = (hashcode * 397) + TCollections.GetHashCode(Constantstrings);
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp13 = new StringBuilder("ConstantString(");
|
||||
int tmp14 = 0;
|
||||
if((Constantstrings != null) && __isset.@constantstrings)
|
||||
{
|
||||
if(0 < tmp14++) { tmp13.Append(", "); }
|
||||
tmp13.Append("Constantstrings: ");
|
||||
Constantstrings.ToString(tmp13);
|
||||
}
|
||||
tmp13.Append(')');
|
||||
return tmp13.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da1e862f8f8d02f439f8105bea38ae31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -0,0 +1,309 @@
|
||||
/**
|
||||
* <auto-generated>
|
||||
* Autogenerated by Thrift Compiler (0.22.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 Thrift;
|
||||
using Thrift.Collections;
|
||||
using System.Runtime.Serialization;
|
||||
using Thrift.Protocol;
|
||||
using Thrift.Protocol.Entities;
|
||||
using Thrift.Protocol.Utilities;
|
||||
using Thrift.Transport;
|
||||
using Thrift.Transport.Client;
|
||||
|
||||
|
||||
#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 IDE0305 // collection init can be simplified
|
||||
#pragma warning disable IDE0034 // simplify default expression
|
||||
#pragma warning disable IDE0066 // use switch expression
|
||||
#pragma warning disable IDE0090 // simplify new expression
|
||||
#pragma warning disable IDE0290 // use primary CTOR
|
||||
#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 Byway.Thrift.Data
|
||||
{
|
||||
|
||||
[DataContract(Namespace="")]
|
||||
public partial class ConstantStringItem : TBase
|
||||
{
|
||||
private int _Id;
|
||||
private string _ConstantKey;
|
||||
private string _ConstantValue;
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public int Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.Id = true;
|
||||
this._Id = value;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public string ConstantKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ConstantKey;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.ConstantKey = true;
|
||||
this._ConstantKey = value;
|
||||
}
|
||||
}
|
||||
|
||||
[DataMember(Order = 0)]
|
||||
public string ConstantValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ConstantValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
__isset.ConstantValue = true;
|
||||
this._ConstantValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DataMember(Order = 1)]
|
||||
public Isset __isset;
|
||||
[DataContract]
|
||||
public struct Isset
|
||||
{
|
||||
[DataMember]
|
||||
public bool Id;
|
||||
[DataMember]
|
||||
public bool ConstantKey;
|
||||
[DataMember]
|
||||
public bool ConstantValue;
|
||||
}
|
||||
|
||||
#region XmlSerializer support
|
||||
|
||||
public bool ShouldSerializeId()
|
||||
{
|
||||
return __isset.Id;
|
||||
}
|
||||
|
||||
public bool ShouldSerializeConstantKey()
|
||||
{
|
||||
return __isset.ConstantKey;
|
||||
}
|
||||
|
||||
public bool ShouldSerializeConstantValue()
|
||||
{
|
||||
return __isset.ConstantValue;
|
||||
}
|
||||
|
||||
#endregion XmlSerializer support
|
||||
|
||||
public ConstantStringItem()
|
||||
{
|
||||
}
|
||||
|
||||
public ConstantStringItem DeepCopy()
|
||||
{
|
||||
var tmp0 = new ConstantStringItem();
|
||||
if(__isset.Id)
|
||||
{
|
||||
tmp0.Id = this.Id;
|
||||
}
|
||||
tmp0.__isset.Id = this.__isset.Id;
|
||||
if((ConstantKey != null) && __isset.ConstantKey)
|
||||
{
|
||||
tmp0.ConstantKey = this.ConstantKey;
|
||||
}
|
||||
tmp0.__isset.ConstantKey = this.__isset.ConstantKey;
|
||||
if((ConstantValue != null) && __isset.ConstantValue)
|
||||
{
|
||||
tmp0.ConstantValue = this.ConstantValue;
|
||||
}
|
||||
tmp0.__isset.ConstantValue = this.__isset.ConstantValue;
|
||||
return tmp0;
|
||||
}
|
||||
|
||||
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.I32)
|
||||
{
|
||||
Id = await iprot.ReadI32Async(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
ConstantKey = await iprot.ReadStringAsync(cancellationToken);
|
||||
}
|
||||
else
|
||||
{
|
||||
await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (field.Type == TType.String)
|
||||
{
|
||||
ConstantValue = 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 tmp1 = new TStruct("ConstantStringItem");
|
||||
await oprot.WriteStructBeginAsync(tmp1, cancellationToken);
|
||||
var tmp2 = new TField();
|
||||
if(__isset.Id)
|
||||
{
|
||||
tmp2.Name = "Id";
|
||||
tmp2.Type = TType.I32;
|
||||
tmp2.ID = 1;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteI32Async(Id, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((ConstantKey != null) && __isset.ConstantKey)
|
||||
{
|
||||
tmp2.Name = "ConstantKey";
|
||||
tmp2.Type = TType.String;
|
||||
tmp2.ID = 2;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteStringAsync(ConstantKey, cancellationToken);
|
||||
await oprot.WriteFieldEndAsync(cancellationToken);
|
||||
}
|
||||
if((ConstantValue != null) && __isset.ConstantValue)
|
||||
{
|
||||
tmp2.Name = "ConstantValue";
|
||||
tmp2.Type = TType.String;
|
||||
tmp2.ID = 3;
|
||||
await oprot.WriteFieldBeginAsync(tmp2, cancellationToken);
|
||||
await oprot.WriteStringAsync(ConstantValue, 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 ConstantStringItem 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.ConstantKey == other.__isset.ConstantKey) && ((!__isset.ConstantKey) || (global::System.Object.Equals(ConstantKey, other.ConstantKey))))
|
||||
&& ((__isset.ConstantValue == other.__isset.ConstantValue) && ((!__isset.ConstantValue) || (global::System.Object.Equals(ConstantValue, other.ConstantValue))));
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
int hashcode = 157;
|
||||
unchecked {
|
||||
if(__isset.Id)
|
||||
{
|
||||
hashcode = (hashcode * 397) + Id.GetHashCode();
|
||||
}
|
||||
if((ConstantKey != null) && __isset.ConstantKey)
|
||||
{
|
||||
hashcode = (hashcode * 397) + ConstantKey.GetHashCode();
|
||||
}
|
||||
if((ConstantValue != null) && __isset.ConstantValue)
|
||||
{
|
||||
hashcode = (hashcode * 397) + ConstantValue.GetHashCode();
|
||||
}
|
||||
}
|
||||
return hashcode;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var tmp3 = new StringBuilder("ConstantStringItem(");
|
||||
int tmp4 = 0;
|
||||
if(__isset.Id)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("Id: ");
|
||||
Id.ToString(tmp3);
|
||||
}
|
||||
if((ConstantKey != null) && __isset.ConstantKey)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("ConstantKey: ");
|
||||
ConstantKey.ToString(tmp3);
|
||||
}
|
||||
if((ConstantValue != null) && __isset.ConstantValue)
|
||||
{
|
||||
if(0 < tmp4++) { tmp3.Append(", "); }
|
||||
tmp3.Append("ConstantValue: ");
|
||||
ConstantValue.ToString(tmp3);
|
||||
}
|
||||
tmp3.Append(')');
|
||||
return tmp3.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19174364fafd3df43b8db50048ccbe29
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue
Block a user