mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-20 16:44:31 +01:00
Implement PatternAsFile for StringMatcher (#651)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using WireMock.Util;
|
||||
using WireMock.Validation;
|
||||
@@ -130,6 +130,12 @@ namespace WireMock.Handlers
|
||||
return File.ReadAllBytes(AdjustPath(filename));
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IFileSystemHandler.ReadFileAsString"/>
|
||||
public string ReadFileAsString(string filename)
|
||||
{
|
||||
return File.ReadAllText(AdjustPath(Check.NotNullOrEmpty(filename, nameof(filename))));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adjusts the path to the MappingFolder.
|
||||
/// </summary>
|
||||
@@ -140,4 +146,4 @@ namespace WireMock.Handlers
|
||||
return Path.Combine(GetMappingFolder(), filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user