Fixed generated code when a class extends multiple classes (#38)

* .

* .

* pnp

* ok

* compiles

* ?

* e

* set

* .ToArray()

* n

* ...

* ok

* pnp

* .

* .

* mapster
This commit is contained in:
Stef Heyenrath
2022-09-04 11:13:16 +02:00
committed by GitHub
parent ee35d1916f
commit 69fa995982
36 changed files with 824 additions and 340 deletions
@@ -9,19 +9,19 @@ namespace ProxyInterfaceSourceGeneratorTests.Source.PnP
{
public partial class ClientRuntimeContextProxy
{
public T CastTo2<T>(ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientObject obj)
where T : ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientObject
//where TOriginal : Microsoft.SharePoint.Client.ClientObject
{
Microsoft.SharePoint.Client.ClientObject obj_ = _mapper.Map<Microsoft.SharePoint.Client.ClientObject>(obj);
var result_366781530 = _Instance.CastTo<Microsoft.SharePoint.Client.ClientObject>(obj_);
return _mapper.Map<T>(result_366781530);
}
//public T CastTo2<T>(ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientObject obj)
// where T : ProxyInterfaceSourceGeneratorTests.Source.PnP.IClientObject
// //where TOriginal : Microsoft.SharePoint.Client.ClientObject
//{
// Microsoft.SharePoint.Client.ClientObject obj_ = _mapper.Map<Microsoft.SharePoint.Client.ClientObject>(obj);
// var result_366781530 = _Instance.CastTo<Microsoft.SharePoint.Client.ClientObject>(obj_);
// return _mapper.Map<T>(result_366781530);
//}
public void X()
{
var x = CastTo2<ClientObjectProxy>(new ClientObjectProxy(default));
}
//public void X()
//{
// var x = CastTo2<ClientObjectProxy>(new ClientObjectProxy(default));
//}
}
}
@@ -0,0 +1,9 @@
using Microsoft.SharePoint.Client;
namespace ProxyInterfaceSourceGeneratorTests.Source.PnP
{
// [ProxyInterfaceGenerator.Proxy(typeof(SecurableObject))]
public partial interface ISecurableObject : IClientObject
{
}
}
@@ -2,7 +2,7 @@ using Microsoft.SharePoint.Client;
namespace ProxyInterfaceSourceGeneratorTests.Source.PnP
{
public partial interface IWeb
public partial interface IWeb : ISecurableObject
{
}
}