473,856 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enterprise Library Configuration: ConfigurationCh anged event subscription

Version: Microsoft Enterprise Library June 2005

I use the ConfigurationMa nager's static CreateContext methods to create
my own ConfigurationCo ntext, passing in the required values in the
ConfigurationDi ctionary parameter.

I want to subscribe to ConfigurationCh anged events on that newly
created ConfigurationCo ntext.

Taking a closer look how CreateContext works, it's a simple passthrough
to the ConfigurationCo ntext's contructor. That constructor creates a
new DisposingWrappe r (ConfigurationC ontext.cs Line 76) but does not
bind the wrapper's ConfigurationBu ilder's ConfigurationCh anged events
to the ConfigurationCo ntext's eventhandlers like it does for the
internal constructor with an IDisposableWrap per parameter
(ConfigurationC ontext.cs Lines 47 - 48).

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

in short, i'd like to change:
[ConfigurationCo ntext.cs Line 76]
public ConfigurationCo ntext(Configura tionDictionary dictionary)
this.disposable Wrapper = new DisposingWrappe r(new
ConfigurationBu ilder(dictionar y));

--- TO ---

public ConfigurationCo ntext(Configura tionDictionary dictionary)
this.disposable Wrapper = new DisposingWrappe r(new
ConfigurationBu ilder(dictionar y));
this.disposable Wrapper.Configu rationBuilder.C onfigurationCha nged +=
ConfigurationCh angedEventHandl er(OnConfigurat ionBuilderConfi gurationChanged );
this.disposable Wrapper.Configu rationBuilder.C onfigurationCha nging
+= new
ConfigurationCh angingEventHand ler(OnConfigura tionBuilderConf igurationChangi ng);
any advise would be greatly appreciated

Dec 13 '05 #1
0 879

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

Similar topics

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 Interbase database. To do this, I copied and renamed the source files for working with a SQL Server database (SqlCommandWrapper.cs/SqlDatabase.cs to InterbaseCommandWrapper.cs/InterbaseDatabase.cs). I then changed all
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 me to implement DAAB in enterprise library. I said DAAB 2.0 having more performance(data accessing) compare to enterprise library DAAB. And we not using the features of DAAB in enterprise
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 configuration settings using the ConfigurationManager.GetConfiguration my application, which is a windows service, stops with the following error message (parts of it) written to the event log. "Service cannot be started. System.IO.FileNotFoundException:...
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 I run a simple data access page I get an error message. Apparently
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 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
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 log to be precise), if i specify the name of a custom event log, the listener won't log in it. I've checked in the registry, the log is there. In the event viewer, I
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 project so that I can debug better. But I all those examples I found are reference the compiled dll only. What are the steps to include the source code of Microsoft Enterprise Library into my project? I created a new dir and copy Microsoft...
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 the Enterprise Library. This caused a problem that the following article solves: http://scottonwriting.net/sowblog/posts/3406.aspx Does this however mean I am going to run into all sorts of problems
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 2.0 on a XP Pro SP2 Machine
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. I created a project and added the following references - 1/ Enterprise Library Exception Handling Application Block v 4.0
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.