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