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 PackageSinkManager : BaseSink<PackageEntry> | |
{ | |
public override void Put(PackageEntry entry) | |
{ | |
Console.WriteLine($"Key: {entry.Key}. Source: {PackageUtils.TryGetValue(entry.Properties, "source")}."); | |
} | |
} |
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 PackageSinkManager : BaseSink<PackageEntry> | |
{ | |
public override void Put(PackageEntry entry) | |
{ | |
// Implementation goes here | |
} | |
} |
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
// Omit above code for brevity | |
const handleSubmit = async (e) => { | |
e.preventDefault(); | |
setButtonLoading(true); | |
var dict = []; | |
dict.push({ |
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
[HttpPost] | |
public IHttpActionResult SendExternalFormEmail(EmailData data) | |
{ | |
IMessageBus<AutomatedMessagesBus> automatedMessageBus = ServiceLocator.ServiceProvider.GetService<IMessageBus<AutomatedMessagesBus>>(); | |
var contact = new ContactIdentifier(data.Source, data.ContactIdentifier, ContactIdentifierType.Known); | |
var dictionary = new Dictionary<string, object>(); | |
foreach (var formData in data.FormData) |
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
<sitecore role:require="Standalone or ContentManagement"> | |
<pipelines> | |
<DispatchNewsletter role:require="!DedicatedDispatch"> | |
<processor type="Sitecore.EmailCampaign.Cm.Pipelines.DispatchNewsletter.SendMessage, Sitecore.EmailCampaign.Cm" resolve="true"> | |
<patch:delete/> | |
</processor> | |
<!-- The WaitForDispatchToFinish pipeline processor should only be enabled if you have at least one dedicated dispatch server enabled. If you enable this processor you should disable the SendMessage processor. --> | |
<processor type="MyNamespace.WaitForDispatchToFinishExt, MyAssembly" resolve="true" patch:before="*[@type='Sitecore.EmailCampaign.Cm.Pipelines.DispatchNewsletter.MoveToSent, Sitecore.EmailCampaign.Cm']"> | |
<TimeToWaitBetweenChecks>1000</TimeToWaitBetweenChecks> |
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
protected override bool WaitForDedicatedServers(DispatchNewsletterArgs args) | |
{ | |
var flag1 = false; | |
var flag2 = true; | |
var retryCount = 3; | |
while (flag2) | |
{ | |
var num = this._dedicatedServersService.Status(args.Message, out var _); |
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
// Original Implementation | |
protected virtual bool WaitForDedicatedServers(DispatchNewsletterArgs args) | |
{ | |
bool flag = false; | |
bool flag2 = true; | |
while (flag2) | |
{ | |
int totalNumServers; | |
int num = _dedicatedServersService.Status(args.Message, out totalNumServers); | |
if (num > 0) |
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 StringExtension | |
{ | |
public static string ToReadableMessage(this string stringFromSql) | |
{ | |
var byteList = new List<byte>(); | |
string hexPart = stringFromSql.Substring(2); | |
for (int i = 0; i < hexPart.Length / 2; i++) | |
{ | |
string hexNumber = hexPart.Substring(i * 2, 2); |
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/"> | |
<sitecore> | |
<services> | |
<register patch:instead="register[@serviceType='Sitecore.XA.Feature.SiteMetadata.Sitemap.ISitemapGenerator, Sitecore.XA.Feature.SiteMetadata']" | |
serviceType="Sitecore.XA.Feature.SiteMetadata.Sitemap.ISitemapGenerator, Sitecore.XA.Feature.SiteMetadata" | |
implementationType="YourNamespaceWithClassName, YourAssemblyName" | |
lifetime="Transient" /> | |
</services> | |
</sitecore> | |
</configuration> |
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
/////// FROM /////// | |
protected static XNamespace Xhtml { get; } = (XNamespace) "http://www.w3.org/1999/XMLSchema-instance"; | |
protected virtual XElement BuildAlternateLinkElement(string href, string hreflang, string rel = "alternate") => new XElement(SitemapGenerator.Xhtml + "link", new object[3] | |
{ | |
(object) new XAttribute((XName) nameof (rel), (object) rel), | |
(object) new XAttribute((XName) nameof (hreflang), (object) hreflang), | |
(object) new XAttribute((XName) nameof (href), (object) href) | |
}); |