@@ -14,41 +14,41 @@ namespace CppSharp.Types.Std.CSharp
14
14
[ TypeMap ( "int" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
15
15
public class Int : TypeMap
16
16
{
17
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind ) =>
17
+ public override Type SignatureType ( TypePrinterContext ctx ) =>
18
18
CSharpTypePrinter . GetSignedType ( Context . TargetInfo . IntWidth ) ;
19
19
}
20
20
21
21
[ TypeMap ( "unsigned int" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
22
22
public class UnsignedInt : TypeMap
23
23
{
24
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind ) =>
24
+ public override Type SignatureType ( TypePrinterContext ctx ) =>
25
25
CSharpTypePrinter . GetUnsignedType ( Context . TargetInfo . IntWidth ) ;
26
26
}
27
27
28
28
[ TypeMap ( "long" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
29
29
public class Long : TypeMap
30
30
{
31
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind ) =>
31
+ public override Type SignatureType ( TypePrinterContext ctx ) =>
32
32
CSharpTypePrinter . GetSignedType ( Context . TargetInfo . LongWidth ) ;
33
33
}
34
34
35
35
[ TypeMap ( "unsigned long" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
36
36
public class UnsignedLong : TypeMap
37
37
{
38
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind ) =>
38
+ public override Type SignatureType ( TypePrinterContext ctx ) =>
39
39
CSharpTypePrinter . GetUnsignedType ( Context . TargetInfo . LongWidth ) ;
40
40
}
41
41
42
42
[ TypeMap ( "char" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
43
43
public class Char : TypeMap
44
44
{
45
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
45
+ public override Type SignatureType ( TypePrinterContext ctx )
46
46
{
47
47
return new CILType ( ctx . Kind == TypePrinterContextKind . Native ||
48
48
! Context . Options . MarshalCharAsManagedChar ? typeof ( sbyte ) : typeof ( char ) ) ;
49
49
}
50
50
51
- public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
51
+ public override void MarshalToNative ( MarshalContext ctx )
52
52
{
53
53
if ( Context . Options . MarshalCharAsManagedChar )
54
54
ctx . Return . Write ( "global::System.Convert.ToSByte({0})" ,
@@ -57,7 +57,7 @@ public override void MarshalToNative(MarshalContext ctx, GeneratorKind kind)
57
57
ctx . Return . Write ( ctx . Parameter . Name ) ;
58
58
}
59
59
60
- public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
60
+ public override void MarshalToManaged ( MarshalContext ctx )
61
61
{
62
62
if ( Context . Options . MarshalCharAsManagedChar )
63
63
ctx . Return . Write ( "global::System.Convert.ToChar({0})" ,
@@ -70,7 +70,7 @@ public override void MarshalToManaged(MarshalContext ctx, GeneratorKind kind)
70
70
[ TypeMap ( "char16_t" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
71
71
public class Char16T : TypeMap
72
72
{
73
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
73
+ public override Type SignatureType ( TypePrinterContext ctx )
74
74
{
75
75
return new CILType ( typeof ( char ) ) ;
76
76
}
@@ -79,7 +79,7 @@ public override Type SignatureType(TypePrinterContext ctx, GeneratorKind kind)
79
79
[ TypeMap ( "wchar_t" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
80
80
public class WCharT : TypeMap
81
81
{
82
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
82
+ public override Type SignatureType ( TypePrinterContext ctx )
83
83
{
84
84
return new CILType ( typeof ( char ) ) ;
85
85
}
@@ -88,7 +88,7 @@ public override Type SignatureType(TypePrinterContext ctx, GeneratorKind kind)
88
88
[ TypeMap ( "const char*" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
89
89
public class ConstCharPointer : TypeMap
90
90
{
91
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
91
+ public override Type SignatureType ( TypePrinterContext ctx )
92
92
{
93
93
if ( ctx . Kind == TypePrinterContextKind . Managed )
94
94
return new CILType ( typeof ( string ) ) ;
@@ -117,7 +117,7 @@ public override Type SignatureType(TypePrinterContext ctx, GeneratorKind kind)
117
117
$ "{ Context . Options . Encoding . EncodingName } is not supported yet.") ;
118
118
}
119
119
120
- public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
120
+ public override void MarshalToNative ( MarshalContext ctx )
121
121
{
122
122
string param = ctx . Parameter . Name ;
123
123
if ( ctx . Parameter . Usage == ParameterUsage . Unknown &&
@@ -194,7 +194,7 @@ public override void MarshalToNative(MarshalContext ctx, GeneratorKind kind)
194
194
ctx . Return . Write ( $ "{ bytePtr } ") ;
195
195
}
196
196
197
- public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
197
+ public override void MarshalToManaged ( MarshalContext ctx )
198
198
{
199
199
if ( ctx . Parameter != null && ! ctx . Parameter . IsOut &&
200
200
! ctx . Parameter . IsInOut )
@@ -304,7 +304,7 @@ public class ConstChar32TPointer : ConstCharPointer
304
304
[ TypeMap ( "basic_string<char, char_traits<char>, allocator<char>>" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
305
305
public class String : TypeMap
306
306
{
307
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
307
+ public override Type SignatureType ( TypePrinterContext ctx )
308
308
{
309
309
if ( ctx . Kind == TypePrinterContextKind . Managed )
310
310
return new CILType ( typeof ( string ) ) ;
@@ -316,7 +316,7 @@ public override Type SignatureType(TypePrinterContext ctx, GeneratorKind kind)
316
316
return new CustomType ( basicString . Visit ( typePrinter ) . Type ) ;
317
317
}
318
318
319
- public override void MarshalToNative ( MarshalContext ctx , GeneratorKind kind )
319
+ public override void MarshalToNative ( MarshalContext ctx )
320
320
{
321
321
Type type = ctx . Parameter . Type . Desugar ( ) ;
322
322
ClassTemplateSpecialization basicString = GetBasicString ( type ) ;
@@ -361,7 +361,7 @@ public override void MarshalToNative(MarshalContext ctx, GeneratorKind kind)
361
361
}
362
362
}
363
363
364
- public override void MarshalToManaged ( MarshalContext ctx , GeneratorKind kind )
364
+ public override void MarshalToManaged ( MarshalContext ctx )
365
365
{
366
366
var type = Type . Desugar ( resolveTemplateSubstitution : false ) ;
367
367
ClassTemplateSpecialization basicString = GetBasicString ( type ) ;
@@ -415,7 +415,7 @@ private static ClassTemplateSpecialization GetBasicString(Type type)
415
415
[ TypeMap ( "FILE" , GeneratorKindID = GeneratorKind . CSharp_ID ) ]
416
416
public class FILE : TypeMap
417
417
{
418
- public override Type SignatureType ( TypePrinterContext ctx , GeneratorKind kind )
418
+ public override Type SignatureType ( TypePrinterContext ctx )
419
419
{
420
420
return new CILType ( typeof ( System . IntPtr ) ) ;
421
421
}
0 commit comments