|
using System;
using System.Globalization;
using System.Runtime.Serialization;
namespace NetMX.OpenMBean.Mapper
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1032:ImplementStandardExceptionConstructors", Justification = "Other constructos do not make sense"), Serializable]
public sealed class MapperNotFoundException : NetMXException
{
private readonly int _priority;
/// <summary>
/// Creates new <see cref="MapperNotFoundException"/> object.
/// </summary>
public MapperNotFoundException(int priority)
: base(string.Format(CultureInfo.CurrentCulture, "Cannot find mapper with priority {0}.",priority))
{
_priority = priority;
}
private MapperNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
_priority = info.GetInt32("priority");
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods"), System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("priority", _priority);
}
/// <summary>
/// Gets the priority.
/// </summary>
public int Priority
{
get { return _priority; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.