Generate structs for structs and fix struct out parameter if known (#8)

* Generate structs for structs and fix struct out parameter if known

* fmt
This commit is contained in:
Adam Hathcock
2024-06-17 17:04:52 +01:00
committed by GitHub
parent c6960c7370
commit a6b99abd13
28 changed files with 510 additions and 98 deletions
@@ -1,10 +1,6 @@
namespace ProxyInterfaceSourceGeneratorTests.Source.Disposable;
public interface IRevitLocationPoint : IRevitLocation
{
}
public interface IRevitLocationPoint : IRevitLocation { }
public interface IRevitLocationCurve : IRevitLocation
{
@@ -15,12 +11,15 @@ public class LocationPoint : Location
{
public XYZ Point => throw new NotImplementedException();
}
public class Location : APIObject { }
public class APIObject { }
public class XYZ { }
public interface IRevitLocation
{
}
public interface IRevitLocation { }
public interface IRevitCurve
{
double Length { get; }
@@ -10,6 +10,4 @@ public class Foo3
}
}
public class Bar3
{
}
public class Bar3 { }
@@ -1,5 +1,3 @@
namespace ProxyInterfaceSourceGeneratorTests.Source;
public partial interface IBar3
{
}
public partial interface IBar3 { }
@@ -1,7 +1,3 @@
namespace ProxyInterfaceSourceGeneratorTests.Source;
public partial interface IBar3Proxy : IBar3
{
}
public partial interface IBar3Proxy : IBar3 { }
@@ -1,6 +1,7 @@
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IFoo2: IFoo2Base { }
public partial interface IFoo2 : IFoo2Base { }
public partial interface IFoo2Base
{
int Weird2();
@@ -4,5 +4,4 @@ namespace ProxyInterfaceSourceGeneratorTests.Source
{
IBar3 Weird();
}
}
@@ -1,3 +1,3 @@
namespace ProxyInterfaceSourceGeneratorTests.Source;
public partial interface IFoo3Proxy: IFoo3 { }
public partial interface IFoo3Proxy : IFoo3 { }
@@ -0,0 +1,4 @@
namespace ProxyInterfaceSourceGeneratorTests.Source
{
public partial interface IMyStruct2 { }
}
@@ -1,6 +1,17 @@
namespace ProxyInterfaceSourceGeneratorTests.Source;
public struct MyStruct
{
public int Id { get; set; }
public bool TryGetMyStruct2(int i, out MyStruct2 x, double z)
{
x = default;
return true;
}
}
public struct MyStruct2
{
public int Id { get; set; }
}