2011-10-24 00:13:35 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
|
|
namespace CUETools.Codecs
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// This class provides an attribute for marking
|
|
|
|
|
|
/// classes that provide <see cref="IAudioSource" />.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// When plugins with classes that provide <see cref="IAudioSource" /> are
|
|
|
|
|
|
/// registered, their <see cref="AudioDecoderClass" /> attributes are read.
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
/// <example>
|
|
|
|
|
|
/// <code lang="C#">using CUETools.Codecs;
|
|
|
|
|
|
///
|
2018-03-23 19:26:26 -04:00
|
|
|
|
///[AudioDecoderClass(typeof(MyDecoderSettings))]
|
2011-10-24 00:13:35 +00:00
|
|
|
|
///public class MyDecoder : IAudioSource {
|
|
|
|
|
|
/// ...
|
|
|
|
|
|
///}</code>
|
|
|
|
|
|
/// </example>
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
|
2018-03-23 19:26:26 -04:00
|
|
|
|
public sealed class AudioDecoderClassAttribute : Attribute
|
2011-10-24 00:13:35 +00:00
|
|
|
|
{
|
2018-03-23 19:26:26 -04:00
|
|
|
|
public Type Settings
|
2011-10-24 00:13:35 +00:00
|
|
|
|
{
|
2013-03-31 13:29:09 -04:00
|
|
|
|
get;
|
2018-03-23 19:26:26 -04:00
|
|
|
|
private set;
|
2011-10-24 00:13:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2018-03-23 19:26:26 -04:00
|
|
|
|
public AudioDecoderClassAttribute(Type settings)
|
2011-10-24 00:13:35 +00:00
|
|
|
|
{
|
2018-03-23 19:26:26 -04:00
|
|
|
|
Settings = settings;
|
2011-10-24 00:13:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|