CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Security.UsernameCriteria Class Reference

Criteria class for passing a username/password pair to a custom identity class. More...

Inheritance diagram for Csla.Security.UsernameCriteria:
Csla.ReadOnlyBase< T > Csla.Core.BindableBase Csla.Core.IUseApplicationContext Csla.Core.MobileObject Csla.Serialization.Mobile.IMobileObject Csla.Serialization.Mobile.IMobileObjectMetastate

Public Member Functions

 UsernameCriteria (string username, string password)
 Creates a new instance of the object.
Public Member Functions inherited from Csla.ReadOnlyBase< T >
override string ToString ()
 Returns a text representation of this object by returning the GetIdValue value in text form.
virtual bool CanReadProperty (IPropertyInfo property)
 Returns true if the user is allowed to read the calling property.
bool CanReadProperty (IPropertyInfo property, bool throwOnFalse)
 Returns true if the user is allowed to read the calling property.
bool CanReadProperty (string propertyName)
virtual bool CanExecuteMethod (IMemberInfo method)
 Returns true if the user is allowed to execute the specified method.
bool CanExecuteMethod (IMemberInfo method, bool throwOnFalse)
 Returns true if the user is allowed to execute the specified method.
virtual bool CanExecuteMethod (string methodName)
 Returns true if the user is allowed to execute the specified method.
virtual object GetClone ()
 Creates a clone of the object.
Clone ()
 Creates a clone of the object.
async Task WaitForIdle ()
 Await this method to ensure business object is not busy running async rules.
Task WaitForIdle (TimeSpan timeout)
 Await this method to ensure business object is not busy running async rules.
Task WaitForIdle (CancellationToken ct)
 Waits for the object to become idle.

Static Public Attributes

static readonly PropertyInfo< string > UsernameProperty = RegisterProperty<string>(c => c.Username)
 Username property definition.
static readonly PropertyInfo< string > PasswordProperty = RegisterProperty<string>(c => c.Password)
 Password property definition.

Protected Member Functions

 UsernameCriteria ()
 Creates a new instance of the object.
Protected Member Functions inherited from Csla.ReadOnlyBase< T >
virtual ? object GetIdValue ()
 Override this method to return a unique identifying value for this object.
 ReadOnlyBase ()
 Creates an instance of the type.
virtual void Initialize ()
 Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.
virtual void AddBusinessRules ()
 Override this method to add per-type authorization rules for your type's properties.
virtual void DataPortal_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.
virtual void DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_xyz method.
virtual void DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during data access.
virtual void Child_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.
virtual void Child_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.
virtual void Child_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during data access.
virtual void Deserialized ()
 Invoked after the object has been deserialized to allow derived classes to perform custom post-deserialization processing.
P? GetProperty< P > (string propertyName, P? field, P? defaultValue)
 Gets a property's value, first checking authorization.
P? GetProperty< P > (string propertyName, P? field, P? defaultValue, NoAccessBehavior noAccess)
 Gets a property's value, first checking authorization.
P? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo, P? field)
 Gets a property's value, first checking authorization.
P? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo, P? field, P? defaultValue, NoAccessBehavior noAccess)
 Gets a property's value, first checking authorization.
P? LazyGetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > property, Func< P > valueGenerator)
 Lazily initializes a property and returns the resulting value.
bool PropertyIsLoading (IPropertyInfo propertyInfo)
 Gets a value indicating whether a lazy loaded property is currently being retrieved.
P? LazyGetPropertyAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > property, Task< P > factory)
 Lazily initializes a property and returns the resulting value.
P? GetPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo, F? field)
 Gets a property's value as a specified type, first checking authorization.
P? GetPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo, F? field, NoAccessBehavior noAccess)
 Gets a property's value as a specified type, first checking authorization.
P? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo)
 Gets a property's managed field value, first checking authorization.
P? GetPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo)
 Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type.
P? GetPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo, NoAccessBehavior noAccess)
 Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type.
P? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo, NoAccessBehavior noAccess)
 Gets a property's value as a specified type, first checking authorization.
object? GetProperty (IPropertyInfo propertyInfo)
 Gets a property's value as a specified type.
P? ReadPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo)
 Gets a property's value from the list of managed field values, converting the value to an appropriate type.
P? ReadProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo)
 Gets a property's value as a specified type.
virtual ? object ReadProperty (IPropertyInfo propertyInfo)
 Gets a property's value as a specified type.
P? LazyReadProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > property, Func< P > valueGenerator)
 Gets a property's value as a specified type.
P? LazyReadPropertyAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > property, Task< P > factory)
 Gets a property's value as a specified type.
void LoadPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F > (PropertyInfo< P > propertyInfo, F? newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.
void LoadProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo, P? newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.
virtual void LoadProperty (IPropertyInfo propertyInfo, object? newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.
void LoadPropertyAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] R > (PropertyInfo< R > property, Task< R > factory)
 Load a property from an async method.
void MarkBusy ()
 Marks the object as being busy (it is running an async operation).
void MarkIdle ()
 Marks the object as being not busy (it is not running an async operation).
void OnBusyChanged (string propertyName, bool busy)
 Raises the BusyChanged event.
virtual void OnBusyChanged (BusyChangedEventArgs args)
 Raises the BusyChanged event.
override void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to insert your child object references into the MobileFormatter serialization stream.
override void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to retrieve your child object references from the MobileFormatter serialization stream.
virtual void OnUnhandledAsyncException (Core.ErrorEventArgs error)
 Raises the UnhandledAsyncException event.
void OnUnhandledAsyncException (object originalSender, Exception error)
 Raises the UnhandledAsyncException event.
Protected Member Functions inherited from Csla.Core.BindableBase
 BindableBase ()
 Creates an instance of the type.
virtual bool ShouldHandlerSerialize (PropertyChangedEventHandler value)
 Override this method to change the default logic for determining if the event handler should be serialized.
virtual void OnPropertyChanged (string propertyName)
 Call this method to raise the PropertyChanged event for a specific property.
virtual void OnMetaPropertyChanged (string propertyName)
virtual void OnPropertyChanged (IPropertyInfo propertyInfo)
 Call this method to raise the PropertyChanged event for a specific property.
virtual void OnIsDirtyChanged ()
 Call this method to raise the PropertyChanged event for all object properties.
virtual void OnUnknownPropertyChanged ()
 Call this method to raise the PropertyChanged event for all object properties.
virtual void OnIsDirtyChanging ()
 Call this method to raise the PropertyChanging event for all object properties.
virtual void OnUnknownPropertyChanging ()
 Call this method to raise the PropertyChanging event for all object properties.
virtual void OnPropertyChanging (string propertyName)
 Call this method to raise the PropertyChanging event for a specific property.
virtual void OnPropertyChanging (IPropertyInfo propertyInfo)
 Call this method to raise the PropertyChanging event for a specific property.
virtual bool ShouldHandlerSerialize (PropertyChangingEventHandler value)
 Override this method to change the default logic for determining if the event handler should be serialized.
Protected Member Functions inherited from Csla.Core.MobileObject
virtual void OnGetState (SerializationInfo info, StateMode mode)
 Override this method to insert your field values into the MobileFormatter serialization stream.
virtual void OnSetState (SerializationInfo info, StateMode mode)
 Override this method to retrieve your field values from the MobileFormatter serialization stream.
virtual void OnGetMetastate (BinaryWriter writer)
 Override this method to write field values directly to a binary stream for metastate serialization.
virtual void OnSetMetastate (BinaryReader reader)
 Override this method to read field values directly from a binary stream for metastate deserialization.

Properties

string Username [get]
 Username property definition.
string Password [get]
 Gets the password.
Properties inherited from Csla.ReadOnlyBase< T >
ApplicationContext ApplicationContext [get, set]
 Gets or sets the current ApplicationContext object.
virtual bool IsCanReadPropertyAuthorizationCheckDisabled = false [get]
 Gets or sets if CanReadProperty(IPropertyInfo) performs an authorization check or not.
true means read is always allowed. false means an authorization check is always performed.
BusinessRules BusinessRules [get]
 Provides access to the broken rules functionality.
FieldDataManager FieldManager [get]
 Gets the PropertyManager object for this business object.
virtual bool IsBusy [get]
 Gets a value indicating whether this object or any of its child objects are running an async operation.
virtual bool IsSelfBusy [get]
 Gets a value indicating whether this object is running an async operation.

Additional Inherited Members

Static Protected Member Functions inherited from Csla.ReadOnlyBase< T >
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, PropertyInfo< P > info)
 Indicates that the specified property belongs to the type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > info)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, string? friendlyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, string? friendlyName, P? defaultValue)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName, P? defaultValue)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, string? friendlyName, P? defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName, P? defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static IMemberInfo RegisterMethod (Type objectType, IMemberInfo info)
 Indicates that the specified method belongs to the type.
static MethodInfo RegisterMethod (Type objectType, string methodName)
 Indicates that the specified method belongs to the type.
static MethodInfo RegisterMethod (string methodName)
 Registers a method for use in Authorization.
static MethodInfo RegisterMethod (Expression< Action< T > > methodLambdaExpression)
 Registers the method.
Events inherited from Csla.ReadOnlyBase< T >
BusyChangedEventHandlerBusyChanged [add, remove]
 Event raised when the IsBusy property value has changed.
EventHandler< Core.ErrorEventArgs >? UnhandledAsyncException [add, remove]
 Event raised when an exception occurs on a background thread during an asynchronous operation.
Events inherited from Csla.Core.BindableBase
PropertyChangedEventHandler? PropertyChanged [add, remove]
 Implements a serialization-safe PropertyChanged event.
PropertyChangingEventHandler? PropertyChanging [add, remove]
 Implements a serialization-safe PropertyChanging event.

Detailed Description

Criteria class for passing a username/password pair to a custom identity class.

Constructor & Destructor Documentation

◆ UsernameCriteria() [1/2]

Csla.Security.UsernameCriteria.UsernameCriteria ( string username,
string password )
inline

Creates a new instance of the object.

Parameters
usernameUsername value.
passwordPassword value.
Exceptions
ArgumentNullExceptionusername or password is null.

◆ UsernameCriteria() [2/2]

Csla.Security.UsernameCriteria.UsernameCriteria ( )
inlineprotected

Creates a new instance of the object.

Member Data Documentation

◆ PasswordProperty

readonly PropertyInfo<string> Csla.Security.UsernameCriteria.PasswordProperty = RegisterProperty<string>(c => c.Password)
static

Password property definition.

◆ UsernameProperty

readonly PropertyInfo<string> Csla.Security.UsernameCriteria.UsernameProperty = RegisterProperty<string>(c => c.Username)
static

Username property definition.

Property Documentation

◆ Password

string Csla.Security.UsernameCriteria.Password
get

Gets the password.

◆ Username

string Csla.Security.UsernameCriteria.Username
get

Username property definition.


The documentation for this class was generated from the following file: