本文整理汇总了C#中BusConfiguration.RijndaelEncryptionService方法的典型用法代码示例。如果您正苦于以下问题:C# BusConfiguration.RijndaelEncryptionService方法的具体用法?C# BusConfiguration.RijndaelEncryptionService怎么用?C# BusConfiguration.RijndaelEncryptionService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BusConfiguration
的用法示例。
在下文中一共展示了BusConfiguration.RijndaelEncryptionService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Customize
public void Customize(BusConfiguration configuration)
{
configuration.UseTransport<RabbitMQTransport>();
configuration.UsePersistence<InMemoryPersistence>();
configuration.RijndaelEncryptionService();
UnobtrusiveMessageConventions.Init(configuration.Conventions());
}
示例2: Host
public static void Host(TextWriter log, CancellationToken cancellationToken)
{
var configuration = new BusConfiguration();
configuration.UseTransport<AzureStorageQueueTransport>();
configuration.UsePersistence<InMemoryPersistence>();
configuration.Conventions()
.DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("Commands"))
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("Events"))
.DefiningMessagesAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("RequestResponse"))
.DefiningEncryptedPropertiesAs(p => p.Name.StartsWith("Encrypted"));
configuration.RijndaelEncryptionService();
configuration.EnableInstallers();
var startableBus = Bus.Create(configuration);
startableBus.Start();
log.WriteLine("The VideoStore.Sales endpoint is now started and ready to accept messages");
while (!cancellationToken.IsCancellationRequested)
{
Thread.Sleep(3000);
}
startableBus.Dispose();
log.WriteLine("Host: stopped at " + DateTime.UtcNow);
}
示例3: Customize
public void Customize(BusConfiguration configuration)
{
XmlConfigurator.Configure();
configuration.UseContainer<NinjectBuilder>(k => k.ExistingKernel(CreateKernel()));
configuration.RegisterComponents(x => x.ConfigureComponent<IRepository>(
builder =>
{
return new Repository(() =>
{
var nh = builder.Build<NHibernateStorageContext>();
var e = new OrderContext((DbConnection)nh.Connection);
return e;
});
},
DependencyLifecycle.InstancePerUnitOfWork));
configuration.RegisterComponents(components => components.ConfigureComponent<UnitOfWork>(DependencyLifecycle.InstancePerUnitOfWork));
configuration.UsePersistence<NHibernatePersistence>();
configuration.UseTransport<MsmqTransport>();
configuration.UseDataBus<FileShareDataBus>().BasePath(Constants.NServiceBus_DataBusBasePath);
configuration.RijndaelEncryptionService();
configuration.Transactions();
configuration.EnableOutbox();
configuration.Conventions().OrderConventions();
//
}
示例4: Main
static void Main()
{
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Encryption.Endpoint1");
busConfiguration.RijndaelEncryptionService();
busConfiguration.UsePersistence<InMemoryPersistence>();
using (IBus bus = Bus.Create(busConfiguration).Start())
{
MessageWithSecretData message = new MessageWithSecretData
{
Secret = "betcha can't guess my secret",
SubProperty = new MySecretSubProperty
{
Secret = "My sub secret"
},
CreditCards = new List<CreditCardDetails>
{
new CreditCardDetails
{
ValidTo = DateTime.UtcNow.AddYears(1),
Number = "312312312312312"
},
new CreditCardDetails
{
ValidTo = DateTime.UtcNow.AddYears(2),
Number = "543645546546456"
}
}
};
bus.Send("Samples.Encryption.Endpoint2", message);
Console.WriteLine("MessageWithSecretData sent. Press any key to exit");
Console.ReadKey();
}
}
示例5: Usage
Usage(BusConfiguration busConfiguration)
{
#region EncryptionServiceSimple
busConfiguration.RijndaelEncryptionService();
#endregion
}
示例6: Usage
public Usage()
{
#region EncryptionServiceSimple
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.RijndaelEncryptionService();
#endregion
}
示例7: Customize
public void Customize(BusConfiguration configuration)
{
configuration.RegisterComponents(components => components.ConfigureComponent<IRepository>(DependencyLifecycle.InstancePerUnitOfWork));
configuration.RegisterComponents(components => components.ConfigureComponent<IManageUnitsOfWork>(DependencyLifecycle.InstancePerUnitOfWork));
configuration.UseContainer<NinjectBuilder>(k => k.ExistingKernel(CreateKernel()));
configuration.UsePersistence<NHibernatePersistence>();
configuration.UseTransport<MsmqTransport>();
configuration.RijndaelEncryptionService();
configuration.Transactions().DisableDistributedTransactions(); // we need to use NSB without MSDTC
configuration.Conventions().UseDDDSampleConventions();
}
示例8: Customize
public void Customize(BusConfiguration builder)
{
builder.UseTransport<AzureServiceBusTransport>();
builder.UsePersistence<AzureStoragePersistence>();
builder.Conventions()
.DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("Commands"))
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("Events"))
.DefiningMessagesAs(t => t.Namespace != null && t.Namespace.StartsWith("VideoStore") && t.Namespace.EndsWith("RequestResponse"))
.DefiningEncryptedPropertiesAs(p => p.Name.StartsWith("Encrypted"));
builder.RijndaelEncryptionService();
}
示例9: Customize
public void Customize(BusConfiguration configuration)
{
configuration.RegisterComponents(c => c.ConfigureComponent<NServiceBusUnitOfWork>(DependencyLifecycle.InstancePerUnitOfWork));
configuration.RegisterComponents(c => c.ConfigureComponent<Repository>(DependencyLifecycle.InstancePerUnitOfWork));
configuration.UseContainer<NinjectBuilder>(k => k.ExistingKernel(CreateKernel()));
configuration.UsePersistence<NHibernatePersistence>();
configuration.UseTransport<MsmqTransport>();
configuration.RijndaelEncryptionService();
configuration.FileShareDataBus("NServiceBus.DataBus.BasePath");
configuration.Transactions();
configuration.EnableOutbox();
configuration.Conventions().ModuleConventions();
}
示例10: AsyncMain
static async Task AsyncMain()
{
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Encryption.Endpoint2");
busConfiguration.RijndaelEncryptionService();
busConfiguration.UsePersistence<InMemoryPersistence>();
busConfiguration.SendFailedMessagesTo("error");
using (await Bus.Create(busConfiguration).StartAsync())
{
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
示例11: FromCode
public FromCode()
{
#region EncryptionFromCode
BusConfiguration busConfiguration = new BusConfiguration();
string encryptionKey = "gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6";
List<string> expiredKeys = new List<string>
{
"abDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6",
"cdDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6"
};
busConfiguration.RijndaelEncryptionService(encryptionKey, expiredKeys);
#endregion
}
示例12: Main
public static void Main()
{
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Unobtrusive.Server");
busConfiguration.EnableInstallers();
busConfiguration.UsePersistence<InMemoryPersistence>();
busConfiguration.UseDataBus<FileShareDataBus>()
.BasePath(@"..\..\..\DataBusShare\");
busConfiguration.RijndaelEncryptionService("gdDbqRpqdRbTs3mhdZh8qCaDaxJXl+e7");
busConfiguration.ApplyCustomConventions();
using (IBus bus = Bus.Create(busConfiguration).Start())
{
CommandSender.Start(bus);
}
}
示例13: FromCode
FromCode(BusConfiguration busConfiguration)
{
#pragma warning disable 618
#region EncryptionFromCode
string encryptionKeyIdentifier = "2015-10";
byte[] encryptionKey = Convert.FromBase64String("gdDbqRpqdRbTs3mhdZh9qCaDaxJXl+e6");
List<byte[]> expiredKeys = new List<byte[]>
{
Encoding.ASCII.GetBytes("abDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6"),
Encoding.ASCII.GetBytes("cdDbqRpQdRbTs3mhdZh9qCaDaxJXl+e6")
};
busConfiguration.RijndaelEncryptionService(encryptionKeyIdentifier, encryptionKey, expiredKeys);
#endregion
#pragma warning restore 618
}
示例14: Main
public static void Main()
{
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.EnableInstallers();
busConfiguration.UsePersistence<InMemoryPersistence>();
busConfiguration.UseDataBus<FileShareDataBus>()
.BasePath(@"..\..\..\DataBusShare\");
busConfiguration.RijndaelEncryptionService();
busConfiguration.ApplyCustomConventions();
using (IBus bus = Bus.Create(busConfiguration).Start())
{
CommandSender.Start(bus);
}
}
示例15: AsyncMain
static async Task AsyncMain()
{
BusConfiguration busConfiguration = new BusConfiguration();
busConfiguration.EndpointName("Samples.Encryption.Endpoint2");
busConfiguration.RijndaelEncryptionService();
busConfiguration.UsePersistence<InMemoryPersistence>();
busConfiguration.SendFailedMessagesTo("error");
IEndpointInstance endpoint = await Endpoint.Start(busConfiguration);
try
{
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
finally
{
await endpoint.Stop();
}
}