C# Class EGSW.Data.Customers.CustomerExtensions

Show file Open project: careerengine/EGSW-Project

Public Methods

Method Description
IsAdmin ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether the customer is a built-in record for background tasks

Gets a value indicating whether customer is administrator

IsAgent ( this customer, bool onlyActiveCustomerRoles = true ) : bool
IsForumModerator ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is a forum moderator

IsGuest ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is guest

IsInCustomerRole ( this customer, string customerRoleSystemName, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is in a certain customer role

IsPasswordRecoveryTokenValid ( this customer, string token ) : bool
IsRegistered ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is registered

IsSearchEngineAccount ( this customer ) : bool

Gets a value indicating whether customer a search engine

RemoveAddress ( this customer, Address address ) : void

Method Details

IsAdmin() public static method

Gets a value indicating whether the customer is a built-in record for background tasks Gets a value indicating whether customer is administrator
public static IsAdmin ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsAgent() public static method

public static IsAgent ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this
onlyActiveCustomerRoles bool
return bool

IsForumModerator() public static method

Gets a value indicating whether customer is a forum moderator
public static IsForumModerator ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsGuest() public static method

Gets a value indicating whether customer is guest
public static IsGuest ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsInCustomerRole() public static method

Gets a value indicating whether customer is in a certain customer role
public static IsInCustomerRole ( this customer, string customerRoleSystemName, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
customerRoleSystemName string Customer role system name
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsPasswordRecoveryTokenValid() public static method

public static IsPasswordRecoveryTokenValid ( this customer, string token ) : bool
customer this
token string
return bool

IsRegistered() public static method

Gets a value indicating whether customer is registered
public static IsRegistered ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsSearchEngineAccount() public static method

Gets a value indicating whether customer a search engine
public static IsSearchEngineAccount ( this customer ) : bool
customer this Customer
return bool

RemoveAddress() public static method

public static RemoveAddress ( this customer, Address address ) : void
customer this
address Address
return void