3 instantiations of ReadResult
Microsoft.NET.Sdk.StaticWebAssets.Tasks (3)
Utils\BrowserToolsKeyPair.cs (3)
51public static ReadResult Invalid(string reason) => new(false, null, default, reason); 80return new ReadResult(true, publicKey, default, null); 130return new ReadResult(true, publicKey, rsaParameters, null);
17 references to ReadResult
Microsoft.NET.Sdk.StaticWebAssets.Tasks (17)
EnsureDotNetWatchBrowserToolsKey.cs (2)
108var publicDocument = BrowserToolsKeyPair.TryReadPublicKeyFile(PublicKeyPath); 115var privateDocument = BrowserToolsKeyPair.TryReadPrivateKeyFile(PrivateKeyPath);
Utils\BrowserToolsKeyPair.cs (15)
51public static ReadResult Invalid(string reason) => new(false, null, default, reason); 54public static ReadResult TryReadPublicKeyFile(string path) 60return ReadResult.Invalid("the file does not exist"); 67return ReadResult.Invalid("the document is not a JSON object"); 72return ReadResult.Invalid(headerError); 77return ReadResult.Invalid("the 'publicKey' property is missing or is not base64"); 84return ReadResult.Invalid($"the file could not be read ({ex.GetType().Name})"); 88public static ReadResult TryReadPrivateKeyFile(string path) 94return ReadResult.Invalid("the file does not exist"); 101return ReadResult.Invalid("the document is not a JSON object"); 106return ReadResult.Invalid(headerError); 111return ReadResult.Invalid("the 'publicKey' property is missing or is not base64"); 116return ReadResult.Invalid("the 'parameters' property is missing or is not an object"); 124return ReadResult.Invalid($"the private key component '{name}' is missing or is not base64"); 134return ReadResult.Invalid($"the file could not be read ({ex.GetType().Name})");