Unlimited Technique          Unlimited Wisdom

1001010000101001000010010001000010000101101110111 1101010010010101011110010101110101011010101010101

导航

Watching the Aspect File

 

When loading aspect xml file in the Load event of Form and wrapping the corresponding classes, then invoking the method of the classes in others place, if the application can’t reload the xml file, when the file is modified, the aspects in memory can’t be updated.

     I think I should take advantage of FileSystemWatcher to watch the aspect file. When they are edited, the memory aspects are updated immediately.

Code:

lock (m_AOPEngine.m_AspectContainers)

{

m_AOPEngine.m_AspectContainers[m_AspectIndex] = xmlEngine.GetAspectContainer();

}

posted on 2005-07-30 21:40  bughole  阅读(261)  评论(0)    收藏  举报