Files
ProxyGenerator/tests/ProxyInterfaceSourceGeneratorTests/ProxyInterfaceSourceGeneratorTest.GenerateFiles_ForClassWith_Extended.verified.txt
T
Adam Hathcock 6391515c19 More options (#5)
* update generator and tests

* Add ImplementationOptions

* option tests

* fix some tests

* UseExtendedInterfaces with flag enum parsing

* add test for using base interfaces instead of interface

* add ProxyForBaseInterface

* add extra overload

* don't put new if we're replacing interfaces

* really remove AutoMapper

* remove akka and fix up interface

* Bigger bump for version

* adjust readme
2024-05-24 13:16:14 +01:00

213 lines
7.3 KiB
Plaintext

[
{
HintName: Speckle.ProxyGenerator.Extra.g.cs,
Source:
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/specklesystems/ProxyGenerator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace Speckle.ProxyGenerator
{
[AttributeUsage(AttributeTargets.Interface)]
internal sealed class ProxyAttribute : Attribute
{
public Type Type { get; }
public ImplementationOptions Options { get; }
public ProxyClassAccessibility Accessibility { get; }
public string[]? MembersToIgnore { get; }
public ProxyAttribute(Type type) : this(type, ImplementationOptions.None, ProxyClassAccessibility.Public)
{
}
public ProxyAttribute(Type type, ImplementationOptions options) : this(type, options, ProxyClassAccessibility.Public)
{
}
public ProxyAttribute(Type type, ProxyClassAccessibility accessibility) : this(type, ImplementationOptions.None, accessibility)
{
}
public ProxyAttribute(Type type, ImplementationOptions options, ProxyClassAccessibility accessibility) : this(type, options, accessibility, null)
{
}
public ProxyAttribute(Type type, string[]? membersToIgnore) : this(type, ImplementationOptions.None, ProxyClassAccessibility.Public, null)
{
}
public ProxyAttribute(Type type, ImplementationOptions options, string[]? membersToIgnore) : this(type, options, ProxyClassAccessibility.Public, null)
{
}
public ProxyAttribute(Type type, ImplementationOptions options, ProxyClassAccessibility accessibility, string[]? membersToIgnore)
{
Type = type;
Options = options;
Accessibility = accessibility;
MembersToIgnore = membersToIgnore;
}
}
[Flags]
internal enum ProxyClassAccessibility
{
Public = 0,
Internal = 1
}
[Flags]
internal enum ImplementationOptions
{
None = 0,
ProxyBaseClasses = 1,
ProxyInterfaces = 2,
UseExtendedInterfaces = 4,
ProxyForBaseInterface = 8
}
#nullable restore
}
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.IFoo3Proxy.g.cs,
Source:
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/specklesystems/ProxyGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IFoo3Proxy : global::ProxyInterfaceSourceGeneratorTests.Source.IFoo3
{
global::ProxyInterfaceSourceGeneratorTests.Source.Foo3 _Instance { get; }
}
}
#nullable restore
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.IBar3Proxy.g.cs,
Source:
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/specklesystems/ProxyGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IBar3Proxy : global::ProxyInterfaceSourceGeneratorTests.Source.IBar3
{
global::ProxyInterfaceSourceGeneratorTests.Source.Bar3 _Instance { get; }
}
}
#nullable restore
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.Foo3Proxy.g.cs,
Source:
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/specklesystems/ProxyGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial class Foo3Proxy : global::ProxyInterfaceSourceGeneratorTests.Source.IFoo3
{
public global::ProxyInterfaceSourceGeneratorTests.Source.Foo3 _Instance { get; }
public global::ProxyInterfaceSourceGeneratorTests.Source.IBar3 Weird()
{
var result_867036441 = _Instance.Weird();
return Mapster.TypeAdapter.Adapt<global::ProxyInterfaceSourceGeneratorTests.Source.IBar3>(result_867036441);
}
public Foo3Proxy(global::ProxyInterfaceSourceGeneratorTests.Source.Foo3 instance)
{
_Instance = instance;
Mapster.TypeAdapterConfig<global::ProxyInterfaceSourceGeneratorTests.Source.Bar3, global::ProxyInterfaceSourceGeneratorTests.Source.IBar3>.NewConfig().ConstructUsing(instance969373361 => new global::ProxyInterfaceSourceGeneratorTests.Source.Bar3Proxy(instance969373361));
Mapster.TypeAdapterConfig<global::ProxyInterfaceSourceGeneratorTests.Source.IBar3, global::ProxyInterfaceSourceGeneratorTests.Source.Bar3>.NewConfig().MapWith(proxy339001485 => ((global::ProxyInterfaceSourceGeneratorTests.Source.Bar3Proxy) proxy339001485)._Instance);
}
}
}
#nullable restore
},
{
HintName: ProxyInterfaceSourceGeneratorTests.Source.Bar3Proxy.g.cs,
Source:
//----------------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by https://github.com/specklesystems/ProxyGenerator.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//----------------------------------------------------------------------------------------
#nullable enable
using System;
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial class Bar3Proxy : global::ProxyInterfaceSourceGeneratorTests.Source.IBar3
{
public global::ProxyInterfaceSourceGeneratorTests.Source.Bar3 _Instance { get; }
public Bar3Proxy(global::ProxyInterfaceSourceGeneratorTests.Source.Bar3 instance)
{
_Instance = instance;
Mapster.TypeAdapterConfig<global::ProxyInterfaceSourceGeneratorTests.Source.Bar3, global::ProxyInterfaceSourceGeneratorTests.Source.IBar3>.NewConfig().ConstructUsing(instance969373361 => new global::ProxyInterfaceSourceGeneratorTests.Source.Bar3Proxy(instance969373361));
Mapster.TypeAdapterConfig<global::ProxyInterfaceSourceGeneratorTests.Source.IBar3, global::ProxyInterfaceSourceGeneratorTests.Source.Bar3>.NewConfig().MapWith(proxy339001485 => ((global::ProxyInterfaceSourceGeneratorTests.Source.Bar3Proxy) proxy339001485)._Instance);
}
}
}
#nullable restore
}
]