2012-08-27 18:42:54 +00:00
|
|
|
|
#region Using Statements
|
|
|
|
|
using System;
|
2015-03-29 18:16:03 +02:00
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
using System.Security.Permissions;
|
2012-08-27 18:42:54 +00:00
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
// This file is part of the ANX.Framework created by the
|
|
|
|
|
// "ANX.Framework developer group" and released under the Ms-PL license.
|
|
|
|
|
// For details see: http://anxframework.codeplex.com/license
|
|
|
|
|
|
|
|
|
|
namespace ANX.Framework.Content.Pipeline
|
|
|
|
|
{
|
2015-03-29 18:16:03 +02:00
|
|
|
|
[Serializable]
|
2012-08-27 18:42:54 +00:00
|
|
|
|
public class InvalidContentException : Exception
|
|
|
|
|
{
|
2015-03-29 18:16:03 +02:00
|
|
|
|
public InvalidContentException()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-27 18:42:54 +00:00
|
|
|
|
public InvalidContentException(string message)
|
|
|
|
|
: base(message)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-29 18:16:03 +02:00
|
|
|
|
public InvalidContentException(string message, Exception innerException)
|
|
|
|
|
: base(message, innerException)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public InvalidContentException(string message, ContentIdentity contentIdentity)
|
|
|
|
|
: base(message)
|
|
|
|
|
{
|
|
|
|
|
this.ContentIdentity = contentIdentity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public InvalidContentException(string message, ContentIdentity contentIdentity, Exception innerException)
|
|
|
|
|
: base(message, innerException)
|
|
|
|
|
{
|
|
|
|
|
this.ContentIdentity = contentIdentity;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected InvalidContentException(SerializationInfo serializationInfo, StreamingContext streamingContext)
|
|
|
|
|
: base(serializationInfo, streamingContext)
|
|
|
|
|
{
|
|
|
|
|
if (serializationInfo == null)
|
|
|
|
|
{
|
|
|
|
|
throw new ArgumentNullException("serializationInfo");
|
|
|
|
|
}
|
|
|
|
|
this.ContentIdentity = (ContentIdentity)serializationInfo.GetValue("ContentIdentity", typeof(ContentIdentity));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentIdentity ContentIdentity
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
set;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)]
|
|
|
|
|
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
|
|
|
|
{
|
|
|
|
|
if (info == null)
|
|
|
|
|
throw new ArgumentNullException("info");
|
|
|
|
|
|
|
|
|
|
base.GetObjectData(info, context);
|
|
|
|
|
info.AddValue("ContentIdentity", this.ContentIdentity, typeof(ContentIdentity));
|
|
|
|
|
}
|
2012-08-27 18:42:54 +00:00
|
|
|
|
}
|
|
|
|
|
}
|