Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ObjectDisposedException.cs
Go to the documentation of this file.
3
4namespace System;
5
7[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
9{
10 private readonly string _objectName;
11
12 public override string Message
13 {
14 get
15 {
16 string objectName = ObjectName;
17 if (string.IsNullOrEmpty(objectName))
18 {
19 return base.Message;
20 }
22 return base.Message + "\r\n" + text;
23 }
24 }
25
26 public string ObjectName => _objectName ?? string.Empty;
27
29 : this(null, SR.ObjectDisposed_Generic)
30 {
31 }
32
34 : this(objectName, SR.ObjectDisposed_Generic)
35 {
36 }
37
38 public ObjectDisposedException(string? objectName, string? message)
39 : base(message)
40 {
41 base.HResult = -2146232798;
43 }
44
46 : base(message, innerException)
47 {
48 base.HResult = -2146232798;
49 }
50
52 : base(info, context)
53 {
54 _objectName = info.GetString("ObjectName");
55 }
56
58 {
59 base.GetObjectData(info, context);
60 info.AddValue("ObjectName", ObjectName, typeof(string));
61 }
62}
ObjectDisposedException(string? message, Exception? innerException)
ObjectDisposedException(SerializationInfo info, StreamingContext context)
override void GetObjectData(SerializationInfo info, StreamingContext context)
ObjectDisposedException(string? objectName, string? message)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ObjectDisposed_ObjectName_Name
Definition SR.cs:1744
Definition SR.cs:7