namespace Bmp.Core.FFMpeg.CsCorePorts;
///
/// Specifies which to use.
///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface, AllowMultiple = false)]
public sealed class TimeConverterAttribute : Attribute
{
///
/// Gets the type of the to use.
///
public Type TimeConverterType { get; private set; }
///
/// Gets or sets the arguments to pass to the constructor of the . For more information, see .
///
public object[] Args { get; set; }
///
/// Gets or sets a value indicating whether a new instance of the specified should be created each time the queries the .
/// The default value is false.
///
public bool ForceNewInstance { get; set; }
///
/// Initializes a new instance of the class based on the type of the to use.
///
/// Type of the to use.
/// timeConverterType
/// Specified type is no time converter.;timeConverterType
public TimeConverterAttribute(Type timeConverterType)
{
if (timeConverterType == null)
throw new ArgumentNullException("timeConverterType");
if (!typeof(TimeConverter).IsAssignableFrom(timeConverterType))
throw new ArgumentException("Specified type is no time converter.", "timeConverterType");
TimeConverterType = timeConverterType;
}
}