Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetObjectData()

static ? object[] System.Runtime.Serialization.FormatterServices.GetObjectData ( object obj,
MemberInfo[] members )
inlinestatic

Definition at line 204 of file FormatterServices.cs.

205 {
206 if (obj == null)
207 {
208 throw new ArgumentNullException("obj");
209 }
210 if (members == null)
211 {
212 throw new ArgumentNullException("members");
213 }
214 object[] array = new object[members.Length];
215 for (int i = 0; i < members.Length; i++)
216 {
218 if (memberInfo == null)
219 {
220 throw new ArgumentNullException("members", System.SR.Format(System.SR.ArgumentNull_NullMember, i));
221 }
223 if (fieldInfo == null)
224 {
225 throw new SerializationException(System.SR.Serialization_UnknownMemberInfo);
226 }
227 array[i] = fieldInfo.GetValue(obj);
228 }
229 return array;
230 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ArgumentNull_NullMember
Definition SR.cs:20
static string Serialization_UnknownMemberInfo
Definition SR.cs:22
Definition SR.cs:7

References System.SR.ArgumentNull_NullMember, System.array, System.SR.Format(), System.obj, and System.SR.Serialization_UnknownMemberInfo.

Referenced by System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo().