More search replace
This commit is contained in:
@@ -2,8 +2,8 @@ using System.Net.Http;
|
||||
|
||||
namespace ProxyInterfaceConsumer.Http;
|
||||
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(HttpClient), true)]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(HttpClient), true)]
|
||||
public partial interface IHttpClient : IHttpMessageInvoker { }
|
||||
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(HttpMessageInvoker))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(HttpMessageInvoker))]
|
||||
public partial interface IHttpMessageInvoker { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using ProxyInterfaceGenerator;
|
||||
using Speckle.ProxyGenerator;
|
||||
|
||||
namespace ProxyInterfaceConsumer
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace ProxyInterfaceConsumer
|
||||
{
|
||||
// [ProxyInterfaceGenerator.Proxy(typeof(Microsoft.CodeAnalysis.GeneratorExecutionContext))]
|
||||
// [Speckle.ProxyGenerator.Proxy(typeof(Microsoft.CodeAnalysis.GeneratorExecutionContext))]
|
||||
public partial interface IGeneratorExecutionContext { }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using ProxyInterfaceGenerator;
|
||||
using Speckle.ProxyGenerator;
|
||||
|
||||
namespace ProxyInterfaceConsumer
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace ProxyInterfaceConsumer
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(ProxyInterfaceConsumer.PersonT<>))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(ProxyInterfaceConsumer.PersonT<>))]
|
||||
public partial interface IPersonT //<T> where T : struct
|
||||
{ }
|
||||
}
|
||||
|
||||
@@ -90,8 +90,8 @@ public sealed class Clazz
|
||||
public string Name { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Test))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Test))]
|
||||
public partial interface ITest { }
|
||||
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Clazz))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Clazz))]
|
||||
public partial interface IClazz { }
|
||||
|
||||
@@ -2,6 +2,6 @@ using Akka.Remote;
|
||||
|
||||
// namespace ProxyInterfaceConsumerForAkka.Interfaces; <-- no namespace
|
||||
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(AddressUid))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(AddressUid))]
|
||||
// ReSharper disable once CheckNamespace
|
||||
public partial interface IAddressUid { }
|
||||
|
||||
@@ -2,6 +2,6 @@ using Akka.Actor;
|
||||
|
||||
namespace ProxyInterfaceConsumerForAkka.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(LocalActorRefProvider))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(LocalActorRefProvider))]
|
||||
public partial interface ILocalActorRefProvider { }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Microsoft.SharePoint.Client;
|
||||
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(ClientContext))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(ClientContext))]
|
||||
public partial interface IClientContext : IClientRuntimeContext
|
||||
{
|
||||
void Load<TSource, TTarget>(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ClientObject))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ClientObject))]
|
||||
public partial interface IClientObject { }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ClientRuntimeContext))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ClientRuntimeContext))]
|
||||
public partial interface IClientRuntimeContext { }
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
//namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
//{
|
||||
// [ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ListCollection))]
|
||||
// [Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.ListCollection))]
|
||||
// public partial interface IProxyListCollection: IClientObject, IEnumerable, IQueryable
|
||||
// {
|
||||
// }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.SecurableObject))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.SecurableObject))]
|
||||
public partial interface ISecurableObject : IClientObject
|
||||
{
|
||||
// public virtual void X();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.User))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.User))]
|
||||
public partial interface IUser { }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace ProxyInterfaceConsumerForPnP.Interfaces
|
||||
{
|
||||
[ProxyInterfaceGenerator.Proxy(typeof(Microsoft.SharePoint.Client.Web))]
|
||||
[Speckle.ProxyGenerator.Proxy(typeof(Microsoft.SharePoint.Client.Web))]
|
||||
public partial interface IWeb : ISecurableObject { }
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Speckle.ProxyGenerator.FileGenerators;
|
||||
|
||||
internal class ExtraFilesGenerator : IFileGenerator
|
||||
{
|
||||
private const string Name = "ProxyInterfaceGenerator.Extra.g.cs";
|
||||
private const string Name = "Speckle.ProxyGenerator.Extra.g.cs";
|
||||
|
||||
public FileData GenerateFile()
|
||||
{
|
||||
@@ -21,7 +21,7 @@ internal class ExtraFilesGenerator : IFileGenerator
|
||||
|
||||
using System;
|
||||
|
||||
namespace ProxyInterfaceGenerator
|
||||
namespace Speckle.ProxyGenerator
|
||||
{{
|
||||
[AttributeUsage(AttributeTargets.Interface)]
|
||||
internal sealed class ProxyAttribute : Attribute
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<LangVersion>Latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<Authors>Speckle</Authors>
|
||||
<Description></Description>
|
||||
<RootNamespace>Speckle.ProxyGenerator</RootNamespace>
|
||||
<Title>Speckle.ProxyGenerator</Title>
|
||||
<PackageId>Speckle.ProxyGenerator</PackageId>
|
||||
|
||||
@@ -11,7 +11,7 @@ internal class ProxySyntaxReceiver : ISyntaxContextReceiver
|
||||
private const string GlobalPrefix = "global::";
|
||||
private static readonly string[] GenerateProxyAttributes =
|
||||
[
|
||||
"ProxyInterfaceGenerator.Proxy",
|
||||
"Speckle.ProxyGenerator.Proxy",
|
||||
"Proxy"
|
||||
];
|
||||
private static readonly string[] Modifiers = ["public", "partial"];
|
||||
|
||||
@@ -34,7 +34,7 @@ public class AkkaTests
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(Akka.Actor.LocalActorRefProvider)"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -139,7 +139,7 @@ public class InheritedInterfaceTests
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = $"typeof({Namespace}.{name}), {extendString}"
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ public class PnPTests
|
||||
Text = File.ReadAllText(pathClientObject),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(Microsoft.SharePoint.Client.ClientObject)"
|
||||
}
|
||||
};
|
||||
@@ -56,7 +56,7 @@ public class PnPTests
|
||||
Text = File.ReadAllText(pathSec),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(SecurableObject)" // Only name, no namespace
|
||||
}
|
||||
};
|
||||
@@ -68,7 +68,7 @@ public class PnPTests
|
||||
Text = File.ReadAllText(pathWeb),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(Web)" // Only name, no namespace
|
||||
}
|
||||
};
|
||||
@@ -80,7 +80,7 @@ public class PnPTests
|
||||
Text = File.ReadAllText(pathClientRuntimeContext),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(Microsoft.SharePoint.Client.ClientRuntimeContext)"
|
||||
}
|
||||
};
|
||||
@@ -92,7 +92,7 @@ public class PnPTests
|
||||
Text = File.ReadAllText(pathClientContext),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ClientContext)" // Only name, no namespace
|
||||
}
|
||||
};
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.MyStruct)"
|
||||
}
|
||||
};
|
||||
@@ -66,7 +66,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.Foo)"
|
||||
}
|
||||
};
|
||||
@@ -100,7 +100,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = new[]
|
||||
{
|
||||
"typeof(ProxyInterfaceSourceGeneratorTests.Source.Foo2)",
|
||||
@@ -140,7 +140,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.Generic<>)"
|
||||
}
|
||||
};
|
||||
@@ -180,7 +180,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.ÜberGeneric<>)"
|
||||
}
|
||||
};
|
||||
@@ -220,7 +220,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.OperatorTest)"
|
||||
}
|
||||
};
|
||||
@@ -268,7 +268,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.NoNamespace)"
|
||||
}
|
||||
};
|
||||
@@ -308,7 +308,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.MixedVisibility)"
|
||||
}
|
||||
};
|
||||
@@ -335,7 +335,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
public void GenerateFiles_ForSingleClass_Should_GenerateCorrectFiles()
|
||||
{
|
||||
// Arrange
|
||||
var attributeFilename = "ProxyInterfaceGenerator.Extra.g.cs";
|
||||
var attributeFilename = "Speckle.ProxyGenerator.Extra.g.cs";
|
||||
var interfaceFilename = "ProxyInterfaceSourceGeneratorTests.Source.IPersonExtends.g.cs";
|
||||
var proxyClassFilename =
|
||||
"ProxyInterfaceSourceGeneratorTests.Source.PersonExtendsProxy.g.cs";
|
||||
@@ -347,7 +347,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = new[]
|
||||
{
|
||||
"typeof(ProxyInterfaceSourceGeneratorTests.Source.PersonExtends)",
|
||||
@@ -407,7 +407,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = new[]
|
||||
{
|
||||
"typeof(ProxyInterfaceSourceGeneratorTests.Source.TestClassInternal)",
|
||||
@@ -452,7 +452,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
public void GenerateFiles_ForTwoClasses_Should_GenerateCorrectFiles()
|
||||
{
|
||||
// Arrange
|
||||
var attributeFilename = "ProxyInterfaceGenerator.Extra.g.cs";
|
||||
var attributeFilename = "Speckle.ProxyGenerator.Extra.g.cs";
|
||||
var interfaceHumanFilename = "ProxyInterfaceSourceGeneratorTests.Source.IHuman.g.cs";
|
||||
var proxyClassHumanFilename = "ProxyInterfaceSourceGeneratorTests.Source.HumanProxy.g.cs";
|
||||
var interfacePersonFilename = "ProxyInterfaceSourceGeneratorTests.Source.IPerson.g.cs";
|
||||
@@ -465,7 +465,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(pathPerson),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.Person)"
|
||||
}
|
||||
};
|
||||
@@ -477,7 +477,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(pathHuman),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(ProxyInterfaceSourceGeneratorTests.Source.Human)"
|
||||
}
|
||||
};
|
||||
@@ -556,7 +556,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
public void GenerateFiles_HttpClient()
|
||||
{
|
||||
// Arrange
|
||||
var attributeFilename = "ProxyInterfaceGenerator.Extra.g.cs";
|
||||
var attributeFilename = "Speckle.ProxyGenerator.Extra.g.cs";
|
||||
var interfaceIHttpClientFilename =
|
||||
"ProxyInterfaceSourceGeneratorTests.Source.IHttpClient.g.cs";
|
||||
var proxyClassIHttpClientFilename = "System.Net.Http.HttpClientProxy.g.cs";
|
||||
@@ -571,7 +571,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(pathIHttpClient),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(System.Net.Http.HttpClient)"
|
||||
}
|
||||
};
|
||||
@@ -583,7 +583,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(pathIHttpMessageInvoker),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = "typeof(System.Net.Http.HttpMessageInvoker)"
|
||||
}
|
||||
};
|
||||
@@ -671,7 +671,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
const string @class = "ClassInNamespace";
|
||||
foreach (var x in new[] { 1, 2 })
|
||||
{
|
||||
var attributeFilename = "ProxyInterfaceGenerator.Extra.g.cs";
|
||||
var attributeFilename = "Speckle.ProxyGenerator.Extra.g.cs";
|
||||
var interfaceFilename =
|
||||
$"ProxyInterfaceSourceGeneratorTests.Namespace{x}.I{@class}.g.cs";
|
||||
var proxyClassFilename =
|
||||
@@ -684,7 +684,7 @@ public class ProxyInterfaceSourceGeneratorTest
|
||||
Text = File.ReadAllText(path),
|
||||
AttributeToAddToInterface = new ExtraAttribute
|
||||
{
|
||||
Name = "ProxyInterfaceGenerator.Proxy",
|
||||
Name = "Speckle.ProxyGenerator.Proxy",
|
||||
ArgumentList = new[]
|
||||
{
|
||||
$"typeof(ProxyInterfaceSourceGeneratorTests.Namespace{x}.{@class})",
|
||||
|
||||
@@ -2,6 +2,6 @@ using Microsoft.SharePoint.Client;
|
||||
|
||||
namespace ProxyInterfaceSourceGeneratorTests.Source.PnP
|
||||
{
|
||||
// [ProxyInterfaceGenerator.Proxy(typeof(SecurableObject))]
|
||||
// [Speckle.ProxyGenerator.Proxy(typeof(SecurableObject))]
|
||||
public partial interface ISecurableObject : IClientObject { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user