<PackageReference Include="NJsonSchema" Version="10.6.8" />

DynamicApis

public static class DynamicApis
Provides dynamic access to framework APIs.
public static bool SupportsDirectoryApis { get; }

Gets a value indicating whether path APIs are available.

public static bool SupportsFileApis { get; }

Gets a value indicating whether file APIs are available.

public static bool SupportsHttpClientApis { get; }

Gets a value indicating whether WebClient APIs are available.

public static bool SupportsPathApis { get; }

Gets a value indicating whether path APIs are available.

public static bool SupportsXPathApis { get; }

Gets a value indicating whether XPath APIs are available.

public static void DirectoryCreateDirectory(string directory)

Creates a directory.

public static bool DirectoryExists(string filePath)

Checks whether a directory exists.

public static string DirectoryGetCurrentDirectory()

Gets the current working directory.

public static string[] DirectoryGetDirectories(string directory)

Gets the current working directory.

public static string[] DirectoryGetFiles(string directory, string filter)

Gets the files of the given directory.

public static string DirectoryGetParent(string path)

Retrieves the parent directory of the specified path, including both absolute and relative paths..

public static bool FileExists(string filePath)

Checks whether a file exists.

public static string FileReadAllText(string filePath)

Reads all content of a file (UTF8 with or without BOM).

public static void FileWriteAllText(string filePath, string text)

Writes text to a file (UTF8 without BOM).

public static string GetFullPath(string path)

Gets the full path from a given path

public static string HandleSubdirectoryRelativeReferences(string fullPath, string jsonPath)

Handle cases of specs in subdirectories having external references to specs also in subdirectories

public static Task<string> HttpGetAsync(string url, CancellationToken cancellationToken)

Request the given URL via HTTP.

public static string PathCombine(string path1, string path2)

Combines two paths.

public static string PathGetDirectoryName(string filePath)

Gets the directory path of a file path.

public static string PathGetFileName(string filePath)

Gets the file name from a given path.

public static object XPathEvaluate(XDocument document, string path)

Evaluates the XPath for a given XML document.