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();
}