本文整理汇总了C#中QueueManager.Put方法的典型用法代码示例。如果您正苦于以下问题:C# QueueManager.Put方法的具体用法?C# QueueManager.Put怎么用?C# QueueManager.Put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueueManager
的用法示例。
在下文中一共展示了QueueManager.Put方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Save
public string Save()
{
if (Request.QueryString["a"] != null)
{
PreviewDto dto = new PreviewDto();
dto.Content = PageMarkupText.Text;
dto.Title = this.PageTitle.Text;
dto.TemplateName = this.PageTemplate.SelectedValue;
QueueManager manager = new QueueManager(QueueManager.GetPreviewQueueName(CurrentSite.Guid));
manager.ClearQueue();
manager.Put<PreviewDto>(dto);
String cacheKey = TextHash.MD5(Request.QueryString["pid"]).Value;
String url = this.ParentDirectories.SelectedItem.Text + this.PageName.Text;
String token = Server.UrlEncode(TokenManager.Issue(cacheKey, TimeSpan.FromMinutes(5)));
return Page.ResolveUrl(CurrentSite.Protocol + CurrentSite.StagingDomain + url + "?pvw=preview&pvw_id=" + cacheKey + "&token=" + token);
}
else
return "::ALERT::You must save the page once before using the preview capability.";
}
示例2: AddToImportQueue
public void AddToImportQueue(Data.Hash importHash, Data.Guid subscriptionId, String emailTo, Boolean replacePhoneNumber, IList<Data.Guid> removed, Boolean deleteExisting)
{
//First thing is to remove any pages which aren't being imported
ImportedItemDao dao = new ImportedItemDao();
dao.RemoveImportedItems(removed);
//Add the import hash to the queue for processing later
ImportSiteMessage message = new ImportSiteMessage();
message.ImportHash = importHash.Value;
message.SubscriptionId = subscriptionId.Value;
message.DeleteExisting = deleteExisting;
message.ReplacePhoneNumbers = replacePhoneNumber;
message.CompletionEmail = emailTo;
QueueManager queue = new QueueManager(QueueNames.ImportSiteQueue);
queue.Put<ImportSiteMessage>(message);
}
示例3: PublishToWorker
public static void PublishToWorker(CmsPage page,Gooeycms.Business.Pages.PageTaskMessage.Actions action)
{
PageTaskMessage message = new PageTaskMessage();
message.Action = action;
message.Page = page;
QueueManager queue = new QueueManager(QueueNames.PageActionQueue);
queue.Put<PageTaskMessage>(message, TimeSpan.FromMinutes(60));
}