Indy 9
|
TIdUserAccounts = class(TOwnedCollection)
TIdUserAccounts extends the ancestor to provide indexed access to object instances in Items using the Username for the account, and reintroduces the Add method for creating new TIdUserAccount instances to be stored in Items.
TIdUserAccounts also includes properties that indicate if case sensitivity is required when accessing Username or Password properties in the TIdUserAccount instances in Items or UserNames.
TIdUserAccounts is the type used to represent the TIdUserManager.Accounts property.
property CaseSensitivePasswords: Boolean;
Use CaseSensitiveUsernames to indicate if case is significant when accessing user accounts by the identity for the user account.
property CaseSensitiveUsernames: Boolean;
When CaseSensitiveUsernames is True, the read access specifier for the UserNames property will consider case to be significant in comparing the user name values. When CaseSensitiveUsernames is False, AnsiSameText is used to perform the name comparison.
Use CaseSensitivePasswords to indicate if caser is significant when verifying user account credentials in the collection.
property Items [const AIndex: Integer]: TIdUserAccount;
Items provides a read access specifier to insure that the collection item is a TIdUserAccount object instance. Items provides a write access specifier to store a user account at the specified integer position in the collection.
Use UserNames to access user accounts in the collection using the value for the UserName property.
property UserNames [const AUserName: String]: TIdUserAccount;
When CaseSensitiveUsernames is True, the read access specifier for the property will consider case to be significant in comparing the user name values. When CaseSensitiveUsernames is False, AnsiSameText is used to perform the name comparison.
The return value for the property will be Nil when a user account cannot be located having the specified index value.
Use Items to access user accounts by their integer position in the collection.
Use Add to create a new user account in the collection.
function Add: TIdUserAccount; reintroduce;
constructor Create(AOwner: TIdUserManager);