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.
PropertyInfoRoot.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="PropertyInfoRoot.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Note: We exposed the PropertyInfo's so we can test it...</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.ComponentModel;
10using System.ComponentModel.DataAnnotations;
11
13{
14 [Serializable()]
15 public class PropertyInfoRoot : BusinessBase<PropertyInfoRoot>
16 {
17 #region Factory Methods
18
20 {
21 return dataPortal.Create();
22 }
23
24 #endregion
25
26 #region DataPortal Methods
27
28 [Create]
29 protected void DataPortal_Create()
30 {
31 }
32
33 #endregion
34
38 #region Properties
39
40 public static readonly PropertyInfo<System.String> _nameProperty = RegisterProperty<System.String>(p => p.Name);
41 public System.String Name
42 {
43 get { return GetProperty(_nameProperty); }
44 set { SetProperty(_nameProperty, value); }
45 }
46
47 public static readonly PropertyInfo<System.String> _nameDataAnnotationsProperty = RegisterProperty<System.String>(p => p.NameDataAnnotations);
48 [Display(Name = "Name: DataAnnotations")]
49 public System.String NameDataAnnotations
50 {
51 get { return GetProperty(_nameDataAnnotationsProperty); }
52 set { SetProperty(_nameDataAnnotationsProperty, value); }
53 }
54
55 public static readonly PropertyInfo<System.String> _nameComponentModelProperty = RegisterProperty<System.String>(p => p.NameComponentModel);
56 [DisplayName("Name: ComponentModel")]
57 public System.String NameComponentModel
58 {
59 get { return GetProperty(_nameComponentModelProperty); }
60 set { SetProperty(_nameComponentModelProperty, value); }
61 }
62
63 public static readonly PropertyInfo<System.String> _nameFriendlyNameProperty = RegisterProperty<System.String>(p => p.NameFriendlyName, "Name: Friendly Name");
64 public System.String NameFriendlyName
65 {
66 get { return GetProperty(_nameFriendlyNameProperty); }
67 set { SetProperty(_nameFriendlyNameProperty, value); }
68 }
69
70 public static readonly PropertyInfo<string> NameDefaultValueProperty = RegisterProperty<string>(c => c.NameDefaultValue, string.Empty, "x");
71 public string NameDefaultValue
72 {
73 get { return GetProperty(NameDefaultValueProperty); }
74 set { SetProperty(NameDefaultValueProperty, value); }
75 }
76
77 public static readonly PropertyInfo<string> StringNullDefaultValueProperty = RegisterProperty<string>(c => c.StringNullDefaultValue, string.Empty, null);
79 {
80 get { return GetProperty(StringNullDefaultValueProperty); }
81 set { SetProperty(StringNullDefaultValueProperty, value); }
82 }
83
84
85 #endregion
86 }
87}
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< System.String > _nameComponentModelProperty
static readonly PropertyInfo< System.String > _nameProperty
Note: We exposed the PropertyInfo's so we can test it...
static readonly PropertyInfo< string > StringNullDefaultValueProperty
static readonly PropertyInfo< string > NameDefaultValueProperty
static readonly PropertyInfo< System.String > _nameFriendlyNameProperty
static readonly PropertyInfo< System.String > _nameDataAnnotationsProperty
static PropertyInfoRoot NewPropertyInfoRoot(IDataPortal< PropertyInfoRoot > dataPortal)
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...
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Create
Create operation.