当前位置: 首页>>代码示例>>C#>>正文


C# BusConfiguration.RijndaelEncryptionService方法代码示例

本文整理汇总了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());
 }
开发者ID:ghola,项目名称:NServiceBus.RabbitMQ.Samples,代码行数:7,代码来源:EndpointConfig.cs

示例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);
        }
开发者ID:nigelhamer,项目名称:VideoStore.DistributedAppDemo,代码行数:25,代码来源:Functions.cs

示例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();
            //
        }
开发者ID:eraj2587,项目名称:NserviceBusDemo,代码行数:26,代码来源:EndpointConfig.cs

示例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();
        }
    }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:35,代码来源:Program.cs

示例5: Usage

        Usage(BusConfiguration busConfiguration)
        {
            #region EncryptionServiceSimple

            busConfiguration.RijndaelEncryptionService();

            #endregion
        }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例6: Usage

        public Usage()
        {
            #region EncryptionServiceSimple

            BusConfiguration busConfiguration = new BusConfiguration();
            busConfiguration.RijndaelEncryptionService();

            #endregion
        }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:9,代码来源:Usage.cs

示例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();
 }
开发者ID:niravsahayata,项目名称:DDDSample,代码行数:11,代码来源:EndpointConfig.cs

示例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();
        }
开发者ID:gaurav0106,项目名称:NServiceBus.Azure.Samples,代码行数:13,代码来源:EndpointConfig.cs

示例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();
 }
开发者ID:eraj2587,项目名称:EF-Code-First,代码行数:13,代码来源:EndpointConfig.cs

示例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();
     }
 }
开发者ID:RichieYang,项目名称:docs.particular.net,代码行数:13,代码来源:Program.cs

示例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
        }
开发者ID:ryanrdl,项目名称:docs.particular.net,代码行数:15,代码来源:FromCode.cs

示例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);
        }
    }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:17,代码来源:Program.cs

示例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
        }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:17,代码来源:FromCode.cs

示例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);
        }
    }
开发者ID:ryanrdl,项目名称:docs.particular.net,代码行数:17,代码来源:Program.cs

示例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();
     }
 }
开发者ID:cdnico,项目名称:docs.particular.net,代码行数:18,代码来源:Program.cs


注:本文中的BusConfiguration.RijndaelEncryptionService方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。