// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
using System.Collections.Generic;
using OwlCore.ComponentModel;
using StrixMusic.Sdk.AppModels;
using StrixMusic.Sdk.CoreModels;
namespace StrixMusic.Sdk.Plugins.Model
{
///
/// An implementation of which delegates all member access to the implementation,
/// unless the member is overridden in a derived class which changes the behavior.
///
public class LyricsPluginBase : IModelPlugin, ILyrics, IDelegatable
{
///
/// Creates a new instance of .
///
/// Metadata about the plugin which was provided during registration.
/// The implementation which all member access is delegated to, unless the member is overridden in a derived class which changes the behavior.
internal protected LyricsPluginBase(ModelPluginMetadata registration, ILyrics inner)
{
Metadata = registration;
Inner = inner;
}
///
public event EventHandler? SourcesChanged
{
add => Inner.SourcesChanged += value;
remove => Inner.SourcesChanged -= value;
}
///
public ModelPluginMetadata Metadata { get; }
///
public ILyrics Inner { get; }
///
public virtual ITrack Track => Inner.Track;
///
public virtual Dictionary? TimedLyrics => Inner.TimedLyrics;
///
public virtual string? TextLyrics => Inner.TextLyrics;
///
public virtual bool Equals(ICoreLyrics other) => Inner.Equals(other);
///
public IReadOnlyList Sources => Inner.Sources;
}
}