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.
SerializationRoot.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="SerializationRoot.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>no summary</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Text;
11
13{
14 [Serializable()]
15 public class SerializationRoot : BusinessBase<SerializationRoot>
16 {
17 public static PropertyInfo<string> DataProperty = RegisterProperty<string>(c => c.Data, RelationshipTypes.PrivateField);
18 private string _data = DataProperty.DefaultValue;
19 public string Data
20 {
21 get { return GetProperty(DataProperty, _data); }
22 set { SetProperty(DataProperty, ref _data, value); }
23 }
24
25 protected override void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
26 {
27 base.OnDeserialized(context);
28 TestResults.AddOrOverwrite("Deserialized", "true");
29 Console.WriteLine("OnDeserialized");
30 }
31
33 {
34 return dataPortal.Create();
35 }
36
37 [Create]
38 private void Create()
39 {
40 }
41 }
42}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
static SerializationRoot NewSerializationRoot(IDataPortal< SerializationRoot > dataPortal)
static PropertyInfo< string > DataProperty
override void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
Definition: TestResults.cs:21
static void AddOrOverwrite(string key, string value)
Overwrite an item in the test results, to indicate an outcome of a particular operation
Definition: TestResults.cs:39
Interface defining the members of the data portal type.
Definition: IDataPortalT.cs:17
object Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
RelationshipTypes
List of valid relationship types between a parent object and another object through a managed propert...
@ Serializable
Prevents updating or inserting until the transaction is complete.