CSLA.NET
5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
PropertyHelper.cs
Go to the documentation of this file.
1
//-----------------------------------------------------------------------
2
// <copyright file="PropertyHelper.cs" company="Marimer LLC">
3
// Copyright (c) Marimer LLC. All rights reserved.
4
// Website: https://cslanet.com
5
// </copyright>
6
// <summary>internal implemetation to get a registered property</summary>
7
//----------------------------------------------------------------------
8
using
System;
9
using
System.Linq;
10
using
Csla
.
Core
;
11
using
Csla
.
Core
.
FieldManager
;
12
using
Csla
.
Rules
;
13
14
namespace
Csla.Validation
15
{
16
internal
static
class
PropertyHelper
17
{
18
public
static
IPropertyInfo
GetRegisteredProperty(
BusinessRules
businessRules,
string
propertyName)
19
{
20
var rules = (
IBusinessRules
) businessRules;
21
var target = rules.Target;
22
var primaryProperty = PropertyInfoManager.GetRegisteredProperty(target.GetType(), propertyName);
23
24
if
(primaryProperty ==
null
)
25
throw
new
ArgumentException(
string
.Format(
"Unkonwn property. {0} is not a registered field"
, propertyName));
26
27
return
primaryProperty;
28
}
29
}
30
}
Csla.Rules.BusinessRules
Tracks the business rules for a business object.
Definition:
BusinessRules.cs:29
Csla.Core.IPropertyInfo
Maintains metadata about a property.
Definition:
Csla/Core/IPropertyInfo.cs:16
Csla.Rules.IBusinessRules
Public interfacefor IBusinessRules
Definition:
IBusinessRules.cs:14
Csla.Core.FieldManager
Definition:
DefaultPropertyInfoFactory.cs:11
Csla.Core
Definition:
AddedNewEventArgs.cs:11
Csla.Rules
Definition:
AuthorizationActions.cs:14
Csla.Validation
Definition:
Csla.Validation.Android/Resources/Resource.Designer.cs:14
Csla
Definition:
Csla.AspNetCore.Shared/ApplicationContextManager.cs:16
Generated by
1.9.2