예제 #1
0
        private TransformerData GetTransformer()
        {
            TransformerNode transformerNode = this.SelectTransformerNode();

            if (transformerNode != null)
            {
                return(transformerNode.TransformerData);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        /// <summary>
        /// <para>Sets the name of node when sited to match the underlying storage name and adds the <see cref="StorageProviderNode"/> and <see cref="TransformerNode"/> based on any active configuration data.</para>
        /// </summary>
        protected override void OnSited()
        {
            base.OnSited();
            Site.Name = configurationSectionData.Name;
            INodeCreationService service = ServiceHelper.GetNodeCreationService(Site);

            if (this.configurationSectionData.StorageProvider != null)
            {
                StorageProviderNode storageProviderNode = service.CreateNode(configurationSectionData.StorageProvider.GetType(), new object[] { configurationSectionData.StorageProvider }) as StorageProviderNode;
                Debug.Assert(storageProviderNode != null, "The storage provider type was not registered succesfully.");
                this.Nodes.Add(storageProviderNode);
            }
            if (this.configurationSectionData.Transformer != null)
            {
                TransformerNode transformerNode = service.CreateNode(configurationSectionData.Transformer.GetType(), new object[] { this.configurationSectionData.Transformer }) as TransformerNode;
                Debug.Assert(transformerNode != null, "The transformer type was not registered succesfully.");
                this.Nodes.Add(transformerNode);
            }
        }