initial code

This commit is contained in:
Stef Heyenrath
2021-07-23 16:28:11 +02:00
parent af0a3e0a5d
commit 7c68455a8e
15 changed files with 527 additions and 0 deletions
@@ -0,0 +1,7 @@
namespace SourceGeneratorInterface
{
[ProxyInterfaceGenerator.Proxy(typeof(SourceGeneratorInterface.Person))]
public partial interface IPerson
{
}
}
@@ -0,0 +1,33 @@
namespace SourceGeneratorInterface
{
public class Person
{
private int PrivateId { get; }
public int Id { get; }
public long? NullableLong { get; }
public string Name { get; set; }
public Address Address { get; set; }
public E E { get; set; }
public int Add(string s)
{
return 600;
}
}
public class Address
{
public int X { get; }
}
public enum E
{
V1,
V2
}
}
@@ -0,0 +1,11 @@
namespace SourceGeneratorInterface
{
public class Program
{
public static void Main()
{
IPerson ip = null;
//var i = ip.Id;
}
}
}
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<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" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ProxyInterfaceSourceGenerator\ProxyInterfaceSourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
</Project>