// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Threading.Tasks;
using Avalonia.Data;
namespace Avalonia.Markup.Data.Plugins
{
///
/// Handles binding to s for the '^' stream binding operator.
///
public class TaskStreamPlugin : IStreamPlugin
{
///
/// Checks whether this plugin handles the specified value.
///
/// A weak reference to the value.
/// True if the plugin can handle the value; otherwise false.
public virtual bool Match(WeakReference reference) => reference.Target is Task;
///
/// Starts producing output based on the specified value.
///
/// A weak reference to the object.
///
/// An observable that produces the output for the value.
///
public virtual IObservable