Add support for Property and Method attributes (#49)

* .

* .

* P en E

* .
This commit is contained in:
Stef Heyenrath
2022-12-17 13:36:41 +01:00
committed by GitHub
parent a1a283c8bb
commit e22cec1b62
19 changed files with 535 additions and 31 deletions
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
@@ -9,6 +10,7 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
{
private readonly MyStruct[] _arr = new MyStruct[1];
[Display(Prompt = "MyStruct Indexer")]
public MyStruct this[int i]
{
get { return _arr[i]; }
@@ -26,6 +28,7 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
return new List<Human> { h, new Human { IsAlive = true } };
}
[Display(ResourceType = typeof(PeriodicTimer))]
public string Name { get; set; }
public string? StringNullable { get; set; }
@@ -99,6 +102,7 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
return Task.FromResult(1);
}
[Display(Name = "M3")]
public Task<string?> Method3Async()
{
return Task.FromResult((string?)"");
@@ -1,6 +1,3 @@
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public class PersonExtends : Human
@@ -12,13 +9,13 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
public static string StaticString { get; set; } = "500";
public string Name { get; set; }
public string Name { get; set; } = null!;
public string? StringNullable { get; set; }
public long? NullableLong { get; }
public object @object { get; set; }
public object @object { get; set; } = null!;
public void Void()
{