Skip to content

Commit caba453

Browse files
committed
add warning disable
1 parent 317f341 commit caba453

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/SourceGeneration.Reflection.SourceGenerator/ReflectionSourceGenerator.Emit.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
using Microsoft.CodeAnalysis;
2-
using System;
32
using System.Collections.Generic;
43
using System.Linq;
54
using System.Text;
65
using System.Threading;
76

87
namespace SourceGeneration.Reflection;
98

9+
#pragma warning disable IDE0305
1010
public partial class ReflectionSourceGenerator
1111
{
1212
private static void Emit(SourceProductionContext context, List<SourceTypeInfo> types, CancellationToken cancellationToken)

src/SourceGeneration.Reflection.SourceGenerator/ReflectionSourceGenerator.Parse.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private static SourceTypeInfo PaseEnumType(INamedTypeSymbol typeSymbol, Cancella
7070
foreach (var field in typeSymbol.GetMembers().OfType<IFieldSymbol>())
7171
{
7272
cancellationToken.ThrowIfCancellationRequested();
73-
typeInfo.Fields.Add(CreateField(field, cancellationToken));
73+
typeInfo.Fields.Add(CreateField(field));
7474
}
7575

7676
return typeInfo;
@@ -143,13 +143,13 @@ private static SourceTypeInfo ParseClassType(INamedTypeSymbol typeSymbol, Cancel
143143
foreach (var field in members.OfType<IFieldSymbol>())
144144
{
145145
cancellationToken.ThrowIfCancellationRequested();
146-
typeInfo.Fields.Add(CreateField(field, cancellationToken));
146+
typeInfo.Fields.Add(CreateField(field));
147147
}
148148

149149
foreach (var property in members.OfType<IPropertySymbol>())
150150
{
151151
cancellationToken.ThrowIfCancellationRequested();
152-
typeInfo.Properties.Add(CreateProperty(property, cancellationToken));
152+
typeInfo.Properties.Add(CreateProperty(property));
153153
}
154154

155155
foreach (var constructor in typeSymbol.Constructors)
@@ -227,7 +227,7 @@ private static SourceConstructorInfo CreateConstructor(IMethodSymbol constructor
227227
};
228228
}
229229

230-
private static SourcePropertyInfo CreateProperty(IPropertySymbol property, CancellationToken cancellationToken)
230+
private static SourcePropertyInfo CreateProperty(IPropertySymbol property)
231231
{
232232
//string defaultValueExpression = property.IsRequired ? property.GetInitializeValue(cancellationToken) :null;
233233

@@ -265,7 +265,7 @@ private static SourcePropertyInfo CreateProperty(IPropertySymbol property, Cance
265265
};
266266
}
267267

268-
private static SourceFieldInfo CreateField(IFieldSymbol field, CancellationToken cancellationToken)
268+
private static SourceFieldInfo CreateField(IFieldSymbol field)
269269
{
270270
//string defaultValueExpression = field.IsRequired ? field.GetInitializeValue(cancellationToken) : null;
271271

0 commit comments

Comments
 (0)