Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
WriteObjectInfo.cs
Go to the documentation of this file.
3
5
6internal sealed class WriteObjectInfo
7{
8 internal int _objectInfoId;
9
10 internal object _obj;
11
13 internal Type _objectType;
14
15 internal bool _isSi;
16
17 internal bool _isNamed;
18
19 internal bool _isArray;
20
22
24
25 internal object[] _memberData;
26
28
30
32
33 internal long _objectId;
34
35 internal long _assemId;
36
37 private string _binderTypeName;
38
39 private string _binderAssemblyString;
40
41 internal WriteObjectInfo()
42 {
43 }
44
45 internal void ObjectEnd()
46 {
48 }
49
50 private void InternalInit()
51 {
52 _obj = null;
53 _objectType = null;
54 _isSi = false;
55 _isNamed = false;
56 _isArray = false;
57 _si = null;
58 _cache = null;
59 _memberData = null;
60 _objectId = 0L;
61 _assemId = 0L;
62 _binderTypeName = null;
64 }
65
66 [RequiresUnreferencedCode("It isn't possible to statically get the Type of object")]
73
74 [RequiresUnreferencedCode("It isn't possible to statically get the Type of object")]
115
122
157
158 private void InitSiWrite()
159 {
161 _isSi = true;
163 int num = 0;
164 num = _si.MemberCount;
165 int num2 = num;
169 bool hasTypeForwardedFrom = false;
171 {
173 fullTypeName = typeInformation.FullTypeName;
174 hasTypeForwardedFrom = typeInformation.HasTypeForwardedFrom;
175 }
177 {
178 if (typeInformation == null)
179 {
181 }
182 assemblyName = typeInformation.AssemblyString;
183 hasTypeForwardedFrom = typeInformation.HasTypeForwardedFrom;
184 }
186 _cache._memberNames = new string[num2];
188 _memberData = new object[num2];
190 int num3 = 0;
191 while (serializationInfoEnumerator.MoveNext())
192 {
196 num3++;
197 }
198 _isNamed = true;
199 }
200
204
213
214 private void InitMemberInfo()
215 {
217 {
220 int num = _cache._memberInfos.Length;
221 _cache._memberNames = new string[num];
222 _cache._memberTypes = new Type[num];
223 for (int i = 0; i < num; i++)
224 {
226 _cache._memberTypes[i] = ((FieldInfo)_cache._memberInfos[i]).FieldType;
227 }
229 }
230 if (_obj != null)
231 {
233 }
234 _isNamed = true;
235 }
236
237 internal string GetTypeFullName()
238 {
240 }
241
242 internal string GetAssemblyString()
243 {
245 }
246
252
263
265 {
267 if (!serObjectInfoInit._oiPool.IsEmpty())
268 {
271 }
272 else
273 {
276 }
277 return writeObjectInfo;
278 }
279
284}
virtual ? string FullName
Definition Assembly.cs:74
static ? object[] GetObjectData(object obj, MemberInfo[] members)
static MemberInfo[] GetSerializableMembers([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type)
readonly Dictionary< Type, SerObjectInfoCache > _seenBeforeTable
static WriteObjectInfo Serialize([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder binder)
void InitSerialize([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, SerializationBinder binder)
static WriteObjectInfo Serialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
void InitSerialize(object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
static void PutObjectInfo(SerObjectInfoInit serObjectInfoInit, WriteObjectInfo objectInfo)
static void CheckTypeForwardedFrom(SerObjectInfoCache cache, Type objectType, string binderAssemblyString)
void GetMemberInfo(out string[] outMemberNames, out Type[] outMemberTypes, out object[] outMemberData)
static WriteObjectInfo GetObjectInfo(SerObjectInfoInit serObjectInfoInit)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Serialization_ISerializableMemberInfo
Definition SR.cs:124
static string Serialization_NonSerType
Definition SR.cs:16
Definition SR.cs:7
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
Definition Type.cs:408
virtual bool IsSerializable
Definition Type.cs:311
bool IsArray
Definition Type.cs:71
bool IsPrimitive
Definition Type.cs:231
Assembly Assembly
Definition Type.cs:49
string? FullName
Definition Type.cs:47
void GetObjectData(object obj, SerializationInfo info, StreamingContext context)