Skip to content

Commit

Permalink
Simplify intefaces and add a few more bits about the abort flag in th…
Browse files Browse the repository at this point in the history
…e speech recognition API.
  • Loading branch information
IEvangelist committed Nov 29, 2024
1 parent 119313f commit 57200a5
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
4 changes: 1 addition & 3 deletions src/Blazor.Geolocation.WebAssembly/IGeolocationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ namespace Microsoft.JSInterop;
TypeName = "Geolocation",
Implementation = "window.navigator.geolocation",
Url = "https://developer.mozilla.org/docs/Web/API/Geolocation")]
public partial interface IGeolocationService
{
}
public partial interface IGeolocationService;
4 changes: 1 addition & 3 deletions src/Blazor.Geolocation/IGeolocationService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ namespace Microsoft.JSInterop;
Implementation = "window.navigator.geolocation",
HostingModel = BlazorHostingModel.Server,
Url = "https://developer.mozilla.org/docs/Web/API/Geolocation")]
public partial interface IGeolocationService
{
}
public partial interface IGeolocationService;
4 changes: 1 addition & 3 deletions src/Blazor.LocalStorage.WebAssembly/ILocalStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ namespace Microsoft.JSInterop;
"getItem",
"setItem:value"
])]
public partial interface ILocalStorageService
{
}
public partial interface ILocalStorageService;
4 changes: 1 addition & 3 deletions src/Blazor.LocalStorage/ILocalStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ namespace Microsoft.JSInterop;
[
"https://raw.githubusercontent.com/microsoft/TypeScript/main/lib/lib.dom.d.ts"
])]
public partial interface ILocalStorageService
{
}
public partial interface ILocalStorageService;
4 changes: 1 addition & 3 deletions src/Blazor.Permissions.WebAssembly/IPermissionsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ namespace Microsoft.JSInterop;
// TypeName = "Permissions",
// Implementation = "window.navigator.permissions",
// Url = "https://developer.mozilla.org/docs/Web/API/Navigator/permissions")]
public partial interface IPermissionsService
{
}
public partial interface IPermissionsService;
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ namespace Microsoft.JSInterop;
"getItem",
"setItem:value"
])]
public partial interface ISessionStorageService
{
}
public partial interface ISessionStorageService;
4 changes: 1 addition & 3 deletions src/Blazor.SessionStorage/ISessionStorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,4 @@ namespace Microsoft.JSInterop;
HostingModel = BlazorHostingModel.Server,
OnlyGeneratePureJS = true,
Url = "https://developer.mozilla.org/docs/Web/API/Window/sessionStorage")]
public partial interface ISessionStorageService
{
}
public partial interface ISessionStorageService;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ public interface ISpeechRecognitionService : IAsyncDisposable
Task InitializeModuleAsync(bool logModuleDetails = true);

/// <summary>
/// Cancels the active speech recognition session.
/// Cancels the active speech recognition session. Based on the <paramref name="isAborted"/>
/// flag, calls the corresponding native JavaScript API when:
/// <list type="bullet">
/// <item>
/// <see langword="true"/>: Calls <c>speechRecognition.abort</c> which will send an <c>"aborted"</c> error message.
/// </item>
/// <item>
/// <see langword="false"/>: Calls <c>speechRecognition.stop</c> which gracefully stops recognition.
/// </item>
/// </list>
/// </summary>
/// <param name="isAborted">
/// Is aborted controls which API to call,
Expand Down
11 changes: 10 additions & 1 deletion src/Blazor.SpeechRecognition/ISpeechRecognitionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,16 @@ namespace Microsoft.JSInterop;
public interface ISpeechRecognitionService : IAsyncDisposable
{
/// <summary>
/// Cancels the active speech recognition session.
/// Cancels the active speech recognition session. Based on the <paramref name="isAborted"/>
/// flag, calls the corresponding native JavaScript API when:
/// <list type="bullet">
/// <item>
/// <see langword="true"/>: Calls <c>speechRecognition.abort</c> which will send an <c>"aborted"</c> error message.
/// </item>
/// <item>
/// <see langword="false"/>: Calls <c>speechRecognition.stop</c> which gracefully stops recognition.
/// </item>
/// </list>
/// </summary>
/// <param name="isAborted">
/// Is aborted controls which API to call,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ namespace Microsoft.JSInterop;
[
"getVoices"
])]
public partial interface ISpeechSynthesisService
{
}
public partial interface ISpeechSynthesisService;
4 changes: 1 addition & 3 deletions src/Blazor.SpeechSynthesis/ISpeechSynthesisService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ namespace Microsoft.JSInterop;
[
"getVoices"
])]
public partial interface ISpeechSynthesisService
{
}
public partial interface ISpeechSynthesisService;

0 comments on commit 57200a5

Please sign in to comment.