/// <summary>
		/// Raises the <see cref="ConfigurationNode.ChildAdded"/> event and sets the storage encryption provider name based on the child node added that must be a <see cref="CacheStorageEncryptionNode"/>.
		/// </summary>
		/// <param name="e">A <see cref="ConfigurationChangedEventArgs"/> that contains the event data.</param>
		protected override void OnChildAdded(ConfigurationNodeChangedEventArgs e)
		{
            base.OnChildAdded(e);
			CacheStorageEncryptionNode node = e.Node as CacheStorageEncryptionNode;
			Debug.Assert(null != node, "Only a CacheStorageEncryptionNode can be added to a CacheStorageNode");

			storageEncryptionName = node.Name;

		}
Example #2
0
		/// <summary>
		/// <para>Raises the <seealso cref="ChildAdded"/> event.</para>
		/// </summary>
		/// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
		protected virtual void OnChildAdded(ConfigurationNodeChangedEventArgs e)
		{
			if (handlerList != null)
			{
				EventHandler<ConfigurationNodeChangedEventArgs> handler = (EventHandler<ConfigurationNodeChangedEventArgs>)handlerList[childAddedEvent];
				if (handler != null)
				{
					handler(this, e);
				}
			}
		}
Example #3
0
 /// <summary>
 /// <para>Removes the document from the document table.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRemoving(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRemoving(e);
     if (FileName.Length > 0)
     {
         if (Hierarchy != null)
         {
             Hierarchy.StorageTable.Remove(FileName);
         }
     }
 }
Example #4
0
		/// <summary>
		/// <para>Raises the <seealso cref="Renaming"/> event.</para>
		/// </summary>
		/// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
		protected virtual void OnRenaming(ConfigurationNodeChangedEventArgs e)
		{
			if (handlerList != null)
			{
				EventHandler<ConfigurationNodeChangedEventArgs> handler = (EventHandler<ConfigurationNodeChangedEventArgs>)handlerList[renamingEvent];
				if (handler != null)
				{
					handler(this, e);
				}
			}
		}
Example #5
0
 /// <summary>
 /// <para>Raises the <seealso cref="Changed"/> event.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> object containing the event data.</para></param>
 protected virtual void OnChanged(ConfigurationNodeChangedEventArgs e)
 {
     if (Events != null)
     {
         ConfigurationNodeChangedEventHandler handler = (ConfigurationNodeChangedEventHandler)Events[changedEvent];
         if (handler != null)
         {
             handler(this, e);
         }
     }
 }
Example #6
0
 /// <summary>
 /// Raises the <see cref="ChildAdded"/> event.
 /// </summary>
 /// <param name="e">A
 /// <see cref="ConfigurationNodeChangedEventArgs"/> that contains
 /// the event data.</param>
 protected virtual void OnChildAdded(ConfigurationNodeChangedEventArgs e)
 {
     if (Events != null)
     {
         ConfigurationNodeChangedEventHandler handler = (ConfigurationNodeChangedEventHandler)Events[childAddedEvent];
         if (handler != null)
         {
             handler(this, e);
         }
     }
     OnChanged(new ConfigurationNodeChangedEventArgs(ConfigurationNodeChangedAction.Changed, this, Parent));
 }
Example #7
0
 private void AddChildeNode(ConfigurationNodeChangedEventArgs e)
 {
     ConfigurationTreeNode newNode = CreateChildNode(e.Node);
     if (newNode.ConfigurationNode.Parent.SortChildren)
     {
         AddSorted(newNode);
     }
     else
     {
         this.Nodes.Add(newNode);
     }
     foreach (ConfigurationNode child in e.Node.Nodes)
     {
         newNode.OnChildAdded(newNode, new ConfigurationNodeChangedEventArgs(ConfigurationNodeChangedAction.Insert, child, e.Node));
     }
 }
Example #8
0
 /// <summary>
 /// <para>Raises the <seealso cref="Removed"/> event.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected virtual void OnRemoving(ConfigurationNodeChangedEventArgs e)
 {
     foreach (ConfigurationNode child in e.Node.Nodes)
     {
         child.OnRemoving(new ConfigurationNodeChangedEventArgs(ConfigurationNodeChangedAction.Remove, child, e.Node));
     }
     if (Events != null)
     {
         ConfigurationNodeChangedEventHandler handler = (ConfigurationNodeChangedEventHandler)Events[removingEvent];
         if (handler != null)
         {
             handler(this, e);
         }
     }
     OnChanged(new ConfigurationNodeChangedEventArgs(ConfigurationNodeChangedAction.Changed, this, Parent));
 }
		private void OnFormatterNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
		{
			formatterName = null;
		}
Example #10
0
 private void OnDistributionStrategyNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.distributionStrategyNode = null;
 }
 /// <summary>
 /// <para>Removes the document from the document table.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRemoving(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRemoving(e);
     if (FileName.Length > 0)
     {
         if (Hierarchy != null) Hierarchy.StorageTable.Remove(FileName);
     }
 }
Example #12
0
 private void OnRolesDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultRolesProviderNode = null;
 }
Example #13
0
 private void OnConfigurationFileChanged(object sender, ConfigurationNodeChangedEventArgs e)
 {
     storageSerivce.ConfigurationFile = ((ConfigurationApplicationNode)e.Node).ConfigurationFile;
 }
		/// <summary>
		/// <para>Raises the <seealso cref="ChildAdded"/> event.</para>
		/// </summary>
		/// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
		protected virtual void OnChildAdded(ConfigurationNodeChangedEventArgs e)
		{
			if (handlerList != null)
			{
				EventHandler<ConfigurationNodeChangedEventArgs> handler = (EventHandler<ConfigurationNodeChangedEventArgs>)handlerList[childAddedEvent];
				if (handler != null)
				{
					handler(this, e);
				}
			}
		}
Example #15
0
 private void OnElementNodeRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     configurationSourceElementNode = null;
 }
Example #16
0
 /// <summary>
 /// <para>Raises the <see cref="ConfigurationNode.Renamed"/> event.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     Debug.Assert(e.Node != null, "The node should be set.");
     transformerData.Name = e.Node.Name;
 }
		private void OnConnectionStringNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
		{
			connectionStringNode = null;
		}
 private void OnSymmetricProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.SymmetricProvider = null;
 }
 private void OnCacheManagerNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.cacheManagerNode = null;
 }
        private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
        {
			cacheManagerName = e.Node.Name;
        }
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     symmetricCryptoProviderData.Name = e.Node.Name;
 }
Example #22
0
 /// <summary>
 /// <para>Renames the underlying data.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     cacheStorageData.Name = e.Node.Name;
 }
 private void OnSymmetricProviderRenamed(object sender, ConfigurationNodeChangedEventArgs args)
 {
     symmetricStorageEncryptionProviderData.SymmetricInstance = args.Node.Name;
 }
 /// <summary>
 /// <para>Raises the <see cref="ConfigurationNode.Renamed"/> event and sets the <see cref="Microsoft.Practices.EnterpriseLibrary.Configuration.Design.ApplicationData.Name"/> to the new node name.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     applicationData.Name = e.Node.Name;
 }
Example #25
0
 private void OnDefaultRuleNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.defaultRuleNode = null;
     this.defaultRuleName = null;
 }
Example #26
0
 /// <summary>
 /// <para>Sets the <seeals cref="ParameterData.Name"/> to the <seealso cref="ConfigurationNode.Name"/></para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     parameterData.Name = e.Node.Name;
 }
Example #27
0
 private void OnAuthorizationDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultAuthorizationProviderNode = null;
 }
 private void OnDatabaseRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.Database = null;
 }
Example #29
0
 private void OnSecurityCacheDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultSecurityCacheProviderNode = null;
 }
 private void OnDatabaseRenamed(object sender, ConfigurationNodeChangedEventArgs args)
 {
     if (Hierarchy != null) data.Database = args.Node.Name;
 }
Example #31
0
 protected override void OnChildAdding(ConfigurationNodeChangedEventArgs e)
 {
     base.OnChildAdding (e);
     if (Hierarchy.ContainsNodeType(this, e.Node.GetType()))
     {
         throw new InvalidOperationException(SR.ExceptionCollectionAlreadyExists);
     }
 }
 private void OnHashProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     if (Hierarchy != null) this.HashProvider = null;
 }
Example #33
0
 private void OnDistributionStrategyNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     loggingSettings.DistributionStrategy = e.Node.Name;
 }
 private void OnHashProviderRenamed(object sender, ConfigurationNodeChangedEventArgs args)
 {
     data.HashProvider = args.Node.Name;
 }
		private void OnFormatterNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
		{
			formatterName = e.Node.Name;
		}
Example #36
0
 /// <summary>
 /// <para>Raises the <see cref="ConfigurationNode.Renamed"/> event.</para>
 /// </summary>
 /// <param name="e"><para>A <see cref="ConfigurationNodeChangedEventArgs"/> that contains the event data.</para></param>
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     Debug.Assert(e.Node != null, "The node should be set.");
     xmlIncludeTypeData.Name = e.Node.Name;
 }
		private void OnConnectionStringNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
		{
			databaseName = e.Node.Name;
		}
 /// <summary>
 /// Raises the ChildAdded event and confirms that only one <see cref="CacheManagerCollectionNode"/> has been added.
 /// </summary>
 /// <param name="e">A 
 /// <see cref="ConfigurationNodeChangedEventArgs"/> that contains
 /// the event data.</param>
 /// <exception cref="InvalidOperationException" />
 protected override void OnChildAdded(ConfigurationNodeChangedEventArgs e)
 {
     base.OnChildAdded (e);
     if (Nodes.Count > 1 && e.Node.GetType() == typeof(CacheManagerCollectionNode))
     {
         throw new InvalidOperationException(SR.ExceptionOnlyOneCacheManagerCollectionNode);
     }
 }
 private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     cachingStoreProviderData.CacheManager = e.Node.Name;
 }
 private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.cacheManagerSettings.DefaultCacheManager = e.Node.Name;
 }