Skip to content

Conversation

@Sergio0694
Copy link
Member

Closes #408

This PR adds observable extensions for IMessenger with the following public API:

namespace CommunityToolkit.Mvvm.Messaging;

partial class IMessengerExtensions
{
    public static IObservable<TMessage> CreateObservable<TMessage>(this IMessenger messenger)
        where TMessage : class;

    public static IObservable<TMessage> CreateObservable<TMessage, TToken>(this IMessenger messenger, TToken token)
        where TMessage : class
        where TToken : IEquatable<TToken>;
}

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • Tested code with current supported SDKs
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

@Sergio0694 Sergio0694 added feature 💡 A new feature being implemented mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit labels Oct 3, 2022
@Sergio0694 Sergio0694 requested a review from Arlodotexe October 3, 2022 13:26
@Sergio0694 Sergio0694 force-pushed the dev/messenger-observable branch from e266557 to accfa0b Compare October 4, 2022 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 💡 A new feature being implemented mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Messenger extensions to bridge functionality to IObservable<T>

2 participants