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.
UsernameCriteria.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="UsernameCriteria.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Criteria class for passing a</summary>
7//-----------------------------------------------------------------------
8using System;
9using Csla;
10
11namespace Csla.Security
12{
19 public class UsernameCriteria : CriteriaBase<UsernameCriteria>
20 {
24 public static readonly PropertyInfo<string> UsernameProperty = RegisterProperty<string>(c => c.Username);
28 public string Username
29 {
30 get { return ReadProperty(UsernameProperty); }
31 private set { LoadProperty(UsernameProperty, value); }
32 }
33
37 public static readonly PropertyInfo<string> PasswordProperty = RegisterProperty<string>(c => c.Password);
41 public string Password
42 {
43 get { return ReadProperty(PasswordProperty); }
44 private set { LoadProperty(PasswordProperty, value); }
45 }
46
56 public UsernameCriteria(string username, string password)
57 {
58 this.Username = username;
59 this.Password = password;
60 }
61
65#if (ANDROID || IOS) || NETFX_CORE
66 public UsernameCriteria()
67 { }
68#else
69 protected UsernameCriteria()
70 { }
71#endif
72 }
73}
Base type from which Criteria classes can be derived in a business class.
Definition: CriteriaBase.cs:25
Maintains metadata about a property.
Criteria class for passing a username/password pair to a custom identity class.
static readonly PropertyInfo< string > PasswordProperty
Password property definition.
string Password
Gets the password.
static readonly PropertyInfo< string > UsernameProperty
Username property definition.
string Username
Username property definition.
UsernameCriteria()
Creates a new instance of the object.
UsernameCriteria(string username, string password)
Creates a new instance of the object.
@ Serializable
Prevents updating or inserting until the transaction is complete.