IProfileService Interface
Namespace: PTS.Modules.Profiles.Domain
Assembly: PTS.Modules.Profiles.dll
Syntax
public interface IProfileService
Methods
GetContact(Profile, ContactType, Boolean)
Declaration
Contact GetContact(Profile profile, ContactType type, bool primary = false)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
ContactType | type | The type. |
System.Boolean | primary | if set to |
Returns
Type | Description |
---|---|
Contact | The Contact entity. |
GetContactAsync(Profile, ContactType, Boolean)
Declaration
Task<Contact> GetContactAsync(Profile profile, ContactType type, bool primary = false)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
ContactType | type | The type. |
System.Boolean | primary | if set to |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Contact> | A System.Threading.Tasks.Task with result of Contact entity. |
GetContacts(Profile)
Gets the System.Collections.Generic.List<T> for Profile.
Declaration
List<Contact> GetContacts(Profile profile)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Contact> | A System.Collections.Generic.List<T> which belongs to the Profile. |
GetContactsAsync(Profile)
Gets the System.Collections.Generic.List<T> for Profile.
Declaration
Task<List<Contact>> GetContactsAsync(Profile profile)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<Contact>> | A System.Threading.Tasks.Task with result of System.Collections.Generic.List<T> which belongs to the Profile. |
GetProfileTypes(Profile)
Gets the collection of ProfileTypeLink for profile
.
Declaration
List<ProfileTypeLink> GetProfileTypes(Profile profile)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ProfileTypeLink> |
GetProfileTypesAsync(Profile)
Gets the collection of ProfileTypeLink for profile
.
Declaration
Task<List<ProfileTypeLink>> GetProfileTypesAsync(Profile profile)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.List<ProfileTypeLink>> |
HasProfileType(Profile, Int32[])
Determines whether Profile has assigned any of the profileTypes
.
Declaration
bool HasProfileType(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
Returns
Type | Description |
---|---|
System.Boolean |
HasProfileTypeAsync(Profile, Int32[])
Determines whether Profile has assigned any of the profileTypes
.
Declaration
Task<bool> HasProfileTypeAsync(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
ReplaceProfileType(Profile, Int32[])
Replaces the assigned
Declaration
void ReplaceProfileType(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
ReplaceProfileTypeAsync(Profile, Int32[])
Replaces the assigned
Declaration
Task ReplaceProfileTypeAsync(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetContact(Profile, ContactType, String, Boolean)
Declaration
Contact SetContact(Profile profile, ContactType type, string value, bool removeIfEmpty = true)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
ContactType | type | The type. |
System.String | value | The value. |
System.Boolean | removeIfEmpty | Whether to remove contact entity if provided value was empty. |
Returns
Type | Description |
---|---|
Contact | The Contact entity. |
SetContactAsync(Profile, ContactType, String, Boolean)
Declaration
Task<Contact> SetContactAsync(Profile profile, ContactType type, string value, bool removeIfEmpty = true)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
ContactType | type | The type. |
System.String | value | The value. |
System.Boolean | removeIfEmpty | Whether to remove contact entity if provided value was empty. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Contact> | A System.Threading.Tasks.Task with result of Contact entity. |
SetProfileType(Profile, Int32[])
Sets the assigned
Declaration
void SetProfileType(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
SetProfileTypeAsync(Profile, Int32[])
Sets the assigned
Declaration
Task SetProfileTypeAsync(Profile profile, params int[] profileTypes)
Parameters
Type | Name | Description |
---|---|---|
Profile | profile | The profile. |
System.Int32[] | profileTypes | The profile types. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
VerifyContact(Contact, String, StringComparison)
Verifies the Contact.
Declaration
bool VerifyContact(Contact contact, string code, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
Parameters
Type | Name | Description |
---|---|---|
Contact | contact | The contact. |
System.String | code | The verification code. |
System.StringComparison | comparison | The verification string comparison settings. |
Returns
Type | Description |
---|---|
System.Boolean |
|
VerifyContactAsync(Contact, String, StringComparison)
Verifies the Contact.
Declaration
Task<bool> VerifyContactAsync(Contact contact, string code, StringComparison comparison = StringComparison.InvariantCultureIgnoreCase)
Parameters
Type | Name | Description |
---|---|---|
Contact | contact | The contact. |
System.String | code | The verification code. |
System.StringComparison | comparison | The verification string comparison settings. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | A System.Threading.Tasks.Task with result |