Small refactor on Template logic

This commit is contained in:
Stef Heyenrath
2022-01-06 21:25:15 +01:00
parent 0f1a4f32ef
commit 60bdc06d29
3 changed files with 8 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
using WireMock.Handlers;
using WireMock.Handlers;
using WireMock.Types;
using Stef.Validation;
@@ -11,11 +11,8 @@ namespace WireMock.Transformers.Scriban
public ScribanContextFactory(IFileSystemHandler fileSystemHandler, TransformerType transformerType)
{
Guard.NotNull(fileSystemHandler, nameof(fileSystemHandler));
Guard.Condition(transformerType, t => t == TransformerType.Scriban || t == TransformerType.ScribanDotLiquid, nameof(transformerType));
_fileSystemHandler = fileSystemHandler;
_transformerType = transformerType;
_fileSystemHandler = Guard.NotNull(fileSystemHandler);
_transformerType = Guard.Condition(transformerType, t => t == TransformerType.Scriban || t == TransformerType.ScribanDotLiquid);
}
public ITransformerContext Create()