Add support to generate code for interface without a namespace (#46)

This commit is contained in:
Stef Heyenrath
2022-12-13 18:51:06 +01:00
committed by GitHub
parent 3eb9d8ce5f
commit 72a40e6f6a
13 changed files with 163 additions and 14 deletions
@@ -0,0 +1,27 @@
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
public partial interface INoNamespace
{
ProxyInterfaceSourceGeneratorTests.Source.NoNamespace _Instance { get; }
bool Test { get; set; }
}
#nullable disable
@@ -0,0 +1,36 @@
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/StefH/ProxyInterfaceSourceGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
public partial class NoNamespaceProxy : INoNamespace
{
public ProxyInterfaceSourceGeneratorTests.Source.NoNamespace _Instance { get; }
public bool Test { get => _Instance.Test; set => _Instance.Test = value; }
public NoNamespaceProxy(ProxyInterfaceSourceGeneratorTests.Source.NoNamespace instance)
{
_Instance = instance;
}
}
#nullable disable