473,386 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Enterprise Library Configuration: ConfigurationChanged event subscription

Version: Microsoft Enterprise Library June 2005

I use the ConfigurationManager's static CreateContext methods to create
my own ConfigurationContext, passing in the required values in the
ConfigurationDictionary parameter.

I want to subscribe to ConfigurationChanged events on that newly
created ConfigurationContext.

Taking a closer look how CreateContext works, it's a simple passthrough
to the ConfigurationContext's contructor. That constructor creates a
new DisposingWrapper (ConfigurationContext.cs Line 76) but does not
bind the wrapper's ConfigurationBuilder's ConfigurationChanged events
to the ConfigurationContext's eventhandlers like it does for the
internal constructor with an IDisposableWrapper parameter
(ConfigurationContext.cs Lines 47 - 48).

Any reason why this was left out in the construction with the
ConfigurationDictionary param?

in short, i'd like to change:
[ConfigurationContext.cs Line 76]
public ConfigurationContext(ConfigurationDictionary dictionary)
{
this.disposableWrapper = new DisposingWrapper(new
ConfigurationBuilder(dictionary));
}

--- TO ---

public ConfigurationContext(ConfigurationDictionary dictionary)
{
this.disposableWrapper = new DisposingWrapper(new
ConfigurationBuilder(dictionary));
this.disposableWrapper.ConfigurationBuilder.Config urationChanged +=
new
ConfigurationChangedEventHandler(OnConfigurationBu ilderConfigurationChanged);
this.disposableWrapper.ConfigurationBuilder.Config urationChanging
+= new
ConfigurationChangingEventHandler(OnConfigurationB uilderConfigurationChanging);
}
any advise would be greatly appreciated

Dec 13 '05 #1
0 862

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike Chamberlain | last post by:
Hi all. I'm trying to extend the Microsoft Enterprise Library Data Access Application Block (http://msdn.microsoft.com/library/en-us/dnpag2/html/daab.asp?frame=true) to work with a Borland...
3
by: veera sekhar kota | last post by:
hi, im seriously looking for right answer .... We are developing windows application in c#. I implemented DAAB(Data Access Application Block) 2.0 in our application. One of the senior asked...
0
by: Jorgas | last post by:
Hi! I try to use the configuration application block from the Enterprise Library and have done prework as specified from one of the hands-on labs from that package. When trying to get...
6
by: Jonathan Crawford | last post by:
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473 Hi I have installed the enterprise library on a development machine and created a project on our webserver. When...
0
by: james.tsao | last post by:
Version: Microsoft Enterprise Library June 2005 I use the ConfigurationManager's static CreateContext methods to create my own ConfigurationContext, passing in the required values in the...
0
by: Eniac | last post by:
Hello, I've started using Enterprise Library 2.0 recently and I've encountered a problem that seems to be ... well... undocumented :) Basically, when I set a Trace Listener (formatted event...
7
by: rockdale | last post by:
hi, I just downloaded Microsoft Enterprise Library Jan 2006 and try to integrate it into my asp.net application. As i am going to connect to mySQL database, I need to include the source code in my...
3
by: bungle | last post by:
Hi, I have started using MS Enterprise Library for the data access layer and found it great. I have changed to coding on another machine though and didn't think it necessary to a full install of...
0
by: =?Utf-8?B?YW5rMmdv?= | last post by:
Hi, Thanks in advance for reading this. Not sure where to post this question, but I hope someone in here can help. Trying to write to Event Log in VS 2005 (.NET 2.0) using Enterprise Library...
0
by: =?Utf-8?B?UG9sbHkgQW5uYQ==?= | last post by:
Hi, I have previously used EL v 3.1 Exception Handling application block successfully. I thought I would now try to do the same with EL v 4.0. My first experiment was to replace an exception....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.