1#if !NETFX_CORE && !(ANDROID || IOS)
10using System.Collections;
11using System.Runtime.Serialization;
19 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Design",
"CA1032:ImplementStandardExceptionConstructors")]
24 private string _stackTrace;
25 private IDictionary _data;
49 public override IDictionary
Data
75 : base(wrappedException.Message)
77 this.Source = wrappedException.Source;
78 this.HelpLink = wrappedException.HelpLink;
79 _data = wrappedException.Data;
80 _stackTrace = wrappedException.StackTrace;
81 _type = wrappedException.GetType().ToString();
90 : base(wrappedException.Message, innerException)
92 this.Source = wrappedException.Source;
93 this.HelpLink = wrappedException.HelpLink;
94 _data = wrappedException.Data;
95 _stackTrace = wrappedException.StackTrace;
96 _type = wrappedException.GetType().ToString();
108 : base(info, context)
111 _data = (IDictionary)info.GetValue(
"_data", typeof(IDictionary));
112 _stackTrace = info.GetString(
"_stackTrace");
113 _type = info.GetString(
"_type");
126 [System.Diagnostics.CodeAnalysis.SuppressMessage(
"Microsoft.Design",
"CA1062:ValidateArgumentsOfPublicMethods")]
127#if !NET5_0 && !NET6_0
128 [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.LinkDemand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
129 [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
131 public override void GetObjectData(SerializationInfo info, StreamingContext context)
133 base.GetObjectData(info, context);
135 info.AddValue(
"_data", _data);
136 info.AddValue(
"_stackTrace", _stackTrace);
137 info.AddValue(
"_type", _type);
152 string message = this.Message;
153 if ((message ==
null) || (message.Length <= 0))
159 className = _type +
": " + message;
162 if (stackTrace !=
null)
164 className = className + Environment.NewLine + stackTrace;
This exception is returned as BusinessException in DataPortalException when the serverside/inner exce...
override IDictionary Data
Gets a collection of key/value pairs that provide additional user-defined information about the excep...
GenericBusinessException(SerializationInfo info, StreamingContext context)
Initializes a new instance of the GenericBusinessException class.
override string ToString()
Returns a System.String that represents this instance.
override void GetObjectData(SerializationInfo info, StreamingContext context)
When overridden in a derived class, sets the T:System.Runtime.Serialization.SerializationInfo with in...
string TypeName
Gets the name of the type.
GenericBusinessException(Exception wrappedException, Exception innerException)
Initializes a new instance of the GenericBusinessException class.
GenericBusinessException(Exception wrappedException)
Initializes a new instance of the GenericBusinessException class.
override string StackTrace
Gets a string representation of the immediate frames on the call stack.
@ Serializable
Prevents updating or inserting until the transaction is complete.