ProxyBaseClasses (#27)

This commit is contained in:
Stef Heyenrath
2022-02-01 18:49:01 +01:00
committed by GitHub
parent 649ed89bb6
commit f9664e0564
45 changed files with 1305 additions and 836 deletions
@@ -0,0 +1,12 @@
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public class Human : Animal
{
public bool IsAlive { get; set; }
}
public class Animal
{
public bool X { get; set; }
}
}
@@ -0,0 +1,6 @@
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IHuman
{
}
}
@@ -1,4 +1,4 @@
namespace ProxyInterfaceSourceGeneratorTests.DTO
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IPerson
{
@@ -0,0 +1,6 @@
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IPersonExtends
{
}
}
@@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace ProxyInterfaceSourceGeneratorTests.DTO
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public class Person
{
@@ -0,0 +1,65 @@
using System.Threading.Tasks;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public class PersonExtends : Human
{
public string Name { get; set; }
public string? StringNullable { get; set; }
public long? NullableLong { get; }
public object @object { get; set; }
public void Void()
{
}
public string HelloWorld(string name)
{
return $"Hello {name} !";
}
public void WithParams(params string[] values)
{
}
public string Add(string s, string @string)
{
return s + @string;
}
public int DefaultValue(int x = 100)
{
return x + 1;
}
public void In_Out_Ref1(in int a, out int b, ref int c)
{
b = 1;
}
public bool Generic2<T1, T2>(int x, T1 t1, T2 t2)
where T1 : struct
where T2 : class, new()
{
return true;
}
public Task Method1Async()
{
return Task.CompletedTask;
}
public Task<int> Method2Async()
{
return Task.FromResult(1);
}
public Task<string?> Method3Async()
{
return Task.FromResult((string?)"");
}
}
}