// Copyright © WireMock.Net using System; using WireMock.Admin.Mappings; using WireMock.Matchers.Request; using WireMock.Server; using WireMock.Types; namespace WireMock; /// /// IMappingBuilder /// public interface IMappingBuilder { /// /// The given. /// /// The request matcher. /// Optional boolean to indicate if this mapping should be saved as static mapping file. /// The . IRespondWithAProvider Given(IRequestMatcher requestMatcher, bool saveToFile = false); /// /// Gets all the mappings as a list. /// /// A list from s. MappingModel[] GetMappings(); /// /// Convert all mappings to JSON. /// /// JSON string ToJson(); /// /// Save all mappings as a single JSON to a file. /// /// The file to write to. void SaveMappingsToFile(string path); /// /// Save all mappings as multiple JSON files (each file is 1 mapping). /// /// The folder to write the files to. void SaveMappingsToFolder(string folder); /// /// Get the C# code for a mapping. /// /// The Mapping Guid. /// The /// C# code (null in case the mapping is not found) string? ToCSharpCode(Guid guid, MappingConverterType converterType); /// /// Get the C# code for all mappings. /// /// The /// C# code public string ToCSharpCode(MappingConverterType converterType); }