Content created on the site must implement this interface for the social services to support it.
ConversationMessage is defined in the Telligent.Evolution.Extensibility.Api.Entities.Version1 namespace.
Definition
class ConversationMessage : ApiEntity, IApiEntity, IContent { ConversationMessage(); ConversationMessage(Lazy<Conversation> conversationLoader); ConversationMessage(AdditionalInfo additionalInfo); ConversationMessage(Error error); ConversationMessage(Warning warning); ConversationMessage(IGroupService groupService, Lazy<Conversation> conversationLoader); ConversationMessage(IList<Warning> warnings, IList<Error> errors); ConversationMessage(ConversationMessage item, IDictionary options, IMapper<User,User> userMapper); IApplication Application { get; } User Author { get; } string AvatarUrl { get; } string Body { get; } Guid ContentId { get; } Guid ContentTypeId { get; } Conversation Conversation { get; } Guid? ConversationId { get; } int? CreatedByUserId { get; } DateTime? CreatedDate { get; } IList<Error> Errors { get; } Guid? Id { get; } bool IsEnabled { get; } string RenderedBody { get; } string Subject { get; } string Url { get; } IList<Warning> Warnings { get; } bool HasErrors(); bool HasWarnings(); bool HasWarningsOrErrors(); string HtmlDescription(string target); string HtmlName(string target); void ThrowErrors(); }
Constructors
ConversationMessage();
ConversationMessage(Lazy<Conversation> conversationLoader);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| conversationLoader | Lazy<Conversation> | Conversation Loader | Required |
ConversationMessage(AdditionalInfo additionalInfo);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| additionalInfo | AdditionalInfo | Additional Info | Required |
ConversationMessage(Error error);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| error | Error | Error | Required |
ConversationMessage(Warning warning);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| warning | Warning | Warning | Required |
ConversationMessage(IGroupService groupService, Lazy<Conversation> conversationLoader);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| groupService | IGroupService | Group Service | Required | ||
| conversationLoader | Lazy<Conversation> | Conversation Loader | Required |
ConversationMessage(IList<Warning> warnings, IList<Error> errors);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| warnings | IList<Warning> | Warnings | Required | ||
| errors | IList<Error> | Errors | Required |
ConversationMessage(ConversationMessage item, IDictionary options, IMapper<User,User> userMapper);
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| item | ConversationMessage | Item | Required | ||
| options | IDictionary | Options | Required | ||
| userMapper | IMapper<User,User> | User Mapper | Required |
Properties
| Name | Type | Description | Default | Options |
|---|---|---|---|---|
| Application | IApplication | The application in which the IContent is located. | ||
| Author | User | |||
| AvatarUrl | string | Url to an image particular to the content or content type. If none, return null. | ||
| Body | string | |||
| ContentId | Guid | A Guid uniquely identifying the content. | ||
| ContentTypeId | Guid | A Guid identifying the type of content. All content of the same type (i.e. wiki page) will have the same value here. | ||
| Conversation | Conversation | |||
| ConversationId | Guid? | |||
| CreatedByUserId | int? | The Id of the user who originated the content. | ||
| CreatedDate | DateTime? | |||
| Errors | IList<Error> | |||
| Id | Guid? | |||
| IsEnabled | bool | A flag representing whether the content is enabled. This can be a wrapper for approval states, etc. | ||
| RenderedBody | string | |||
| Subject Obsolete | string | Obsolete in 11 | ||
| Url | string | A Url to the content on the site. | ||
| Warnings | IList<Warning> |
Methods
bool HasErrors();
Return Type
bool HasWarnings();
Return Type
bool HasWarningsOrErrors();
Return Type
string HtmlDescription(string target);
Return the Html encoded description of the content (the body, for example). Possible values for “target” are “Web”, “Email”, “WebServices”, or “raw”. When “raw” is specified as the target, the description should not be encoded or have any special rendering done to it.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| target | string | Target | Required |
Return Type
string HtmlName(string target);
Return the Html encoded name of the content (the subject for example). Possible values for “target” are “Web”, “Email”, or “raw”. When “raw” is specified as the target, the name should not be encoded.
Parameters
| Name | Type | Description | Required | Default | Options |
|---|---|---|---|---|---|
| target | string | Target | Required |