Fix namespace (#1)

* Fix NS

* .
This commit is contained in:
Stef Heyenrath
2021-07-25 19:22:24 +02:00
committed by GitHub
parent a38d8c8ef0
commit 0f58ce480d
15 changed files with 216 additions and 85 deletions
@@ -0,0 +1,7 @@
namespace ProxyInterfaceConsumer
{
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.CodeAnalysis.GeneratorExecutionContext))]
public partial interface IGeneratorExecutionContext
{
}
}
@@ -16,6 +16,7 @@ namespace ProxyInterfaceConsumer
public List<Address> AddressesLIst { get; set; }
public Dictionary<string, Address> AddressesDict { get; set; } = new Dictionary<string, Address>();
public Dictionary<Address, Address> AddressesDict2 { get; set; } = new Dictionary<Address, Address>();
public E E { get; set; }
@@ -26,9 +27,11 @@ namespace ProxyInterfaceConsumer
return 600;
}
public void AddAddress(Address a)
public Address AddAddress(Address a)
{
AddressesDict.Add($"{AddressesDict.Count}", a);
return a;
}
public void Void()
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text.Json;
using AutoMapper;
using Microsoft.CodeAnalysis;
namespace ProxyInterfaceConsumer
{
@@ -34,7 +35,8 @@ namespace ProxyInterfaceConsumer
p.Name = "test";
var ap = new AddressProxy(new Address { HouseNumber = 42 });
p.Address = ap;
p.AddAddress(ap);
var add = p.AddAddress(ap);
Console.WriteLine("add = " + JsonSerializer.Serialize(add, JsonSerializerOptions));
p.AddAddress(new AddressProxy(new Address { HouseNumber = 1000 }));
//p.MyNamedTypeSymbol = null;
@@ -42,6 +44,10 @@ namespace ProxyInterfaceConsumer
//p.Add("x");
//p.Void();
Console.WriteLine(JsonSerializer.Serialize(p, JsonSerializerOptions));
GeneratorExecutionContext g = new GeneratorExecutionContext();
IGeneratorExecutionContext gc = new GeneratorExecutionContextProxy(g);
int y = 9;
}
}
@@ -7,12 +7,12 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="10.1.1" />
<!--<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2">
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />-->
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.10.0" />
</ItemGroup>
<ItemGroup>