CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
UndoException.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="UndoException.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Exception indicating a problem with the</summary>
7//-----------------------------------------------------------------------
8using System;
9
10namespace Csla.Core
11{
18 [Serializable()]
19 public class UndoException : Exception
20 {
24 public string TypeName;
28 public string ParentTypeName;
32 public int CurrentEditLevel;
37
46 public UndoException(string message, string typeName, string parentTypeName, int currentEditLevel, int expectedEditLevel)
47 : base(message)
48 {
49 TypeName = typeName;
50 ParentTypeName = parentTypeName;
51 CurrentEditLevel = currentEditLevel;
52 ExpectedEditLevel = expectedEditLevel;
53 }
54
60 public UndoException(string message, Exception ex)
61 : base(message, ex)
62 {
63
64 }
65
66#if !NETFX_CORE && !IOS && !ANDROID
72 protected UndoException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
73 : base(info, context)
74 {
75
76 }
77
83 public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
84 {
85
86 base.GetObjectData(info, context);
87
88 }
89#endif
90 }
91}
Exception indicating a problem with the use of the n-level undo feature in CSLA .NET.
string ParentTypeName
The parent's type name of the object that caused this issue or null
override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Serializes the object.
int CurrentEditLevel
Object EditLevel
UndoException(string message, string typeName, string parentTypeName, int currentEditLevel, int expectedEditLevel)
Creates an instance of the object.
string TypeName
The type name of the object that caused this issue
int ExpectedEditLevel
Expected object EditLevel
UndoException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
Creates an instance of the object for serialization.
UndoException(string message, Exception ex)
Creates an instance of the object.
@ Serializable
Prevents updating or inserting until the transaction is complete.