init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
59
Framework/Entities/EntityStateException.cs
Normal file
59
Framework/Entities/EntityStateException.cs
Normal file
|
@ -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) { }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue