Interface IMemberService
The IMemberService interface describes a component supporting the management of membership within groups.
Namespace: EPiServer.Social.Groups.Core
Assembly: EPiServer.Social.Groups.Core.dll
Version: 1.5.4Syntax
public interface IMemberService
Methods
Add(Member)
Adds a user as a member to the repository.
Declaration
Member Add(Member member)
Parameters
| Type | Name | Description |
|---|---|---|
| Member | member | Member to be added |
Returns
| Type | Description |
|---|---|
| Member | Member of the group |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the group specified for association being added does not exist. |
| DuplicateMemberException | Thrown when the user is already a member of the group. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Add<TExtension>(Member, TExtension)
Adds a user as a member and its corresponding extension data to the repository.
Declaration
Composite<Member, TExtension> Add<TExtension>(Member member, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Member | member | Member to be added |
| TExtension | extension | extension data to be added |
Returns
| Type | Description |
|---|---|
| Composite<Member, TExtension> | Composite of Member of the group and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the group specified for association being added does not exist. |
| DuplicateMemberException | Thrown when the user is already a member of the group. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync(Member)
Adds a user as a member to the repository.
Declaration
Task<Member> AddAsync(Member member)
Parameters
| Type | Name | Description |
|---|---|---|
| Member | member | Member to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Member> | Member of the group |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the group specified for association being added does not exist. |
| DuplicateMemberException | Thrown when the user is already a member of the group. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync<TExtension>(Member, TExtension)
Adds a user as a member and its corresponding extension data to the repository.
Declaration
Task<Composite<Member, TExtension>> AddAsync<TExtension>(Member member, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| Member | member | Member to be added |
| TExtension | extension | extension data to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Member, TExtension>> | Composite of Member of the group and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| GroupDoesNotExistException | Thrown when the group specified for association being added does not exist. |
| DuplicateMemberException | Thrown when the user is already a member of the group. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get(Criteria<MemberFilter>)
Retrieves a result page of members assigned to the specified group.
Declaration
ResultPage<Member> Get(Criteria<MemberFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<MemberFilter> | criteria | Filters the result set of members |
Returns
| Type | Description |
|---|---|
| ResultPage<Member> | Page of members of the specified group |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get(MemberId)
Gets a member of an existing group.
Declaration
Member Get(MemberId memberId)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be retrieved |
Returns
| Type | Description |
|---|---|
| Member | Member with the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get<TExtension>(CompositeCriteria<MemberFilter, TExtension>)
Retrieves a result page of members assigned to the specified group and their extension data.
Declaration
ResultPage<Composite<Member, TExtension>> Get<TExtension>(CompositeCriteria<MemberFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<MemberFilter, TExtension> | criteria | Composite Criteria that contains Filters for the result set of members and extension |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<Member, TExtension>> | Page of members of the specified group and their corresponding extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get<TExtension>(MemberId)
Gets a member of an existing group and its corresponding extension data.
Declaration
Composite<Member, TExtension> Get<TExtension>(MemberId memberId)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be retrieved |
Returns
| Type | Description |
|---|---|
| Composite<Member, TExtension> | Composite of member and extension data for the specified ID |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| MemberDoesNotExistException | Thrown when the identified member does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(Criteria<MemberFilter>)
Retrieves a result page of members assigned to the specified group.
Declaration
Task<ResultPage<Member>> GetAsync(Criteria<MemberFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<MemberFilter> | criteria | Filters the result set of members |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Member>> | Page of members of the specified group |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(MemberId)
Gets a member of an existing group.
Declaration
Task<Member> GetAsync(MemberId memberId)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Member> | Member with the specified ID |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| MemberDoesNotExistException | Thrown when the identified member does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync<TExtension>(CompositeCriteria<MemberFilter, TExtension>)
Retrieves a result page of members assigned to the specified group and their extension data.
Declaration
Task<ResultPage<Composite<Member, TExtension>>> GetAsync<TExtension>(CompositeCriteria<MemberFilter, TExtension> criteria)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CompositeCriteria<MemberFilter, TExtension> | criteria | Composite Criteria that contains Filters for the result set of members and extension |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Composite<Member, TExtension>>> | Page of members of the specified group and their corresponding extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync<TExtension>(MemberId)
Gets a member of an existing group and its corresponding extension data.
Declaration
Task<Composite<Member, TExtension>> GetAsync<TExtension>(MemberId memberId)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be retrieved |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Member, TExtension>> | Composite of member and extension data for the specified ID |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| MemberDoesNotExistException | Thrown when the identified member does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
IsMember(GroupId, Reference)
Returns true if the specified user is a member of the specified group, false otherwise.
Declaration
bool IsMember(GroupId group, Reference user)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | group | Group in which the specified user may be a member |
| Reference | user | Identifies the user for whom membership should be verified |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the specified user is a member of the specified group, false otherwise. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
IsMemberAsync(GroupId, Reference)
Returns true if the specified user is a member of the specified group, false otherwise.
Declaration
Task<bool> IsMemberAsync(GroupId group, Reference user)
Parameters
| Type | Name | Description |
|---|---|---|
| GroupId | group | Group in which the specified user may be a member |
| Reference | user | Identifies the user for whom membership should be verified |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | True if the specified user is a member of the specified group, false otherwise. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(MemberId)
Removes a member from an existing group.
Declaration
void Remove(MemberId memberId)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be removed |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(MemberId)
Removes a member from an existing group.
Declaration
Task RemoveAsync(MemberId memberId)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | ID of the member to be removed |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when any of the parameters passed in are null or invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Update<TExtension>(MemberId, TExtension)
Update a member in the repository with new extension data
Declaration
Composite<Member, TExtension> Update<TExtension>(MemberId memberId, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | MemberId used to filter collection with |
| TExtension | extension | Extension data to be added |
Returns
| Type | Description |
|---|---|
| Composite<Member, TExtension> | Composite of Member of the group and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| MemberDoesNotExistException | Thrown when the identified member does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
UpdateAsync<TExtension>(MemberId, TExtension)
Update a member in the repository with new extension data
Declaration
Task<Composite<Member, TExtension>> UpdateAsync<TExtension>(MemberId memberId, TExtension extension)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| MemberId | memberId | MemberId used to filter collection with |
| TExtension | extension | Extension data to be added |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Composite<Member, TExtension>> | Composite of Member of the group and extension data |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| MemberDoesNotExistException | Thrown when the identified member does not exist. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |