Add support for Property and Method attributes (#49)
* . * . * P en E * .
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using Microsoft.CodeAnalysis;
|
||||
using Microsoft.CodeAnalysis.CSharp;
|
||||
using ProxyInterfaceSourceGenerator.Constants;
|
||||
using ProxyInterfaceSourceGenerator.Enums;
|
||||
|
||||
namespace ProxyInterfaceSourceGenerator.Extensions;
|
||||
@@ -9,16 +8,6 @@ internal static class ParameterSymbolExtensions
|
||||
{
|
||||
private const string ParameterValueNull = "null";
|
||||
|
||||
public static string GetAttributesPrefix(this IParameterSymbol ps)
|
||||
{
|
||||
var attributes = ps.GetAttributes()
|
||||
.Where(a => !string.Equals(a.AttributeClass?.GetFullType(), InternalClassNames.NullableAttribute, StringComparison.OrdinalIgnoreCase))
|
||||
.Select(a => $"[{a}]")
|
||||
.ToArray();
|
||||
|
||||
return attributes.Any() ? $"{string.Join(" ", attributes)} " : string.Empty;
|
||||
}
|
||||
|
||||
public static string GetRefPrefix(this IParameterSymbol ps)
|
||||
{
|
||||
return ps.RefKind switch
|
||||
|
||||
Reference in New Issue
Block a user