mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-22 00:59:02 +01:00
Add CSharpCodeMatcher (#324)
* wip * fix * . * windows-2019 * <Target Name="CheckIfShouldKillVBCSCompiler" /> * <!--https://github.com/aspnet/RoslynCodeDomProvider/issues/51--> * AllowCSharpCodeMatcher * CSharpCodeMatcher : IObjectMatcher * TemplateForIsMatchWithDynamic * RequestMessageBodyMatcher_GetMatchingScore_BodyAsJson_CSharpCodeMatcher * fix * } * Better Exception Handling
This commit is contained in:
@@ -41,6 +41,14 @@ namespace WireMock.Serialization
|
||||
|
||||
switch (matcherName)
|
||||
{
|
||||
case "CSharpCodeMatcher":
|
||||
if (_settings.AllowCSharpCodeMatcher == true)
|
||||
{
|
||||
return new CSharpCodeMatcher(matchBehaviour, stringPatterns);
|
||||
}
|
||||
|
||||
throw new NotSupportedException("It's not allowed to use the 'CSharpCodeMatcher' because FluentMockServerSettings.AllowCSharpCodeMatcher is not set to 'true'.");
|
||||
|
||||
case "LinqMatcher":
|
||||
return new LinqMatcher(matchBehaviour, stringPatterns);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user