diff --git a/src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs b/src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs index fbd600c..a77a453 100644 --- a/src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs +++ b/src/01/KSociety.SharpCubeProgrammer/CubeProgrammerApi.cs @@ -199,7 +199,7 @@ public CubeProgrammerError Reset(DebugResetMode rstMode) return output; } - public async ValueTask Reset(DebugResetMode rstMode, CancellationToken cancellationToken = default) + public async ValueTask ResetAsync(DebugResetMode rstMode, CancellationToken cancellationToken = default) { return await Task.Run(() => this.Reset(rstMode), cancellationToken).ConfigureAwait(false); } diff --git a/src/01/KSociety.SharpCubeProgrammer/Interface/ICubeProgrammerApiAsync.cs b/src/01/KSociety.SharpCubeProgrammer/Interface/ICubeProgrammerApiAsync.cs index 72e8d17..6401216 100644 --- a/src/01/KSociety.SharpCubeProgrammer/Interface/ICubeProgrammerApiAsync.cs +++ b/src/01/KSociety.SharpCubeProgrammer/Interface/ICubeProgrammerApiAsync.cs @@ -42,7 +42,7 @@ public interface ICubeProgrammerApiAsync : IAsyncDisposable /// /// This routine used to apply a target reset, use only with ST-LINK!. /// - ValueTask Reset(DebugResetMode rstMode, CancellationToken cancellationToken = default); + ValueTask ResetAsync(DebugResetMode rstMode, CancellationToken cancellationToken = default); #endregion diff --git a/src/01/Samples/Programming/Bindings/ProgrammerApi.cs b/src/01/Samples/Programming/Bindings/ProgrammerApi.cs index 141b565..0c15031 100644 --- a/src/01/Samples/Programming/Bindings/ProgrammerApi.cs +++ b/src/01/Samples/Programming/Bindings/ProgrammerApi.cs @@ -10,7 +10,7 @@ public class ProgrammerApi : Module { protected override void Load(ContainerBuilder builder) { - builder.RegisterType().As().SingleInstance(); + builder.RegisterType().As().As().SingleInstance(); } } } diff --git a/src/01/Samples/Programming/Program.cs b/src/01/Samples/Programming/Program.cs index cfaf41c..053d0f7 100644 --- a/src/01/Samples/Programming/Program.cs +++ b/src/01/Samples/Programming/Program.cs @@ -18,6 +18,7 @@ internal class Program private static IConfigurationRoot? Configuration; private static ILogger? Logger; private static ICubeProgrammerApi? CubeProgrammerApi; + private static ICubeProgrammerApiAsync? CubeProgrammerApiAsync; private static void Main(string[] args) { @@ -33,6 +34,7 @@ private static void Main(string[] args) Logger.LogDebug("Resolve ICubeProgrammerApi..."); CubeProgrammerApi = container.Resolve(); + CubeProgrammerApiAsync = container.Resolve(); Console.WriteLine("Press a button to continue."); Console.ReadLine();