Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DesignerSerializerAttribute.cs
Go to the documentation of this file.
2
3[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = true, Inherited = true)]
5{
6 private string _typeId;
7
8 public string? SerializerTypeName { get; }
9
10 public string? SerializerBaseTypeName { get; }
11
12 public override object TypeId
13 {
14 get
15 {
16 if (_typeId == null)
17 {
18 string text = SerializerBaseTypeName ?? string.Empty;
19 int num = text.IndexOf(',');
20 if (num != -1)
21 {
22 text = text.Substring(0, num);
23 }
24 _typeId = GetType().FullName + text;
25 }
26 return _typeId;
27 }
28 }
29
30 public DesignerSerializerAttribute(Type serializerType, Type baseSerializerType)
31 {
32 if (serializerType == null)
33 {
34 throw new ArgumentNullException("serializerType");
35 }
36 if (baseSerializerType == null)
37 {
38 throw new ArgumentNullException("baseSerializerType");
39 }
42 }
43
44 public DesignerSerializerAttribute(string? serializerTypeName, Type baseSerializerType)
45 {
46 if (baseSerializerType == null)
47 {
48 throw new ArgumentNullException("baseSerializerType");
49 }
50 SerializerTypeName = serializerTypeName;
52 }
53
54 public DesignerSerializerAttribute(string? serializerTypeName, string? baseSerializerTypeName)
55 {
56 SerializerTypeName = serializerTypeName;
57 SerializerBaseTypeName = baseSerializerTypeName;
58 }
59}
DesignerSerializerAttribute(string? serializerTypeName, string? baseSerializerTypeName)
DesignerSerializerAttribute(string? serializerTypeName, Type baseSerializerType)
string? AssemblyQualifiedName
Definition Type.cs:45