Skip to content

Releases: IEvangelist/blazorators

1.5.0

29 Mar 15:21
Compare
Choose a tag to compare
  • Two new libraries, speechSynthesis for WASM and Server
  • Introduced finite control over non-pure JS
  • Improved nullability defaults in POCOs
  • Updated demo site

Full Changelog: 1.4.5...1.5.0

1.4.5

26 Mar 14:50
bcf0af8
Compare
Choose a tag to compare

Test Colin's better workflow

What's Changed

New Contributors

Full Changelog: 1.4.3...1.4.5

1.4.4

26 Mar 01:38
264d3b9
Compare
Choose a tag to compare

Test Colin's better workflow

What's Changed

New Contributors

Full Changelog: 1.4.3...1.4.4

Version 1.4.3

25 Mar 02:28
Compare
Choose a tag to compare
  • Source generate overloads to accept Action<T> - thanks @stephentoub for the suggestion

Example input

namespace Microsoft.JSInterop;

[JSAutoInterop(
    TypeName = "Geolocation",
    Implementation = "window.navigator.geolocation",
    Url = "https://developer.mozilla.org/docs/Web/API/Geolocation")]
public partial interface IGeolocationService
{
}

Example output

#nullable enable
namespace Microsoft.JSInterop;

/// <summary>
/// Source generated interface definition of the <c>Geolocation</c> type.
/// </summary>
public partial interface IGeolocationService
{
    /// <summary>
    /// Source generated implementation of <c>window.navigator.geolocation.clearWatch</c>.
    /// <a href="https://developer.mozilla.org/docs/Web/API/Geolocation/clearWatch"></a>
    /// </summary>
    void ClearWatch(double watchId);
    /// <summary>
    /// Source generated implementation of <c>window.navigator.geolocation.getCurrentPosition</c>.
    /// <a href="https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition"></a>
    /// </summary>
    /// <param name = "component">The calling Razor (or Blazor) component.</param>
    /// <param name = "onSuccessCallbackMethodName">Expects the name of a <c>"JSInvokableAttribute"</c> C# method with the following <c>System.Action{GeolocationPosition}"</c>.</param>
    /// <param name = "onErrorCallbackMethodName">Expects the name of a <c>"JSInvokableAttribute"</c> C# method with the following <c>System.Action{GeolocationPositionError}"</c>.</param>
    /// <param name = "options">The <c>PositionOptions</c> value.</param>
    void GetCurrentPosition<TComponent>(
        TComponent component,
        string onSuccessCallbackMethodName,
        string? onErrorCallbackMethodName = null,
        PositionOptions? options = null)
        where TComponent : class;

    /// <summary>
    /// Source generated implementation of <c>window.navigator.geolocation.getCurrentPosition</c>.
    /// <a href="https://developer.mozilla.org/docs/Web/API/Geolocation/getCurrentPosition"></a>
    /// </summary>
    void GetCurrentPosition(
        Action<GeolocationPosition> onSuccessCallback,
        Action<GeolocationPositionError>? onErrorCallback = null,
        PositionOptions? options = null);

    /// <summary>
    /// Source generated implementation of <c>window.navigator.geolocation.watchPosition</c>.
    /// <a href="https://developer.mozilla.org/docs/Web/API/Geolocation/watchPosition"></a>
    /// </summary>
    /// <param name = "component">The calling Razor (or Blazor) component.</param>
    /// <param name = "onSuccessCallbackMethodName">Expects the name of a <c>"JSInvokableAttribute"</c> C# method with the following <c>System.Action{GeolocationPosition}"</c>.</param>
    /// <param name = "onErrorCallbackMethodName">Expects the name of a <c>"JSInvokableAttribute"</c> C# method with the following <c>System.Action{GeolocationPositionError}"</c>.</param>
    /// <param name = "options">The <c>PositionOptions</c> value.</param>
    double WatchPosition<TComponent>(
        TComponent component,
        string onSuccessCallbackMethodName, string?
        onErrorCallbackMethodName = null,
        PositionOptions? options = null)
        where TComponent : class;

    /// <summary>
    /// Source generated implementation of <c>window.navigator.geolocation.watchPosition</c>.
    /// <a href="https://developer.mozilla.org/docs/Web/API/Geolocation/watchPosition"></a>
    /// </summary>
    double WatchPosition(
        Action<GeolocationPosition> onSuccessCallback,
        Action<GeolocationPositionError>? onErrorCallback = null,
        PositionOptions? options = null);
}

Additionally, all of the dependent types are also generated. As well as the dependency injection hooks, and the corresponding implementation.

  • IGeolocationServices.g.cs
  • GeolocationServices.g.cs
  • GeolocationServiceCollectionExtensions.g.cs
  • GeolocationPosition.g.cs
  • GeolocationPositionError.g.cs
  • GeolocationCoordinates.g.cs
  • PositionOptions.g.cs

Full Changelog: 1.4.2...1.4.3

Release v1.4.2

23 Mar 15:48
Compare
Choose a tag to compare

New libs for session storage

Full Changelog: 1.4.0...1.4.2

Release 1.4.1 - New libs

23 Mar 15:40
Compare
Choose a tag to compare
  • Add session storage libs, and introduce Bing maps in example

Full Changelog: 1.4.0...1.4.1

Version 1.4.0

22 Mar 14:31
Compare
Choose a tag to compare
  • Target public partial interface instead of internal static partial class
  • More XML comments
  • Append Service suffix to interface and impls.

Full Changelog: 1.3.3...1.4.0

v1.3.3 (version 1.3.2, but better)

18 Mar 03:39
Compare
Choose a tag to compare
  • Implemented Geolocation server-side
  • Fixed attributes
  • More XML comments
  • Better serialization
  • Helpers for epoch time and DOMTimeStamp

Full Changelog: 1.3.1...1.3.3

1.3.2

18 Mar 03:34
Compare
Choose a tag to compare
  • Implemented Geolocation server-side
  • Fixed attributes
  • More XML comments
  • Better serialization
  • Helpers for epoch time and DOMTimeStamp

Full Changelog: 1.3.1...1.3.2

v1.3.1 bugs

16 Mar 12:44
Compare
Choose a tag to compare
Fix package name