[
{
HintName: ProxyInterfaceGenerator.Extra.g.cs,
Source:
//----------------------------------------------------------------------------------------
//
// 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.
//
//----------------------------------------------------------------------------------------
using System;
namespace ProxyInterfaceGenerator
{
[AttributeUsage(AttributeTargets.Interface)]
internal sealed class ProxyAttribute : Attribute
{
public Type Type { get; }
public bool ProxyBaseClasses { get; }
public ProxyClassAccessibility Accessibility { get; }
public string[] MembersToIgnore { get; }
public ProxyAttribute(Type type) : this(type, false, ProxyClassAccessibility.Public)
{
}
public ProxyAttribute(Type type, bool proxyBaseClasses) : this(type, proxyBaseClasses, ProxyClassAccessibility.Public)
{
}
public ProxyAttribute(Type type, ProxyClassAccessibility accessibility) : this(type, false, accessibility)
{
}
public ProxyAttribute(Type type, bool proxyBaseClasses, ProxyClassAccessibility accessibility) : this(type, proxyBaseClasses, accessibility, Array.Empty())
{
}
public ProxyAttribute(Type type, bool proxyBaseClasses, ProxyClassAccessibility accessibility, string[] membersToIgnore)
{
Type = type;
ProxyBaseClasses = proxyBaseClasses;
Accessibility = accessibility;
MembersToIgnore = membersToIgnore;
}
}
[Flags]
internal enum ProxyClassAccessibility
{
Public = 0,
Internal = 1
}
}
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.IFoo2.g.cs,
Source:
//----------------------------------------------------------------------------------------
//
// 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.
//
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IFoo2
{
global::ProxyInterfaceSourceGeneratorTests.Source.Foo2 _Instance { get; }
global::ProxyInterfaceSourceGeneratorTests.Source.IFoo2[] Foos { get; set; }
global::ProxyInterfaceSourceGeneratorTests.Source.IFoo2[] DoSomethingAndGetAnArrayOfFoos();
}
}
#nullable restore
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.Foo2Proxy.g.cs,
Source:
//----------------------------------------------------------------------------------------
//
// 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.
//
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial class Foo2Proxy : global::ProxyInterfaceSourceGeneratorTests.Source.IFoo2
{
public global::ProxyInterfaceSourceGeneratorTests.Source.Foo2 _Instance { get; }
public global::ProxyInterfaceSourceGeneratorTests.Source.IFoo2[] Foos { get => Mapster.TypeAdapter.Adapt(_Instance.Foos); set => _Instance.Foos = Mapster.TypeAdapter.Adapt(value); }
public global::ProxyInterfaceSourceGeneratorTests.Source.IFoo2[] DoSomethingAndGetAnArrayOfFoos()
{
var result_1603865878 = _Instance.DoSomethingAndGetAnArrayOfFoos();
return Mapster.TypeAdapter.Adapt(result_1603865878);
}
public Foo2Proxy(global::ProxyInterfaceSourceGeneratorTests.Source.Foo2 instance)
{
_Instance = instance;
Mapster.TypeAdapterConfig.NewConfig().ConstructUsing(instance1325374861 => new global::ProxyInterfaceSourceGeneratorTests.Source.Foo2Proxy(instance1325374861));
Mapster.TypeAdapterConfig.NewConfig().MapWith(proxy1047178445 => ((global::ProxyInterfaceSourceGeneratorTests.Source.Foo2Proxy) proxy1047178445)._Instance);
}
}
}
#nullable restore
}
]