using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using System.Security.Permissions;
using System.Globalization;
using BSE.Platten.Ripper.Properties;
namespace BSE.Platten.Ripper
{
[Serializable]
public class MP3Configuration : AudioWriterConfiguration
{
#region FieldsPrivate
private BE_CONFIG m_beConfig;
#endregion
#region Properties
public BE_CONFIG Mp3Configuration
{
get {return this.m_beConfig;}
set {this.m_beConfig = value;}
}
#endregion
#region MethodsPublic
public MP3Configuration(CWaveFormat inFormat) : this(inFormat, new BE_CONFIG(inFormat))
{
}
public MP3Configuration(CWaveFormat inFormat, BE_CONFIG beconfig) : base(inFormat)
{
this.m_beConfig = beconfig;
}
public MP3Configuration() : this(new CWaveFormat(44100, 16, 2))
{
}
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
if (info == null)
{
throw new ArgumentNullException(
string.Format(
CultureInfo.InvariantCulture,
Resources.IDS_ArgumentNullException,
"info"));
}
base.GetObjectData(info, context);
info.AddValue("BE_CONFIG", this.m_beConfig, this.m_beConfig.GetType());
}
#endregion
#region MethodsProtected
protected MP3Configuration(SerializationInfo info, StreamingContext context)
: base(info, context)
{
if (info == null)
{
throw new ArgumentNullException(
string.Format(
CultureInfo.InvariantCulture,
Resources.IDS_ArgumentNullException,
"info"));
}
this.m_beConfig = (BE_CONFIG)info.GetValue("BE_CONFIG", typeof(BE_CONFIG));
}
#endregion
}
}