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 pipelineItem = Factory.GetDatabase("master").GetItem("/sitecore/content/My Pipeline"); | |
var pipelineArgs = new PipelineArgs(); | |
Pipeline.Start(pipelineItem, pipelineArgs); | |
var customData = pipelineArgs.CustomData; |
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 Step1 | |
{ | |
public void Process(PipelineArgs args) | |
{ | |
var processorItem = args.ProcessorItem; | |
var customField = processorItem.InnerItem["Custom Referenced Item"]; | |
var referencedItem = processorItem.InnerItem.Database.GetItem(new ID(customField)); |
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 Processor Parse(ProcessorItem item) | |
{ | |
Sitecore.Diagnostics.Assert.ArgumentNotNull((object) item, nameof (item)); | |
if (item.Disabled || item.Type.Trim().Length == 0) | |
return (Processor) null; | |
return new Processor(item); | |
} |
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
WorkflowPipelineArgs workflowPipelineArgs = new WorkflowPipelineArgs(item, null, null); | |
Pipeline pipeline = Pipeline.Start(stateItem, workflowPipelineArgs); | |
if (pipeline != null) | |
{ | |
WorkflowCounters.ActionsExecuted.IncrementBy(pipeline.Processors.Count); | |
} |
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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Xml.Linq; | |
using HedgehogDevelopment.SitecoreProject.Tasks; | |
using HedgehogDevelopment.SitecoreProject.Tasks.ProjectAnalysis; | |
namespace TDS.Validators |
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
[Validator("Language Fallback Invalid", Status.Error, Description = "Validates all fields support language fallback. Add new properties to ignore templates that start with a particular path.")] | |
public class LanguageFallbackValidator : UserConfigurableValidator | |
{ | |
private static readonly Guid Template = new Guid("{AB86861A-6030-46C5-B394-E8F99E8B87DB}"); | |
public override IEnumerable<Problem> Validate(Dictionary<Guid, SitecoreDeployInfo> projectItems, XDocument scprojDocument) | |
{ | |
var list = new List<Problem>(); | |
foreach (var projectItem in projectItems) | |
{ |
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
<indexableRenderings> | |
<rendering name="RichText" id="{4F8942FF-C4E4-408A-B3D5-4657EE5050CA}" /> | |
</indexableRenderings> |
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 System.Linq; | |
using Sitecore; | |
using Sitecore.ContentSearch; | |
using Sitecore.ContentSearch.Pipelines.GetDependencies; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
namespace Common.Sitecore.Search.GetDependencies | |
{ |
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 remoteEvent = new LogMessageRemoteEvent(Sitecore.Configuration.Settings.InstanceName, "logMessage:remote"); | |
Sitecore.Eventing.EventManager.QueueEvent<LogMessageRemoteEvent>(remoteEvent); |
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> | |
<events> | |
<event name="logMessage:remote"> | |
<handler type="MyNamespace.LogMessageRemote, MyDll" method="LogInstanceName" /> | |
</event> | |
</events> | |
</sitecore> | |
</configuration> |