Skip to content

Instantly share code, notes, and snippets.

@daniiiol daniiiol/agent.snippet
Last active Oct 21, 2016

Embed
What would you like to do?
Sitecore Visual Studio Snippets
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Agent</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_agent</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates an Agent Entry</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>method</ID>
<Tooltip>Set the Name of your execution method</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Run</Default>
</Literal>
<Literal>
<ID>interval</ID>
<Tooltip>Set the interval of your method execution</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->1:00:00</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[
<agent type="$assembly$.$type$, $assembly$" method="$method$" interval="$interval$" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Agents</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_agents</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates an Agent Node</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>method</ID>
<Tooltip>Set the Name of your execution method</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Run</Default>
</Literal>
<Literal>
<ID>interval</ID>
<Tooltip>Set the interval of your method execution</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->1:00:00</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<scheduling>
<agent type="$assembly$.$type$, $assembly$" method="$method$" interval="$interval$" />
</scheduling>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Base Sitecore Config File</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_config</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a base construction of a Sitecore *.config File</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
</sitecore>
</configuration>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Event</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_event</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates an Event Entry</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>method</ID>
<Tooltip>Set the Name of your execution method</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Run</Default>
</Literal>
<Literal>
<ID>eventName</ID>
<Tooltip>Set the name of your Event</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->item:saved</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[
<event name="$eventName$">
<handler type="$assembly$.$type$, $assembly$" method="$method$"/>
</event>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Events</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_events</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates an Event Node</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>method</ID>
<Tooltip>Set the Name of your execution method</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Run</Default>
</Literal>
<Literal>
<ID>eventName</ID>
<Tooltip>Set the name of your Event</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->item:saved</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<events>
<event name="$eventName$">
<handler type="$assembly$.$type$, $assembly$" method="$method$"/>
</event>
</events>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->LinkManager (new)</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_linkManager</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a new LinkManager configuration</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<Tooltip>Set the name of a new LinkManager</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->name</Default>
</Literal>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>addAspxExtension_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->false</Default>
</Literal>
<Literal>
<ID>alwaysIncludeServerUrl_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->false</Default>
</Literal>
<Literal>
<ID>encodeNames_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->true</Default>
</Literal>
<Literal>
<ID>languageEmbedding_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Always</Default>
</Literal>
<Literal>
<ID>languageLocation_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->filePath</Default>
</Literal>
<Literal>
<ID>shortenUrls_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->true</Default>
</Literal>
<Literal>
<ID>useDisplayName_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->true</Default>
</Literal>
<Literal>
<ID>lowercaseUrls_value</ID>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->true</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<linkManager>
<patch:attribute name="defaultProvider">$name$</patch:attribute>
<providers>
<add name="$name$" type="$assembly$.$type$, $assembly$"
addAspxExtension="$addAspxExtension_value$"
alwaysIncludeServerUrl="$alwaysIncludeServerUrl_value$"
encodeNames="$encodeNames_value$"
languageEmbedding="$languageEmbedding_value$"
languageLocation="$languageLocation_value$"
shortenUrls="$shortenUrls_value$"
useDisplayName="$useDisplayName_value$"
lowercaseUrls="$lowercaseUrls_value$" />
</providers>
</linkManager>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Patch Attribute</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_patch_attribute</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a simple Patch-Attribute</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>attribute</ID>
<Tooltip>Set the source attribute to patch</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->type</Default>
</Literal>
<Literal>
<ID>mode</ID>
<Tooltip>Select your mode. Valid types are: before, after, instead, delete, attribute</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->after</Default>
</Literal>
<Literal>
<ID>value</ID>
<Tooltip>Select which element (of the selected attribute) should be patched</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->value</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[patch:$mode$="*[@$attribute$='$value$']"]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Processor Element</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_processor</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a simple Pipeline Processor</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<processor type="$assembly$.$type$, $assembly$" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Processor Element with Mode and Method</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_processor_mode_method</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a simple Pipeline Processor Entry with Mode and Method Attributes</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Tooltip>Set the full namespace of your type</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->MyNamespace.MyClass</Default>
</Literal>
<Literal>
<ID>assembly</ID>
<Tooltip>Set the Name of your Assembly</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->MyAssembly</Default>
</Literal>
<Literal>
<ID>mode</ID>
<Tooltip>Set the mode (on or off)</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->on</Default>
</Literal>
<Literal>
<ID>method</ID>
<Tooltip>Set the Name of your execution method</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->Run</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<processor mode="$mode$" type="$assembly$.$type$, $assembly$" method="$method$" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a Sitecore Search Index</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>index_name</ID>
<Tooltip>Set the name of your index</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->custom_web_index</Default>
</Literal>
<Literal>
<ID>database</ID>
<Tooltip>Select the source database of your index</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->web</Default>
</Literal>
<Literal>
<ID>root</ID>
<Tooltip>Set the start point of your index</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->/sitecore</Default>
</Literal>
<Literal>
<ID>item_language_fallback</ID>
<Tooltip>Activate/Deactivate the Item Language Fallback behaviour of your search</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->false</Default>
</Literal>
<Literal>
<ID>field_language_fallback</ID>
<Tooltip>Activate/Deactivate the Field Language Fallback behaviour of your search</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->false</Default>
</Literal>
<Literal>
<ID>id</ID>
<Tooltip>Activate/Deactivate the Field Language Fallback behaviour of your search</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->$(id)</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[ <contentSearch>
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
<indexes hint="list:AddIndex">
<index id="$index_name$" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider">
<param desc="name">$id$</param>
<param desc="folder">$id$</param>
<!-- This initializes index property store. Id has to be set to the index id -->
<param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$id$" />
<configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration" />
<strategies hint="list:AddStrategy">
<!-- NOTE: order of these is controls the execution order -->
<!-- SEE: https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/search_and_indexing/indexing/index_update_strategies -->
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" />
</strategies>
<commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch">
<policies hint="list:AddCommitPolicy">
<policy type="Sitecore.ContentSearch.ModificationCountCommitPolicy, Sitecore.ContentSearch">
<Limit>300</Limit>
</policy>
</policies>
</commitPolicyExecutor>
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch">
<Database>$database$</Database>
<Root>$root$</Root>
</crawler>
</locations>
<enableItemLanguageFallback>$item_language_fallback$</enableItemLanguageFallback>
<enableFieldLanguageFallback>$field_language_fallback$</enableFieldLanguageFallback>
</index>
</indexes>
</configuration>
</contentSearch>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: IntervalAsynchronous</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_intervalasync</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the IntervalAsynchronous Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexUpdateStrategies/intervalAsync" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: Manual</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_manual</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the Manual Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexUpdateStrategies/manual" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: OnPublishEndAsync</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_onpublishendasync</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the OnPublishEndAsync Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: RebuildAfterFullPublish</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_rebuildafterfullpublish</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the RebuildAfterFullPublish Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexUpdateStrategies/rebuildAfterFullPublish" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: RemoteRebuild</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_remoterebuild</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the RemoteRebuild Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexUpdateStrategies/remoteRebuild" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: Synchronous</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_synchronous</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the Synchronous Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<strategy ref="contentSearch/indexUpdateStrategies/sync" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Search Index Strategy: TimedIndexRefreshStrategy</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_search_index_strategy_timedindexrefreshstrategy</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Add the TimedIndexRefreshStrategy Index Strategy</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="XML"><![CDATA[<timed type="Sitecore.ContentSearch.Analytics.TimedIndexRefreshStrategy, Sitecore.ContentSearch.Analytics">
<param desc="interval">00:01:00</param>
</timed>
<!--
Please add these lines to your Crawler-Definition:
(More infos, see: https://doc.sitecore.net/sitecore_experience_platform/setting_up__maintaining/search_and_indexing/indexing/index_update_strategies)
<locations hint="list:AddCrawler">
<crawler type="Sitecore.ContentSearch.Analytics.AnalyticsObserverCrawler, Sitecore.ContentSearch.Analytics">
<ObservableName>DefaultObservable</ObservableName>
<CrawlerName>Lucene Crawler</CrawlerName>
</crawler>
</locations>-->]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Setting</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_setting</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a simple Sitecore Setting Entry</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<Tooltip>Set an existence Setting-Name</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->name</Default>
</Literal>
<Literal>
<ID>value</ID>
<Tooltip>Your custom value</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->value</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<setting name="$name$" value ="$value$" />]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Setting (Patch)</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_setting_patch</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a Patch Sitecore Setting Entry</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<Tooltip>Set an existence Setting-Name</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->name</Default>
</Literal>
<Literal>
<ID>value</ID>
<Tooltip>Your custom value</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->value</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<setting name="$name$">
<patch:attribute name="value">$value$</patch:attribute>
</setting>]]>
</Code>
</Snippet>
</CodeSnippet>
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Settings Node</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_settings</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates a Sitecore Settings Node</Description>
<SnippetTypes>
<SnippetType>SurroundsWith</SnippetType>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>name</ID>
<Tooltip>Set an existence Setting-Name</Tooltip>
<Default><!-- _locID_text="snippettitle" _locComment="" -->name</Default>
</Literal>
<Literal>
<ID>value</ID>
<Tooltip>Your custom value</Tooltip>
<Default><!-- _locID_text="snippetauthor" _locComment="" -->value</Default>
</Literal>
</Declarations>
<Code Language="XML"><![CDATA[<settings><setting name="$name$" value ="$value$" /></settings>]]>
</Code>
</Snippet>
</CodeSnippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.