View PublishUtils.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class PublishUtils | |
{ | |
public static void CreateAndPublishQueue(Database sourceDatabase, Database[] targetDatabases, Language[] targetLanguages, IEnumerable<ID> itemIds, bool skipEvents = false, bool useSecurityDisabler = true) | |
{ | |
Assert.IsNotNull(sourceDatabase, "sourceDatabase"); | |
Assert.IsNotNull(targetDatabases, "targetDatabases"); | |
Assert.IsNotNull(targetLanguages, "targetLanguages"); | |
var publishingCandidates = SetPublishingCandidates(sourceDatabase, targetDatabases, targetLanguages, itemIds); |
View RemoveBinFilesFromUpdatePackage.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[string]$pathToPackages | |
) | |
Add-Type -AssemblyName System.IO.Compression.FileSystem | |
function Unzip | |
{ | |
param([string]$zipfile, [string]$outpath) | |
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) |
View PublishDeployedItemsWithPublishingQueue.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Description("Publishes deployed items after deployment using publishing queue.\nPublishing targets are specified in the Parameter as a comma separated list.")] | |
public class PublishDeployedItemsWithPublishingQueue : IPostDeployAction | |
{ | |
/// <summary> | |
/// Borrowed directly from HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.BuiltIn.PublishDeployedItems, HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor | |
/// </summary> | |
private static Database[] GetPublishingTargetDatabases(string parameters) | |
{ | |
if (string.IsNullOrEmpty(parameters)) | |
{ |
View SitecorePdf.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<getScreenShotForURL> | |
<!-- Disable security check --> | |
<processor type="Sitecore.ContentTesting.Pipelines.GetScreenShotForURL.CheckDisabler, Sitecore.ContentTesting"> | |
<patch:delete /> | |
</processor> |
View AddTimeoutToScript.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.ContentTesting.Pipelines.GetScreenShotForURL; | |
namespace MyLibrary.GetScreenShotForURL | |
{ | |
public class AddTimeoutToScript : GenerateScreenShotProcessor | |
{ | |
public string Timeout { get; set; } | |
private const string StandardExit = "phantom.exit();\r\n});"; | |
View GeneratePdf.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using PdfSharp.Drawing; | |
using PdfSharp.Pdf; | |
using Sitecore.ContentTesting.Pipelines.GetScreenShotForURL; | |
namespace MyLibrary.GetScreenShotForURL | |
{ | |
public class GeneratePdf : GenerateScreenShotProcessor | |
{ | |
public override void Process(GetScreenShotForURLArgs args) | |
{ |
View SimpleSitecorePdf.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var args = new GetScreenShotForURLArgs(item.ID); | |
CorePipeline.Run("getScreenShotForURL", args); |
View LogMessageRemoteEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DataContract] | |
public class LogMessageRemoteEvent : IHasEventName | |
{ | |
public LogMessageRemoteEvent(string instanceName, string eventName) | |
{ | |
InstanceName = instanceName; | |
EventName = eventName; | |
} | |
// This is the custom data you will be passing between servers |
View LogMessageRemoteMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LogMessageRemoteMap | |
{ | |
public void Initialize(PipelineArgs args) | |
{ | |
EventManager.Subscribe<LogMessageRemoteEvent>(new Action<LogMessageRemoteEvent>(OnGenericRemoteEvent<LogMessageRemoteEvent>)); | |
} | |
private static void OnGenericRemoteEvent<TEvent>(TEvent @event) where TEvent : IHasEventName | |
{ | |
RemoteEventArgs<TEvent> remoteEventArgs = new RemoteEventArgs<TEvent>(@event); |
View LogMessageRemote.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<initialize> | |
<processor type="MyNamespace.LogMessageRemoteMap, MyDll" method="Initialize" /> | |
</initialize> | |
</pipelines> | |
</sitecore> | |
</configuration> |
OlderNewer