Class HttpMemberRepository

Inheritance
System.Object
HttpMemberRepository
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.Groups.Rest
Assembly: EPiServer.Social.Groups.Rest.dll
Version: 1.5.4
Syntax
public class HttpMemberRepository : IMemberRepository

Constructors

HttpMemberRepository(IHttpClientFactory, IMemberRequestFactory)

Declaration
public HttpMemberRepository(IHttpClientFactory httpClientFactory, IMemberRequestFactory requestFactory)
Parameters
Type Name Description
IHttpClientFactory httpClientFactory
IMemberRequestFactory requestFactory

Methods

Add(Member)

Adds a new member to the underlying data store.

Declaration
public Member Add(Member member)
Parameters
Type Name Description
Member member

The partially populated member to be added

Returns
Type Description
Member

The fully populated member that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Add<TExtension>(Member, TExtension)

Adds a new composite member to the underlying data store.

Declaration
public Composite<Member, TExtension> Add<TExtension>(Member member, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Member member

The partially populated member to be added

TExtension extension
Returns
Type Description
Composite<Member, TExtension>

The fully populated member that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the member being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync(Member)

Asynchronously adds a new member to the underlying data store.

Declaration
public Task<Member> AddAsync(Member member)
Parameters
Type Name Description
Member member

The partially populated member to be added

Returns
Type Description
System.Threading.Tasks.Task<Member>

The fully populated member that was added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

AddAsync<TExtension>(Member, TExtension)

Asynchronously adds a new composite member to the underlying data store.

Declaration
public Task<Composite<Member, TExtension>> AddAsync<TExtension>(Member member, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
Member member

The partially populated member to be added

TExtension extension
Returns
Type Description
System.Threading.Tasks.Task<Composite<Member, TExtension>>

The fully populated member that was added.

Type Parameters
Name Description
TExtension

Type of extension data for the member being added.

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(Criteria<MemberFilter>)

Retrieves a page of member items composed without their extension data from the database, as described by the specified criteria.

Declaration
public ResultPage<Member> Get(Criteria<MemberFilter> criteria)
Parameters
Type Name Description
Criteria<MemberFilter> criteria

Criteria by which to filter member items

Returns
Type Description
ResultPage<Member>

Page of member items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get(MemberId)

Finds a member by its identifier.

Declaration
public Member Get(MemberId memberId)
Parameters
Type Name Description
MemberId memberId

Id of member to retrieve.

Returns
Type Description
Member

The identified member

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get<TExtension>(CompositeCriteria<MemberFilter, TExtension>)

Retrieves a page of member items composed with their extension data from the database, as described by the specified criteria. The result set will be filtered to items of the type supplied as a type param.

Declaration
public ResultPage<Composite<Member, TExtension>> Get<TExtension>(CompositeCriteria<MemberFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<MemberFilter, TExtension> criteria

Criteria by which to filter member items

Returns
Type Description
ResultPage<Composite<Member, TExtension>>

Page of member items composed with their extension data

Type Parameters
Name Description
TExtension

Type of extension data associated with the items to be retrieved

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Get<TExtension>(MemberId)

Finds a member by its identifier.

Declaration
public Composite<Member, TExtension> Get<TExtension>(MemberId id)
    where TExtension : class
Parameters
Type Name Description
MemberId id

Id of member to retrieve.

Returns
Type Description
Composite<Member, TExtension>

The identified member

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(Criteria<MemberFilter>)

Asynchronously retrieves a page of member items composed without their extension data from the database, as described by the specified criteria.

Declaration
public Task<ResultPage<Member>> GetAsync(Criteria<MemberFilter> criteria)
Parameters
Type Name Description
Criteria<MemberFilter> criteria

Criteria by which to filter member items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Member>>

Page of member items

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync(MemberId)

Asynchronously finds a member by its identifier.

Declaration
public Task<Member> GetAsync(MemberId memberId)
Parameters
Type Name Description
MemberId memberId

Id of member to retrieve.

Returns
Type Description
System.Threading.Tasks.Task<Member>

The identified member

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync<TExtension>(CompositeCriteria<MemberFilter, TExtension>)

Asynchronously retrieves a page of member items composed with their extension data from the database, as described by the specified criteria. The result set will be filtered to items of the type supplied as a type param.

Declaration
public Task<ResultPage<Composite<Member, TExtension>>> GetAsync<TExtension>(CompositeCriteria<MemberFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<MemberFilter, TExtension> criteria

Criteria by which to filter member items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Composite<Member, TExtension>>>

Page of member items composed with their extension data

Type Parameters
Name Description
TExtension

Type of extension data associated with the items to be retrieved

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

GetAsync<TExtension>(MemberId)

Asynchronously finds a member by its identifier.

Declaration
public Task<Composite<Member, TExtension>> GetAsync<TExtension>(MemberId id)
    where TExtension : class
Parameters
Type Name Description
MemberId id

Id of member to retrieve.

Returns
Type Description
System.Threading.Tasks.Task<Composite<Member, TExtension>>

The identified member

Type Parameters
Name Description
TExtension

Type of extension data to retrieve.

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

IsMember(GroupId, Reference)

Returns true if the specified resource is an member of the specified group, false otherwise.

Declaration
public bool IsMember(GroupId group, Reference user)
Parameters
Type Name Description
GroupId group

ID of the group

Reference user

Reference representing the user whose membership should be verfied

Returns
Type Description
System.Boolean

True if the specified resource is an member of the specified group, false otherwise

Exceptions
Type Condition
SocialCommunicationException

Thrown when the cloud service cannot be reached.

Remove(MemberId)

Declaration
public void Remove(MemberId member)
Parameters
Type Name Description
MemberId member

RemoveAsync(MemberId)

Declaration
public Task RemoveAsync(MemberId memberId)
Parameters
Type Name Description
MemberId memberId
Returns
Type Description
System.Threading.Tasks.Task

Update<TExtension>(MemberId, TExtension)

Updates a member by its identifier.

Declaration
public Composite<Member, TExtension> Update<TExtension>(MemberId memberId, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
MemberId memberId

id of the member to be updated.

TExtension extension

updated version of the extension data.

Returns
Type Description
Composite<Member, TExtension>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the member being updated.

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

UpdateAsync<TExtension>(MemberId, TExtension)

Asynchronously updates a member by its identifier.

Declaration
public Task<Composite<Member, TExtension>> UpdateAsync<TExtension>(MemberId memberId, TExtension extension)
    where TExtension : class
Parameters
Type Name Description
MemberId memberId

id of the member to be updated.

TExtension extension

updated version of the extension data.

Returns
Type Description
System.Threading.Tasks.Task<Composite<Member, TExtension>>

The identified group

Type Parameters
Name Description
TExtension

Type of extension data for the member being updated.

Exceptions
Type Condition
MemberDoesNotExistException

Thrown when the identified member does not exist.

SocialCommunicationException

Thrown when the cloud service cannot be reached.

Implements

arrow_upward