Add support to generate code for interface without a namespace (#46)
This commit is contained in:
@@ -59,6 +59,7 @@ internal class PartialInterfacesGenerator : BaseGenerator, IFilesGenerator
|
||||
{
|
||||
var extendsProxyClasses = GetExtendsProxyData(proxyData, classSymbol);
|
||||
var @new = extendsProxyClasses.Any() ? "new " : string.Empty;
|
||||
var (namespaceStart, namespaceEnd) = NamespaceBuilder.Build(ns);
|
||||
|
||||
return $@"//----------------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
@@ -72,8 +73,7 @@ internal class PartialInterfacesGenerator : BaseGenerator, IFilesGenerator
|
||||
{(SupportsNullable ? "#nullable enable" : string.Empty)}
|
||||
using System;
|
||||
|
||||
namespace {ns}
|
||||
{{
|
||||
{namespaceStart}
|
||||
public partial interface {interfaceName}
|
||||
{{
|
||||
{@new}{classSymbol.Symbol} _Instance {{ get; }}
|
||||
@@ -84,7 +84,7 @@ namespace {ns}
|
||||
|
||||
{GenerateEvents(classSymbol, proxyData.ProxyBaseClasses)}
|
||||
}}
|
||||
}}
|
||||
{namespaceEnd}
|
||||
{(SupportsNullable ? "#nullable disable" : string.Empty)}";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user