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.
Csla.test/Basic/RootList.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="RootList.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;
11using Csla;
12
13namespace Csla.Test.Basic
14{
16 public class RootList : BusinessBindingListBase<RootList, RootListChild>
17 {
18 public RootList()
19 {
20 AllowEdit = true;
21 AllowNew = true;
22 AllowRemove = true;
23 }
24
25 protected override object AddNewCore()
26 {
27 RootListChild child = new RootListChild();
28 Add(child);
29 return child;
30 }
31 }
32
34 public class RootListChild : BusinessBase<RootListChild>
35 {
36 public static PropertyInfo<int> DataProperty = RegisterProperty<int>(c => c.Data);
37 public int Data
38 {
39 get { return GetProperty(DataProperty); }
40 set { SetProperty(DataProperty, value); }
41 }
42
43 public string[] GetRuleDescriptions()
44 {
45 string[] result = BusinessRules.GetRuleDescriptions();
46 if (result == null)
47 result = new string[] { };
48 return result;
49 }
50
52 {
53 MarkAsChild();
54 }
55 }
56}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
This is the base class from which most business collections or lists will be derived.
Maintains metadata about a property.
@ Serializable
Prevents updating or inserting until the transaction is complete.