Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
GenericNameProvider.cs
Go to the documentation of this file.
3using System.Text;
4using System.Xml;
5
7
9{
10 private readonly string _genericTypeName;
11
12 private readonly object[] _genericParams;
13
15
17 {
18 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
19 get
20 {
21 bool flag = true;
22 for (int i = 0; i < GetParameterCount(); i++)
23 {
24 if (!flag)
25 {
26 break;
27 }
29 }
30 return flag;
31 }
32 }
33
35 : this(DataContract.GetClrTypeFullName(type.GetGenericTypeDefinition()), type.GetGenericArguments())
36 {
37 }
38
47
48 public int GetParameterCount()
49 {
50 return _genericParams.Length;
51 }
52
57
58 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
59 public string GetParameterName(int paramIndex)
60 {
62 }
63
64 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
65 public string GetNamespaces()
66 {
68 for (int i = 0; i < GetParameterCount(); i++)
69 {
70 stringBuilder.Append(' ').Append(GetStableName(i).Namespace);
71 }
72 return stringBuilder.ToString();
73 }
74
75 public string GetGenericTypeName()
76 {
77 return _genericTypeName;
78 }
79
80 [RequiresUnreferencedCode("Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the required types are preserved.")]
92}
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static void GetClrNameAndNamespace(string fullTypeName, out string localName, out string ns)
static XmlQualifiedName GetStableName(Type type)
static List< int > GetDataContractNameForGenericName(string typeName, StringBuilder localName)
GenericNameProvider(string genericTypeName, object[] genericParams)