Content created on the site must implement this interface for the social services to support it.

IContent is defined in the Telligent.Evolution.Extensibility.Content.Version1 namespace of Telligent.Evolution.Core.dll

Definition

interface IContent
{
	IApplication Application { get;  }
	string AvatarUrl { get;  }
	Guid ContentId { get;  }
	Guid ContentTypeId { get;  }
	int? CreatedByUserId { get;  }
	DateTime CreatedDate { get;  }
	bool IsEnabled { get;  }
	string Url { get;  }
	string HtmlDescription(string target);
	string HtmlName(string target);
}

Properties

NameTypeDescriptionDefaultOptions
ApplicationIApplicationThe application in which the IContent is located.
AvatarUrlstringUrl to an image particular to the content or content type. If none, return null.
ContentIdGuidA Guid uniquely identifying the content.
ContentTypeIdGuidA Guid identifying the type of content. All content of the same type (i.e. wiki page) will have the same value here.
CreatedByUserIdint?The Id of the user who originated the content.
CreatedDateDateTimeThe date the content was created.
IsEnabledboolA flag representing whether the content is enabled. This can be a wrapper for approval states, etc.
UrlstringA Url to the content on the site.

Methods

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

NameTypeDescriptionRequiredDefaultOptions
targetstringTargetRequired

Return Type

string

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

NameTypeDescriptionRequiredDefaultOptions
targetstringTargetRequired

Return Type

string