55using System . Collections . Generic ;
66using System . Linq ;
77using System . Text ;
8+ using SwiftRuntimeLibrary ;
89
910namespace SwiftReflector . Demangling {
1011 public class TLDefinition {
@@ -14,7 +15,7 @@ protected TLDefinition (CoreCompoundType type, string mangledName, SwiftName mod
1415 throw new ArgumentNullException ( nameof ( module ) ) ;
1516 Type = type ;
1617 Module = module ;
17- MangledName = Ex . ThrowOnNull ( mangledName , nameof ( mangledName ) ) ;
18+ MangledName = Exceptions . ThrowOnNull ( mangledName , nameof ( mangledName ) ) ;
1819 Offset = offset ;
1920 }
2021
@@ -35,7 +36,7 @@ public class TLMetadataDescriptor : TLDefinition {
3536 public TLMetadataDescriptor ( SwiftType ofType , bool isBuiltIn , string mangledName , SwiftName module , ulong offset )
3637 : base ( CoreCompoundType . MetadataDescriptor , mangledName , module , offset )
3738 {
38- OfType = Ex . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
39+ OfType = Exceptions . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
3940 IsBuiltIn = isBuiltIn ;
4041 }
4142 public SwiftType OfType { get ; private set ; }
@@ -72,8 +73,8 @@ protected TLVariable (CoreCompoundType type, string mangledName, SwiftName modul
7273 bool isStatic , ulong offset , SwiftType extensionOn )
7374 : base ( type , mangledName , module , classType , offset )
7475 {
75- Name = Ex . ThrowOnNull ( ident , nameof ( ident ) ) ;
76- OfType = Ex . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
76+ Name = Exceptions . ThrowOnNull ( ident , nameof ( ident ) ) ;
77+ OfType = Exceptions . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
7778 IsStatic = isStatic ;
7879 ExtensionOn = extensionOn ;
7980 }
@@ -95,8 +96,8 @@ public class TLUnsafeMutableAddressor : TLClassElem {
9596 public TLUnsafeMutableAddressor ( string mangledName , SwiftName module , SwiftClassType classType , SwiftName ident , SwiftType ofType , ulong offset )
9697 : base ( CoreCompoundType . UnsafeMutableAddressor , mangledName , module , classType , offset )
9798 {
98- Name = Ex . ThrowOnNull ( ident , nameof ( ident ) ) ;
99- OfType = Ex . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
99+ Name = Exceptions . ThrowOnNull ( ident , nameof ( ident ) ) ;
100+ OfType = Exceptions . ThrowOnNull ( ofType , nameof ( ofType ) ) ;
100101 }
101102 public SwiftType OfType { get ; private set ; }
102103 public SwiftName Name { get ; private set ; }
@@ -154,7 +155,7 @@ public class TLDefaultArgumentInitializer : TLDefinition {
154155 public TLDefaultArgumentInitializer ( string mangledName , SwiftName module , SwiftBaseFunctionType function , int index , ulong offset )
155156 : base ( CoreCompoundType . ArgumentInitializer , mangledName , module , offset )
156157 {
157- Signature = Ex . ThrowOnNull ( function , nameof ( function ) ) ;
158+ Signature = Exceptions . ThrowOnNull ( function , nameof ( function ) ) ;
158159 ArgumentIndex = index ;
159160 }
160161 public SwiftBaseFunctionType Signature { get ; private set ; }
@@ -208,7 +209,7 @@ public TLProtocolConformanceDescriptor (string mangledName, SwiftName module, Sw
208209 SwiftClassType forProtocol , ulong offset )
209210 : base ( CoreCompoundType . ProtocolConformanceDescriptor , mangledName , module , offset )
210211 {
211- ImplementingType = Ex . ThrowOnNull ( implementingType , nameof ( implementingType ) ) ;
212+ ImplementingType = Exceptions . ThrowOnNull ( implementingType , nameof ( implementingType ) ) ;
212213 Protocol = forProtocol ;
213214 }
214215
@@ -227,7 +228,7 @@ public class TLBaseConformanceDescriptor : TLClassElem {
227228 public TLBaseConformanceDescriptor ( string mangledName , SwiftName module , SwiftClassType protocol , SwiftClassType requirement , ulong offset )
228229 : base ( CoreCompoundType . BaseConformanceDescriptor , mangledName , module , protocol , offset )
229230 {
230- ProtocolRequirement = Ex . ThrowOnNull ( requirement , nameof ( requirement ) ) ;
231+ ProtocolRequirement = Exceptions . ThrowOnNull ( requirement , nameof ( requirement ) ) ;
231232 }
232233 public SwiftClassType ProtocolRequirement { get ; private set ; }
233234 }
0 commit comments