Fork changes

This commit is contained in:
Adam Hathcock
2024-05-21 16:30:10 +01:00
parent 95b5b15cb5
commit 5f92c81965
56 changed files with 2220 additions and 1614 deletions
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;
namespace ProxyInterfaceSourceGeneratorTests.Source;
public class Foo
@@ -17,7 +19,8 @@ public class Foo
// return new Foo();
//}
public Foo[] Foos { get; set; }
[SuppressMessage("ReSharper", "NullableWarningSuppressionIsUsed")]
public Foo[] Foos { get; set; } = null!;
public Foo[] DoSomethingAndGetAnArrayOfFoos()
{
@@ -28,4 +31,4 @@ public class Foo
//{
// return new[] { new Foo() }.ToList();
//}
}
}
@@ -1,3 +1,5 @@
using System.Diagnostics.CodeAnalysis;
namespace ProxyInterfaceSourceGeneratorTests.Source;
public class Foo2
@@ -17,7 +19,8 @@ public class Foo2
// return new Foo();
//}
public Foo2[] Foos { get; set; }
[SuppressMessage("ReSharper", "NullableWarningSuppressionIsUsed")]
public Foo2[] Foos { get; set; }= null!;
public Foo2[] DoSomethingAndGetAnArrayOfFoos()
{
@@ -33,4 +36,4 @@ public class Foo2
//{
// return new[] { new Foo() }.ToList();
//}
}
}
@@ -1,6 +1,9 @@
using System.Diagnostics.CodeAnalysis;
namespace ProxyInterfaceSourceGeneratorTests.Source;
public class MixedVisibility
{
public string Foo { get; protected set; } //<- this will generate bad code
}
[SuppressMessage("ReSharper", "NullableWarningSuppressionIsUsed")]
public string Foo { get; protected set; } = null!;//<- this will generate bad code
}
@@ -29,13 +29,15 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
}
[Display(ResourceType = typeof(PeriodicTimer))]
public string Name { get; set; }
[SuppressMessage("ReSharper", "NullableWarningSuppressionIsUsed")]
public string Name { get; set; }= null!;
public string? StringNullable { get; set; }
public long? NullableLong { get; }
public object @object { get; set; }
[SuppressMessage("ReSharper", "NullableWarningSuppressionIsUsed")]
public object @object { get; set; }= null!;
public void Void()
{
@@ -131,4 +133,4 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
return true;
}
}
}
}