本文整理汇总了C#中Kooboo.CMS.Content.Models.TextContent.GetSummary方法的典型用法代码示例。如果您正苦于以下问题:C# TextContent.GetSummary方法的具体用法?C# TextContent.GetSummary怎么用?C# TextContent.GetSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kooboo.CMS.Content.Models.TextContent
的用法示例。
在下文中一共展示了TextContent.GetSummary方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTextContent
public string AddTextContent(Site site, TextFolder textFolder, System.Collections.Specialized.NameValueCollection values, [System.Runtime.InteropServices.OptionalAttribute][System.Runtime.InteropServices.DefaultParameterValueAttribute("")]string userid, string vendor)
{
var schema = textFolder.GetSchema();
var textContent = new TextContent();
foreach (string key in values)
{
textContent[key] = values[key];
}
textContent.Repository = textFolder.Repository.Name;
textContent.SchemaName = textFolder.SchemaName;
textContent.FolderName = textFolder.FullName;
if (!string.IsNullOrEmpty(values["UUID"]))
{
textContent.UUID = values["UUID"];
}
textContent = _textContentBinder.Bind(schema, textContent, values, true, false);
IncomingQueue incomeQueue = new IncomingQueue()
{
Message = null,
Object = new Dictionary<string, object>(textContent),
ObjectUUID = textContent.IntegrateId,
ObjectTitle = textContent.GetSummary(),
Vendor = vendor,
PublishingObject = PublishingObject.TextContent,
Action = PublishingAction.Publish,
SiteName = site.FullName,
Status = QueueStatus.Pending,
UtcCreationDate = DateTime.UtcNow,
UtcProcessedTime = null,
UUID = Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10)
};
_incomeQueueProvider.Add(incomeQueue);
return textContent.IntegrateId;
}
示例2: EditItemAttributes
public static IHtmlString EditItemAttributes(TextContent data)
{
var userName = Page_Context.Current.ControllerContext.HttpContext.User.Identity.Name;
if (data == null || !Page_Context.Current.EnabledInlineEditing(EditingType.Content)
|| !Kooboo.CMS.Content.Services.ServiceFactory.WorkflowManager.AvailableToEditContent(data, userName))
{
return new HtmlString("");
}
var availableToPublish = Kooboo.CMS.Content.Services.ServiceFactory.WorkflowManager.AvailableToPublish(data.GetFolder(), userName);
return new HtmlString(string.Format("editType=\"list\" schema=\"{0}\" folder=\"{1}\" title=\"{2}\" uuid=\"{3}\" published=\"{4}\" editUrl=\"{5}\" summary=\"{6}\" publishAvailable=\"{7}\"",
data.SchemaName, data.FolderName, data.GetFolder().AsActual().FriendlyText, data.UUID, data.Published
, Page_Context.Current.Url.Action("InlineEdit", new
{
controller = "TextContent",
Area = "Contents",
RepositoryName = data.Repository,
SiteName = Page_Context.Current.PageRequestContext.Site.FullName,
FolderName = data.FolderName,
UUID = data.UUID,
Return = Page_Context.Current.ControllerContext.HttpContext.Request.RawUrl
}), HttpUtility.HtmlAttributeEncode(data.GetSummary())
, availableToPublish));
}
示例3: UpdateTextContent
public string UpdateTextContent(Site site, TextFolder textFolder, string uuid, System.Collections.Specialized.NameValueCollection values, [System.Runtime.InteropServices.OptionalAttribute][System.Runtime.InteropServices.DefaultParameterValueAttribute("")]string userid, string vendor)
{
var schema = textFolder.GetSchema();
var textContent = new TextContent(textFolder.Repository.Name, textFolder.SchemaName, textFolder.FullName);
textContent = _textContentBinder.Bind(schema, textContent, values);
IncomingQueue incomeQueue = new IncomingQueue(site, Kooboo.UniqueIdGenerator.GetInstance().GetBase32UniqueId(10))
{
Message = null,
Object = new Dictionary<string, object>(textContent),
ObjectUUID = textContent.IntegrateId,
ObjectTitle = textContent.GetSummary(),
Vendor = vendor,
PublishingObject = PublishingObject.TextContent,
Action = PublishingAction.Publish,
Status = QueueStatus.Pending,
UtcCreationDate = DateTime.UtcNow,
UtcProcessedTime = null
};
_incomeQueueProvider.Add(incomeQueue);
return textContent.IntegrateId;
}