Skip to content

Commit

Permalink
Suppress code analysis warnings (#pragma warning disable)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrmanzano committed Jul 4, 2022
1 parent 127a01b commit 292c2cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class AutoBindablePropertyGenerator : ISourceGenerator
private readonly List<IImplementation> CustomImplementations = new() { new DefaultValue(), new PropertyChanged(), new DefaultBindingMode() };

private const string attributeText = @"
#pragma warning disable
#nullable enable
using System;
namespace Maui.BindableProperty.Generator.Core
Expand Down Expand Up @@ -54,7 +55,9 @@ private string ProcessClass(INamedTypeSymbol classSymbol, List<IFieldSymbol> fie

var namespaceName = classSymbol.ContainingNamespace.ToDisplayString();
var w = new CodeWriter(CodeWriterSettings.CSharpDefault);
using (w.B("#nullable enable", @$"namespace {namespaceName}"))
w._("#pragma warning disable");
w._("#nullable enable");
using (w.B(@$"namespace {namespaceName}"))
{
w._(AutoBindableConstants.AttrGeneratedCodeString);
using (w.B(@$"public partial class {classSymbol.Name}"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Description>Source generator that automatically transforms fields into BindableProperties that can be used in MAUI</Description>
<PackageTags>MAUI;BindableProperty;Source Generator</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<VersionPrefix>0.8.1</VersionPrefix>
<VersionPrefix>0.8.2</VersionPrefix>
<PackageProjectUrl>https://github.com/rrmanzano/maui-bindableproperty-generator</PackageProjectUrl>
<RepositoryUrl>https://github.com/rrmanzano/maui-bindableproperty-generator</RepositoryUrl>
<PackageId>M.BindableProperty.Generator</PackageId>
Expand Down

0 comments on commit 292c2cd

Please sign in to comment.