Example #1
0
 /// <summary>
 /// In this mode, a host id will be generated from <paramref name="instanceName"/> and <paramref name="hostName"/>.
 /// </summary>
 /// <remarks>
 /// This mode is recommended when deploying in Azure roles or <see cref="UsingInstalledFilePath"/> is not appropriate.
 /// </remarks>
 public HostInfoSettings UsingNames(string instanceName, string hostName)
 {
     config.Settings.Set("NServiceBus.HostInformation.HostId", DeterministicGuid.Create(instanceName, hostName));
     return(this);
 }
 public static Guid Generate(Type sagaEntityType, string correlationPropertyName, object correlationPropertyValue)
 {
     // assumes single correlated sagas since v6 doesn't allow more than one corr prop
     // will still have to use a GUID since moving to a string id will have to wait since its a breaking change
     return(DeterministicGuid.Create($"{sagaEntityType}_{correlationPropertyName}_{correlationPropertyValue}"));
 }