private void SetPropertyAndExpectProjectXmlChangedEventToNotFire(ProjectRootElement rootElement, Action action)
        {
            ProjectXmlChangedEventArgs projectXmlChangedEventArgs = null;

            void OnProjectXmlChanged(object sender, ProjectXmlChangedEventArgs args)
            {
                projectXmlChangedEventArgs = args;
            }

            rootElement.OnProjectXmlChanged += OnProjectXmlChanged;
            try
            {
                action();
            }
            finally
            {
                rootElement.OnProjectXmlChanged -= OnProjectXmlChanged;
            }

            projectXmlChangedEventArgs.ShouldBeNull();
        }
Beispiel #2
0
 public void ProjectXmlHandler(object sender, ProjectXmlChangedEventArgs args)
 {
     XmlHandler(args.ProjectXml.RawXml);
 }