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.
Serialization/MockReadOnly.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="MockReadOnly.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>For constructing test mockreadonly objects</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Net;
10using System.Windows;
11#if !__ANDROID__
12using System.Windows.Controls;
13using System.Windows.Documents;
14using System.Windows.Ink;
15using System.Windows.Input;
16using System.Windows.Media;
17using System.Windows.Media.Animation;
18using System.Windows.Shapes;
19#endif
20using Csla;
22
24{
26 public class MockReadOnly : BusinessBase<MockReadOnly>
27 {
32 public MockReadOnly(int id)
33 {
34 SetProperty<int>(IdProperty, id);
35 }
36
37 public MockReadOnly() { }
38
39 public static readonly PropertyInfo<int> IdProperty = RegisterProperty<int>(
40 typeof(MockReadOnly),
41 new PropertyInfo<int>("Id"));
42
43 public int Id
44 {
45 get { return GetProperty<int>(IdProperty); }
46 }
47 }
48}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
static readonly PropertyInfo< int > IdProperty
MockReadOnly(int id)
For constructing test mockreadonly objects
@ Serializable
Prevents updating or inserting until the transaction is complete.