Fix method parameters: 'in', 'out' and 'ref' (#17)
* Fix Ref and Out * _
This commit is contained in:
@@ -5,6 +5,24 @@ namespace ProxyInterfaceSourceGenerator.Extensions
|
||||
{
|
||||
internal static class SymbolExtensions
|
||||
{
|
||||
public static string GetRefPrefix(this IParameterSymbol ps)
|
||||
{
|
||||
switch (ps.RefKind)
|
||||
{
|
||||
case RefKind.In:
|
||||
return "in ";
|
||||
|
||||
case RefKind.Out:
|
||||
return "out ";
|
||||
|
||||
case RefKind.Ref:
|
||||
return "ref ";
|
||||
|
||||
default:
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetParamsPrefix(this IParameterSymbol ps)
|
||||
{
|
||||
return ps.IsParams ? "params " : string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user