CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
PersonSerializationInfoFactory.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="PersonSerializationInfoFactory.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Factory for the creation of test SerializationInfo instances</summary>
7//-----------------------------------------------------------------------
9using System;
10using System.Collections.Generic;
11using System.Text;
12
14{
15 internal static class PersonSerializationInfoFactory
16 {
17
18 internal static SerializationInfo GetDefaultSerializationInfo()
19 {
20 SerializationInfo serializationInfo;
21
22 serializationInfo = new SerializationInfo();
23 serializationInfo.AddValue("_middleName", "");
24 serializationInfo.AddValue("PersonId", 5);
25 serializationInfo.AddValue("FirstName", "");
26 serializationInfo.AddValue("LastName", "");
27 serializationInfo.AddValue("DateOfBirth", DateTime.MinValue);
28 serializationInfo.AddValue("NonSerializedText", "");
29 serializationInfo.AddValue("PrivateText", "");
30 serializationInfo.AddValue("PrivateSerializedText", "");
31
32 return serializationInfo;
33 }
34
35 }
36}
Object containing the serialization data for a specific object.
void AddValue(string name, object value)
Adds a value to the serialization stream.