Skip to content

Commit

Permalink
Format and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus-kirk committed Jan 23, 2024
1 parent 7fd2086 commit 6cf2838
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
7 changes: 7 additions & 0 deletions ConcordiumNetSdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetBranches", "examples\Get
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetFinalizedBlocks", "examples\GetFinalizedBlocks\GetFinalizedBlocks.csproj", "{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeployModule", "examples\DeployModule\DeployModule.csproj", "{79B760E5-E853-4928-A76E-CCE825B59DF6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -227,6 +229,10 @@ Global
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77}.Release|Any CPU.Build.0 = Release|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79B760E5-E853-4928-A76E-CCE825B59DF6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -269,5 +275,6 @@ Global
{79E97788-D084-487E-8F34-0BA1911C452A} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{26417CD7-2897-47BA-BA9B-C4475187331A} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{E2CC6AD7-98CE-41F5-8C66-AE8781F29C77} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
{79B760E5-E853-4928-A76E-CCE825B59DF6} = {FD2CDD9F-4650-4705-9CA2-98CC81F8891D}
EndGlobalSection
EndGlobal
3 changes: 2 additions & 1 deletion examples/DeployModule/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

namespace DeployModule;

internal sealed class DeployModuleOptions {
internal sealed class DeployModuleOptions
{
[Option(
'k',
"keys",
Expand Down
12 changes: 8 additions & 4 deletions src/Types/VersionedModuleSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,15 @@ internal static VersionedModuleSource From(Grpc.V2.VersionedModuleSource version
/// </summary>
/// <param name="modulePath">The path to the versioned WASM file.</param>
/// <exception cref="DeserialException">The provided WASM module was unable to be parsed.</exception>
public static VersionedModuleSource FromFile(string modulePath) {
var bytes = File.ReadAllBytes(modulePath);
if (VersionedModuleSourceFactory.TryDeserial(bytes, out var versionedModule)) {
public static VersionedModuleSource FromFile(string modulePath)
{
var bytes = File.ReadAllBytes(modulePath);
if (TryDeserial(bytes, out var versionedModule))
{
return versionedModule.VersionedModuleSource;
} else {
}
else
{
throw new DeserialException(versionedModule.Error);
}
}
Expand Down

0 comments on commit 6cf2838

Please sign in to comment.