-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move TentacleScriptDecoratorBuilder and friends into new common proje…
…ct (#918)
- Loading branch information
Showing
50 changed files
with
161 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
source/Octopus.Tentacle.Kubernetes.Tests.Integration/KubernetesTestsGlobalContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
source/Octopus.Tentacle.Tests.Integration.Common/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
[assembly: InternalsVisibleTo("Octopus.Tentacle.Tests.Integration")] | ||
[assembly: InternalsVisibleTo("Octopus.Tentacle.Kubernetes.Tests.Integration")] |
3 changes: 1 addition & 2 deletions
3
.../CapabilitiesServiceV2DecoratorBuilder.cs → .../CapabilitiesServiceV2DecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...mbiningTentacleServiceDecoratorFactory.cs → ...mbiningTentacleServiceDecoratorFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...rs/FileTransferServiceDecoratorBuilder.cs → ...rs/FileTransferServiceDecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...ies/MethodInvocationHookProxyDecorator.cs → ...ies/MethodInvocationHookProxyDecorator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rs/Proxies/MethodLoggingProxyDecorator.cs → ...rs/Proxies/MethodLoggingProxyDecorator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...tors/Proxies/MethodUsageProxyDecorator.cs → ...tors/Proxies/MethodUsageProxyDecorator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...ilders/Decorators/Proxies/MethodUsages.cs → ...ilders/Decorators/Proxies/MethodUsages.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ies/RecordMethodUsagesExtensionMethods.cs → ...ies/RecordMethodUsagesExtensionMethods.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...ilders/Decorators/Proxies/ServiceProxy.cs → ...ilders/Decorators/Proxies/ServiceProxy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...corators/ScriptServiceDecoratorBuilder.cs → ...corators/ScriptServiceDecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...rators/ScriptServiceV2DecoratorBuilder.cs → ...rators/ScriptServiceV2DecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...rators/ScriptServiceV3DecoratorBuilder.cs → ...rators/ScriptServiceV3DecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
...rators/TentacleServiceDecoratorBuilder.cs → ...rators/TentacleServiceDecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...Tests.Integration.Common/Builders/Decorators/TentacleServiceDecoratorBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using Octopus.Tentacle.Tests.Integration.Common.Builders.Decorators.Proxies; | ||
|
||
namespace Octopus.Tentacle.Tests.Integration.Common.Builders.Decorators | ||
{ | ||
public static class TentacleServiceDecoratorBuilderExtensions | ||
{ | ||
public static TentacleServiceDecoratorBuilder RecordMethodUsages<TService>(this TentacleServiceDecoratorBuilder builder, out IRecordedMethodUsages recordedUsages) | ||
where TService : class | ||
{ | ||
var localMethodUsages = new MethodUsages(); | ||
recordedUsages = localMethodUsages; | ||
|
||
return builder.RegisterProxyDecorator<TService>(service => MethodUsageProxyDecorator.Create(service, localMethodUsages)); | ||
} | ||
|
||
public static TentacleServiceDecoratorBuilder HookServiceMethod<TService>(this TentacleServiceDecoratorBuilder builder, string methodName, PreMethodInvocationHook<TService, object> preInvocation) where TService : class | ||
//if we aren't hooking the post invocation, we don't care about the response type | ||
=> HookServiceMethod<TService, object, object>(builder, methodName, preInvocation, null); | ||
|
||
public static TentacleServiceDecoratorBuilder HookServiceMethod<TService, TRequest>(this TentacleServiceDecoratorBuilder builder, string methodName, PreMethodInvocationHook<TService, TRequest> preInvocation) where TService : class | ||
//if we aren't hooking the post invocation, we don't care about the response type | ||
=> HookServiceMethod<TService, TRequest, object>(builder, methodName, preInvocation, null); | ||
|
||
public static TentacleServiceDecoratorBuilder HookServiceMethod<TService, TRequest, TResponse>(this TentacleServiceDecoratorBuilder builder, string methodName, PreMethodInvocationHook<TService, TRequest>? preInvocation, PostMethodInvocationHook<TService, TResponse>? postInvocation) where TService : class | ||
=> builder.RegisterProxyDecorator<TService>(service => MethodInvocationHookProxyDecorator<TService, TRequest, TResponse>.Create(service, methodName, preInvocation, postInvocation)); | ||
} | ||
} |
4 changes: 1 addition & 3 deletions
4
...rators/UniversalScriptServiceDecorator.cs → ...rators/UniversalScriptServiceDecorator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
...UniversalScriptServiceDecoratorBuilder.cs → ...UniversalScriptServiceDecoratorBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...n/Support/Logging/SerilogLoggerBuilder.cs → ...on.Common/Logging/SerilogLoggerBuilder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...pport/Logging/TestContextConnectionLog.cs → ...ommon/Logging/TestContextConnectionLog.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../Support/Logging/TestContextLogCreator.cs → ...n.Common/Logging/TestContextLogCreator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
.../Support/Logging/TestContextLogFactory.cs → ...n.Common/Logging/TestContextLogFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...ion/Support/Logging/TraceLogFileLogger.cs → ...tion.Common/Logging/TraceLogFileLogger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...ctopus.Tentacle.Tests.Integration.Common/Octopus.Tentacle.Tests.Integration.Common.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>Octopus.Tentacle.Tests.Integration.Common</AssemblyName> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<OutputPath>bin</OutputPath> | ||
<PublishDir>../../_build/$(AssemblyName)/$(TargetFramework)/$(RuntimeIdentifier)</PublishDir> | ||
<IsPackable>false</IsPackable> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;osx-x64;osx-arm64;linux-arm64;linux-arm;linux-musl-x64</RuntimeIdentifiers> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Builders\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Octopus.Tentacle.Client\Octopus.Tentacle.Client.csproj" /> | ||
<ProjectReference Include="..\Octopus.Tentacle.CommonTestUtils\Octopus.Tentacle.CommonTestUtils.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.