Exemplo n.º 1
0
		/// <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;

		}
Exemplo n.º 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);
				}
			}
		}
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 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);
				}
			}
		}
Exemplo n.º 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);
         }
     }
 }
Exemplo n.º 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));
 }
Exemplo n.º 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));
     }
 }
Exemplo n.º 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));
 }
Exemplo n.º 9
0
		private void OnFormatterNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
		{
			formatterName = null;
		}
Exemplo n.º 10
0
 private void OnDistributionStrategyNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.distributionStrategyNode = null;
 }
Exemplo n.º 11
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);
     }
 }
Exemplo n.º 12
0
 private void OnRolesDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultRolesProviderNode = null;
 }
Exemplo n.º 13
0
 private void OnConfigurationFileChanged(object sender, ConfigurationNodeChangedEventArgs e)
 {
     storageSerivce.ConfigurationFile = ((ConfigurationApplicationNode)e.Node).ConfigurationFile;
 }
Exemplo n.º 14
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);
				}
			}
		}
Exemplo n.º 15
0
 private void OnElementNodeRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     configurationSourceElementNode = null;
 }
Exemplo n.º 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;
 }
Exemplo n.º 17
0
		private void OnConnectionStringNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
		{
			connectionStringNode = null;
		}
 private void OnSymmetricProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.SymmetricProvider = null;
 }
Exemplo n.º 19
0
 private void OnCacheManagerNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.cacheManagerNode = null;
 }
        private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
        {
			cacheManagerName = e.Node.Name;
        }
Exemplo n.º 21
0
 protected override void OnRenamed(ConfigurationNodeChangedEventArgs e)
 {
     base.OnRenamed(e);
     symmetricCryptoProviderData.Name = e.Node.Name;
 }
Exemplo n.º 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;
 }
Exemplo n.º 25
0
 private void OnDefaultRuleNodeRemoved(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.defaultRuleNode = null;
     this.defaultRuleName = null;
 }
Exemplo n.º 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;
 }
Exemplo n.º 27
0
 private void OnAuthorizationDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultAuthorizationProviderNode = null;
 }
Exemplo n.º 28
0
 private void OnDatabaseRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.Database = null;
 }
Exemplo n.º 29
0
 private void OnSecurityCacheDefaultProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     this.defaultSecurityCacheProviderNode = null;
 }
Exemplo n.º 30
0
 private void OnDatabaseRenamed(object sender, ConfigurationNodeChangedEventArgs args)
 {
     if (Hierarchy != null) data.Database = args.Node.Name;
 }
Exemplo n.º 31
0
 protected override void OnChildAdding(ConfigurationNodeChangedEventArgs e)
 {
     base.OnChildAdding (e);
     if (Hierarchy.ContainsNodeType(this, e.Node.GetType()))
     {
         throw new InvalidOperationException(SR.ExceptionCollectionAlreadyExists);
     }
 }
Exemplo n.º 32
0
 private void OnHashProviderRemoved(object sender, ConfigurationNodeChangedEventArgs args)
 {
     if (Hierarchy != null) this.HashProvider = null;
 }
Exemplo n.º 33
0
 private void OnDistributionStrategyNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     loggingSettings.DistributionStrategy = e.Node.Name;
 }
Exemplo n.º 34
0
 private void OnHashProviderRenamed(object sender, ConfigurationNodeChangedEventArgs args)
 {
     data.HashProvider = args.Node.Name;
 }
Exemplo n.º 35
0
		private void OnFormatterNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
		{
			formatterName = e.Node.Name;
		}
Exemplo n.º 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;
 }
Exemplo n.º 37
0
		private void OnConnectionStringNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
		{
			databaseName = e.Node.Name;
		}
Exemplo n.º 38
0
 /// <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);
     }
 }
Exemplo n.º 39
0
 private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     cachingStoreProviderData.CacheManager = e.Node.Name;
 }
Exemplo n.º 40
0
 private void OnCacheManagerNodeRenamed(object sender, ConfigurationNodeChangedEventArgs e)
 {
     this.cacheManagerSettings.DefaultCacheManager = e.Node.Name;
 }