コード例 #1
0
        protected override void InitializeCore()
        {
            Type nodeType           = typeof(CacheStorageEncryptionNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(ServiceProvider, nodeType), nodeType, typeof(MockStorageEncryptionProviderData), "Mock storage encryption");

            ServiceHelper.GetNodeCreationService(ServiceProvider).AddNodeCreationEntry(entry);
        }
コード例 #2
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomAuthenticationProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomAuthenticationProviderData), SR.CustomAuthenticationProviderCommandName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomRolesProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomRolesProviderData), SR.CustomRolesProviderCommandName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomAuthorizationProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomAuthorizationProviderData), SR.CustomAuthorizationProviderCommandName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomProfileProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomProfileProviderData), SR.CustomProfileProviderCommandName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomSecurityCacheProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomSecurityCacheProviderData), SR.CustomSecurityCacheNodeCommandName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(AuthorizationRuleProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(AuthorizationRuleProviderData), SR.AuthorizationRuleProviderCommandName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomHashProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomHashProviderData), SR.CustomHashProviderNodeName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomSymmetricCryptoProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomSymmetricCryptoProviderData), SR.CustomSymmetricCryptoProviderNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(HashAlgorithmProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(HashAlgorithmProviderData), SR.HashAlgorithmProviderNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(KeyedHashAlgorithmProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(KeyedHashAlgorithmProviderData), SR.KeyedHashProviderNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(SymmetricAlgorithmProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(SymmetricAlgorithmProviderData), SR.SymmetricAlgorithmProviderNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(DpapiSymmetricCryptoProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(DpapiSymmetricCryptoProviderData), SR.DpapiSymmetricCryptoProviderNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #4
0
        public override void SetUp()
        {
            base.SetUp();

            Type nodeType           = typeof(CustomAuthenticationProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomAuthenticationProviderData), SR.CustomAuthenticationProviderCommandName);

            NodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomRolesProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomRolesProviderData), SR.CustomRolesProviderCommandName);
            NodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomAuthorizationProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomAuthorizationProviderData), SR.CustomAuthorizationProviderCommandName);
            NodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomProfileProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomProfileProviderData), SR.CustomProfileProviderCommandName);
            NodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomSecurityCacheProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomSecurityCacheProviderData), SR.CustomSecurityCacheNodeCommandName);
            NodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(AuthorizationRuleProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(AuthorizationRuleProviderData), SR.AuthorizationRuleProviderCommandName);
            NodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #5
0
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(SymmetricStorageEncryptionNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(SymmetricStorageEncryptionProviderData), SR.SymmetricStorageEncryption);

            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #6
0
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(DatabaseSinkNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(DatabaseSinkData), SR.DatabaseSink);

            nodeCreationService.AddNodeCreationEntry(entry);
        }
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CachingStoreProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CachingStoreProviderData), SR.SecurityInstance);

            nodeCreationService.AddNodeCreationEntry(entry);
        }
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(ActiveDirectoryRolesProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(AdRolesProviderData), SR.ActiveDirectoryProvider);

            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #9
0
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(LoggingExceptionHandlerNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(LoggingExceptionHandlerData), SR.LoggingHandlerName);

            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #10
0
        public override void SetUp()
        {
            base.SetUp();
            XmlIncludeTypeService.AddXmlIncludeType(section, typeof(MyConfigurationData));

            Type nodeType           = typeof(MyConfigurationNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(MyConfigurationData), "My Configuraiton Node");

            NodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #11
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(IsolatedStorageCacheStorageNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(IsolatedStorageCacheStorageData), SR.DefaultIsolatedStorageNodeName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomCacheStorageNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomCacheStorageData), SR.DefaultCustomCacheStorageNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #12
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(OracleConnectionStringNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(OracleConnectionStringData), SR.OracleConnectionStringNodeFriendlyName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ConnectionStringNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(ConnectionStringData), SR.ConnectionStringNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #13
0
        public void CanGetANodeWithNotADirectInheritanceChain()
        {
            string name = "Foo";

            Type nodeType           = typeof(MyDerivedNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(MyDerivedData), name);

            NodeCreationService.AddNodeCreationEntry(entry);

            StringCollection names = NodeCreationService.GetDisplayNames(typeof(StorageProviderNode));

            Assert.IsTrue(names.Contains(name));
        }
コード例 #14
0
        private static void RegisterNodeTypes(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(DbProfileProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(DbProfileProviderData), SR.DbProfileProviderDisplayName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(DbRolesProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(DbRolesProviderData), SR.DbRolesProviderDisplayName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #15
0
        public void CreateNodeTest()
        {
            Type t = typeof(InstrumentationNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(
                new AddChildNodeCommand(ServiceProvider, t),
                t, typeof(InstrumentationConfigurationSection), "Instrumentation");

            NodeCreationService.AddNodeCreationEntry(entry);

            InstrumentationNode node = NodeCreationService.CreateNodeByDataType(
                typeof(InstrumentationConfigurationSection)) as InstrumentationNode;

            Assert.IsNotNull(node);
        }
コード例 #16
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomSinkNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomSinkData), SR.CustomSink);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(EmailSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(EmailSinkData), SR.EmailSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(EventLogSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(EventLogSinkData), SR.EventLogSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(FlatFileSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(FlatFileSinkData), SR.FlatFileSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(RollingFlatFileSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(RollingFlatFileSinkData), SR.RollingFlatFileSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ConsoleSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(ConsoleSinkData), SR.ConsoleSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(MsmqSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(MsmqSinkData), SR.MsmqSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(WmiLogSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(WMILogSinkData), SR.WmiLogSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(WSSinkNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(WSSinkNode), SR.WSSink);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomFormatterNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomFormatterData), SR.CustomFormatter);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(TextFormatterNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(TextFormatterData), SR.TextFormatter);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #17
0
        public void CreateNodeTest()
        {
            Type t = typeof(XmlFileStorageProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, t), t, typeof(XmlFileStorageProviderData), SR.XmlFileStorageProviderNodeTypeNameDescription);

            NodeCreationService.AddNodeCreationEntry(entry);

            t     = typeof(XmlSerializerTransformerNode);
            entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, t), t, typeof(XmlSerializerTransformerData), SR.XmlSerializerTransformerNodeFriendlyName);
            NodeCreationService.AddNodeCreationEntry(entry);

            XmlFileStorageProviderNode node = NodeCreationService.CreateNode(typeof(XmlFileStorageProviderData)) as XmlFileStorageProviderNode;

            Assert.IsNotNull(node);
        }
コード例 #18
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomDistributionStrategyNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomDistributionStrategyData), SR.CustomDistributionStrategy);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(InProcDistributionStrategyNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(InProcDistributionStrategyData), SR.InProcDistributionStrategy);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(MsmqDistributionStrategyNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(MsmqDistributionStrategyData), SR.MsmqDistributionStrategy);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #19
0
        private static void RegisterNodeMaps(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(CustomHandlerNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(CustomHandlerData), SR.DefaultCustomHandlerNodeName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(WrapHandlerNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(WrapHandlerData), SR.DefaultWrapHandlerNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ReplaceHandlerNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryWithMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(ReplaceHandlerData), SR.DefaultReplaceHandlerNodeName);
            nodeCreationService.AddNodeCreationEntry(entry);
        }
コード例 #20
0
        public override void SetUp()
        {
            base.SetUp();
            INodeCreationService nodeCreationService = GetService(typeof(INodeCreationService)) as INodeCreationService;

            Assert.IsNotNull(nodeCreationService);

            Type nodeType           = typeof(CustomKeyAlgorithmStorageProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomKeyAlgorithmPairStorageProviderData), SR.CustomKeyAlgorithmPairStorageProviderNodeDefaultName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomTransformerNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomTransformerData), SR.CustomTransformerNodeDefaultName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(CustomStorageProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(CustomStorageProviderData), SR.CustomStorageProviderNodeDefaultName);
            nodeCreationService.AddNodeCreationEntry(entry);


            nodeType = typeof(XmlFileStorageProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(XmlFileStorageProviderData), SR.XMLStorageProviderNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(XmlSerializerTransformerNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(XmlSerializerTransformerData), SR.XmlSerializerTransformerNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ConfigurationSectionNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(ConfigurationSectionData), SR.ConfigurationSectionNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ReadOnlyConfigurationSectionNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(Host, nodeType), nodeType, typeof(ReadOnlyConfigurationSectionData), SR.ReadOnlyConfigurationSectionNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(FileKeyAlgorithmPairStorageProviderNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddFileKeyAlgorithmPairNodeCommand(Host, nodeType), nodeType, typeof(FileKeyAlgorithmPairStorageProviderData), SR.FileKeyAlgorithmStorageProviderNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            configurationSectionsNode = new ConfigurationSectionCollectionNode(ConfigurationSettingsBuilder.Create());
            Assert.IsNotNull(configurationSectionsNode);
            CreateHierarchyAndAddToHierarchyService(configurationSectionsNode, CreateDefaultConfiguration());
        }
コード例 #21
0
        public static DatabaseSettings Create(IServiceProvider serviceProvider)
        {
            INodeCreationService nodeCreationService = ServiceHelper.GetNodeCreationService(serviceProvider);

            Type nodeType           = typeof(OracleConnectionStringNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(OracleConnectionStringData), SR.OracleConnectionStringNodeFriendlyName);

            nodeCreationService.AddNodeCreationEntry(entry);

            nodeType = typeof(ConnectionStringNode);
            entry    = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddChildNodeCommand(serviceProvider, nodeType), nodeType, typeof(ConnectionStringData), SR.ConnectionStringNodeFriendlyName);
            nodeCreationService.AddNodeCreationEntry(entry);

            XmlTextReader xmlReader     = new XmlTextReader(new StringReader(xmlString));
            XmlSerializer xmlSerializer = new XmlSerializer(typeof(DatabaseSettings));

            return(xmlSerializer.Deserialize(xmlReader) as DatabaseSettings);
        }
コード例 #22
0
        public void GetFileKeyAlgorithmData()
        {
            EncryptionSettingsNode node = new EncryptionSettingsNode();
            INodeCreationService   nodeCreationService = GetService(typeof(INodeCreationService)) as INodeCreationService;

            Assert.IsNotNull(nodeCreationService);

            Type nodeType           = typeof(FileKeyAlgorithmPairStorageProviderNode);
            NodeCreationEntry entry = NodeCreationEntry.CreateNodeCreationEntryNoMultiples(new AddFileKeyAlgorithmPairNodeCommand(Host, nodeType), nodeType, typeof(FileKeyAlgorithmPairStorageProviderData), SR.FileKeyAlgorithmStorageProviderNodeFriendlyName);

            nodeCreationService.AddNodeCreationEntry(entry);

            GeneratedApplicationNode.Nodes.Add(node);
            FileKeyAlgorithmPairStorageProviderNode pairStorageNode = new FileKeyAlgorithmPairStorageProviderNode();

            pairStorageNode.File = "testeithbeuhyr";
            node.Nodes.Add(pairStorageNode);
            FileKeyAlgorithmPairStorageProviderData storageData = (FileKeyAlgorithmPairStorageProviderData)node.KeyAlgorithmPairStorageProviderData;

            Assert.AreEqual(pairStorageNode.File, storageData.Path);
        }