Implement Complex

This commit is contained in:
Stef Heyenrath
2021-07-25 11:16:48 +02:00
parent 9326899151
commit e00c0c7706
9 changed files with 51 additions and 16 deletions
@@ -0,0 +1,7 @@
namespace ProxyInterfaceConsumer
{
public class Address
{
public int HouseNumber { get; set; }
}
}
@@ -1,6 +1,6 @@
namespace SourceGeneratorInterface
namespace ProxyInterfaceConsumer
{
[ProxyInterfaceGenerator.Proxy(typeof(SourceGeneratorInterface.Address))]
[ProxyInterfaceGenerator.Proxy(typeof(ProxyInterfaceConsumer.Address))]
public partial interface IAddress
{
}
@@ -1,6 +1,6 @@
namespace SourceGeneratorInterface
namespace ProxyInterfaceConsumer
{
[ProxyInterfaceGenerator.Proxy(typeof(SourceGeneratorInterface.Person))]
[ProxyInterfaceGenerator.Proxy(typeof(ProxyInterfaceConsumer.Person))]
public partial interface IPerson
{
}
@@ -1,6 +1,6 @@
using Microsoft.CodeAnalysis;
namespace SourceGeneratorInterface
namespace ProxyInterfaceConsumer
{
public class Person
{
@@ -31,10 +31,7 @@ namespace SourceGeneratorInterface
public INamedTypeSymbol MyNamedTypeSymbol { get;set; }
}
public class Address
{
public int X { get; }
}
public enum E
{
@@ -1,6 +1,6 @@
using System;
namespace SourceGeneratorInterface
namespace ProxyInterfaceConsumer
{
public class Program
{
@@ -8,6 +8,8 @@ namespace SourceGeneratorInterface
{
IPerson p = new PersonProxy(new Person());
p.Name = "test";
p.Address = new AddressProxy(new Address { HouseNumber = 42 });
//p.MyNamedTypeSymbol = null;
//p.Compilation = null;
//p.Add("x");