65 lines
2.5 KiB
C#
65 lines
2.5 KiB
C#
using System;
|
|
using System.Runtime.Serialization;
|
|
using Kreta.Framework.Localization;
|
|
using Kreta.Framework.Logging;
|
|
|
|
namespace Kreta.Framework.Actions
|
|
{
|
|
/// <summary>
|
|
/// Védett kódtételre történő írási műveletet jelző kivétel.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>A Generált kód használja.</para>
|
|
/// <para>
|
|
/// Védettnek az a kódtétel minősül, amelynek a típusa a modellben védetté van nyilvánítva,
|
|
/// vagy a Protected tulajdonsága true.
|
|
/// </para>
|
|
/// </remarks>
|
|
[FriendlyName(1000039, "A kódtétel írásvédett, módosítása nem lehetséges.")]
|
|
[ErrorCode(Events.ACTION_INVALIDREQUEST)]
|
|
[Serializable]
|
|
public sealed class ProtectedDictionaryItemException : FrameworkException
|
|
{
|
|
const string _errorMessage = "The dictionary item is write-protected.";
|
|
|
|
/// <summary>
|
|
/// Az osztály konstruktora.
|
|
/// </summary>
|
|
/// <param name="dictionaryItemType">A kódtétel típusa</param>
|
|
public ProtectedDictionaryItemException(string dictionaryItemType)
|
|
: base(_errorMessage, null)
|
|
{
|
|
SetValue("DictionaryItemType", dictionaryItemType);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Az osztály konstruktora.
|
|
/// </summary>
|
|
/// <param name="dictionaryItemType">A kódtétel típusa</param>
|
|
/// <param name="dictionaryItemId">A kódtétel adatbázisbeli azonosítója</param>
|
|
public ProtectedDictionaryItemException(string dictionaryItemType, int dictionaryItemId)
|
|
: base(_errorMessage, null)
|
|
{
|
|
SetValue("DictionaryItemType", dictionaryItemType);
|
|
SetValue("DictionaryItemId", dictionaryItemId);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Az osztály alapértelmezett konstruktora.
|
|
/// </summary>
|
|
[Obsolete("Ezt a konstruktort ne használd!")]
|
|
public ProtectedDictionaryItemException() { }
|
|
|
|
/// <summary>
|
|
/// Az osztály konstruktora.
|
|
/// </summary>
|
|
/// <param name="message">A kivétel üzenete</param>
|
|
/// <param name="innerException">A belső kivétel</param>
|
|
[Obsolete("Ezt a konstruktort ne használd!")]
|
|
public ProtectedDictionaryItemException(string message, Exception innerException)
|
|
: base(message, innerException) { }
|
|
|
|
ProtectedDictionaryItemException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context) { }
|
|
}
|
|
}
|