init
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Kreta.Framework.Localization;
|
||||
using Kreta.Framework.Logging;
|
||||
|
||||
namespace Kreta.Framework.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Érvénytelen entitás művelet.
|
||||
/// </summary>
|
||||
[FriendlyName(1000011, "Súlyos üzleti logikai hiba, kérjük értesítse az üzemeltetőt.\r\nHivatkozási hiba azonosító: {Id}")]
|
||||
[ErrorCode(Events.ENTITY_INVALIDSTATE)]
|
||||
[Serializable]
|
||||
public sealed class EntityStateException : EntityException
|
||||
{
|
||||
const string _errorMessage = "The operation cannot be completed according to state of the entity.";
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="currentState">Az entitás jelenlegi állapota.</param>
|
||||
public EntityStateException(EntityState currentState)
|
||||
: base(_errorMessage)
|
||||
{
|
||||
this.SetValue("CurrentState", currentState);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály alapértelmezett konstruktora.
|
||||
/// </summary>
|
||||
[Obsolete("Ezt a konstruktort ne használd!")]
|
||||
public EntityStateException() { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A kivétel üzenete</param>
|
||||
[Obsolete("Ezt a konstruktort ne használd!")]
|
||||
public EntityStateException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <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 EntityStateException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="info">Sorosítási adatok</param>
|
||||
/// <param name="context">Sorosítási adatfolyam</param>
|
||||
EntityStateException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context) { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user