forked from PickReaper/quantower
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBusinessObjectInfo.cs
More file actions
175 lines (158 loc) · 4.21 KB
/
BusinessObjectInfo.cs
File metadata and controls
175 lines (158 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
using System;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
using System.Xml.Linq;
using _003CPrivateImplementationDetails_003E_007B32439FAB_002DE055_002D4B6F_002D932A_002DAD6005671EA2_007D;
using Platform.Utils;
using TradingPlatform.BusinessLayer.Serialization;
namespace TradingPlatform.BusinessLayer;
[Serializable]
[DataContract]
public class BusinessObjectInfo : IXElementSerialization, IEquatable<BusinessObjectInfo>
{
[CompilerGenerated]
private string 놫놯;
[CompilerGenerated]
private string 놫녾;
[CompilerGenerated]
private string 놫녬;
[DataMember(Name = "Id")]
public string Id
{
[CompilerGenerated]
get
{
return 놫놯;
}
[CompilerGenerated]
internal set
{
놫놯 = value;
}
}
[DataMember(Name = "ConnectionId")]
public string ConnectionId
{
[CompilerGenerated]
get
{
return 놫녾;
}
[CompilerGenerated]
internal set
{
놫녾 = value;
}
}
[DataMember(Name = "Name")]
public string Name
{
[CompilerGenerated]
get
{
return 놫녬;
}
[CompilerGenerated]
internal set
{
놫녬 = value;
}
}
protected virtual bool NeedToEncryptInfo => false;
public static BusinessObjectInfo Empty => new BusinessObjectInfo
{
Id = string.Empty,
ConnectionId = string.Empty,
Name = string.Empty
};
public virtual XElement ToXElement()
{
XElement xElement = new XElement(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.녶녬());
xElement.Add(new XElement(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.녶녭(), NeedToEncryptInfo ? Encryptor.녴(Id) : Id));
xElement.Add(new XElement(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놎뇉(), ConnectionId));
xElement.Add(new XElement(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놂놵(), NeedToEncryptInfo ? Encryptor.녴(Name) : Name));
return xElement;
}
public virtual void FromXElement(XElement element, DeserializationInfo deserializationInfo)
{
string value = element.Element(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.녶녭()).Value;
if (NeedToEncryptInfo)
{
string text = Encryptor.놴(value);
if (text != null)
{
Id = text;
goto IL_0038;
}
}
Id = value;
goto IL_0038;
IL_0038:
ConnectionId = ConnectionsManager.녪녬.녴(element.Element(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놎뇉()).Value);
string value2 = element.Element(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놂놵()).Value;
if (NeedToEncryptInfo)
{
string text2 = Encryptor.놴(value2);
if (text2 != null)
{
Name = text2;
return;
}
}
Name = value2;
}
public override string ToString()
{
DefaultInterpolatedStringHandler defaultInterpolatedStringHandler = new DefaultInterpolatedStringHandler(6, 3);
defaultInterpolatedStringHandler.AppendFormatted(ConnectionId);
defaultInterpolatedStringHandler.AppendLiteral(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놎놖());
defaultInterpolatedStringHandler.AppendFormatted(Id);
defaultInterpolatedStringHandler.AppendLiteral(_26195AC7_002DD65B_002D4910_002DB963_002D637D18805E71.놎놖());
defaultInterpolatedStringHandler.AppendFormatted(Name);
return defaultInterpolatedStringHandler.ToStringAndClear();
}
public bool Equals(BusinessObjectInfo other)
{
if ((object)other == null)
{
return false;
}
if ((object)this == other)
{
return true;
}
if (Id == other.Id && ConnectionId == other.ConnectionId)
{
return Name == other.Name;
}
return false;
}
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (this == obj)
{
return true;
}
if (obj.GetType() != GetType())
{
return false;
}
return Equals((BusinessObjectInfo)obj);
}
public override int GetHashCode()
{
return HashCode.Combine(Id, ConnectionId, Name);
}
public static bool operator ==(BusinessObjectInfo left, BusinessObjectInfo right)
{
return object.Equals(left, right);
}
public static bool operator !=(BusinessObjectInfo left, BusinessObjectInfo right)
{
return !object.Equals(left, right);
}
}