Class CommentAdapter
Inheritance
System.Object
CommentAdapter
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.Comments.Rest
Assembly: EPiServer.Social.Comments.Rest.dll
Version: 1.5.4Syntax
public class CommentAdapter
Constructors
CommentAdapter()
Declaration
public CommentAdapter()
Methods
Adapt(Comment)
Declaration
public AddRequest Adapt(Comment comment)
Parameters
| Type | Name | Description |
|---|---|---|
| Comment | comment |
Returns
| Type | Description |
|---|---|
| AddRequest |
Adapt(CommentResponse)
Declaration
public Comment Adapt(CommentResponse commentResponse)
Parameters
| Type | Name | Description |
|---|---|---|
| CommentResponse | commentResponse |
Returns
| Type | Description |
|---|---|
| Comment |
Adapt(PagedResponse<CommentResponse>, PageInfo)
Converts a commentResponse and pageinfo object to a corresponding resultpage instance.
Declaration
public ResultPage<Comment> Adapt(PagedResponse<CommentResponse> pageOfCommentResponses, PageInfo criteriaPageInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| PagedResponse<CommentResponse> | pageOfCommentResponses | Response to be adapted |
| PageInfo | criteriaPageInfo | pageinfo to be adapted |
Returns
| Type | Description |
|---|---|
| ResultPage<Comment> | A corresponding resultpage instance |
Adapt<TExtension>(PagedResponse<CommentResponse>, PageInfo)
Converts a commentResponse and PagInfo object to a corresponding Resultpage of Composites.
Declaration
public ResultPage<Composite<Comment, TExtension>> Adapt<TExtension>(PagedResponse<CommentResponse> pageOfCommentResponses, PageInfo criteriaPageInfo)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| PagedResponse<CommentResponse> | pageOfCommentResponses | response to be adapted |
| PageInfo | criteriaPageInfo | pageinfo to be adapted |
Returns
| Type | Description |
|---|---|
| ResultPage<Composite<Comment, TExtension>> | A corresponding ResultPage of Composites |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of extension data in the composite |
AdaptToComposite<TExtension>(CommentResponse)
Converts a commentResponse instance to a corresponding Composite instance.
Declaration
public Composite<Comment, TExtension> AdaptToComposite<TExtension>(CommentResponse response)
where TExtension : class
Parameters
| Type | Name | Description |
|---|---|---|
| CommentResponse | response | Response to be adapted |
Returns
| Type | Description |
|---|---|
| Composite<Comment, TExtension> | A corresponding Composite instance |
Type Parameters
| Name | Description |
|---|---|
| TExtension | Type of extension data in the composite |
AdaptToGetByIdRequest(CommentId)
Declaration
public GetByIdRequest AdaptToGetByIdRequest(CommentId id)
Parameters
| Type | Name | Description |
|---|---|---|
| CommentId | id |
Returns
| Type | Description |
|---|---|
| GetByIdRequest |
AdaptToGetByIdRequest<TExtension>(CommentId)
Declaration
public GetByIdRequest AdaptToGetByIdRequest<TExtension>(CommentId id)
Parameters
| Type | Name | Description |
|---|---|---|
| CommentId | id |
Returns
| Type | Description |
|---|---|
| GetByIdRequest |
Type Parameters
| Name | Description |
|---|---|
| TExtension |
AdaptToUpdateRequest(Comment)
Declaration
public UpdateRequest AdaptToUpdateRequest(Comment comment)
Parameters
| Type | Name | Description |
|---|---|---|
| Comment | comment |
Returns
| Type | Description |
|---|---|
| UpdateRequest |