• J
    Make VisualStudioRuleSetManager thread safe · 5d28f535
    Jason Malinowski 提交于
    VisualStudioRuleSetManager acts a single global cache for the contents
    of rule set files, and also offers eventing if the effective contents
    change. This was previously only being called on the UI thread
    everywhere, but it won't be much sooner.
    
    Now that we have ReferenceCountedDisposable, I also take advantage of
    that type to change how we do caching: previously, we would keep filling
    this cache until the solution close, and then we'd clear out everything
    at once. There are two things that aren't great about this pattern:
    
    1. It's a small memory leak, at least up until solution close if you
       stopped using a rule set -- we'll keep holding onto it until we
       close everything.
    2. It assumes that once solution close happens, all projects are indeed
       gone. This isn't a good assumption if we ever open up our project
       APIs and let anybody add things to VisualStudioWorkspace, since
       projects may then live past the solution close event.
    5d28f535
AbstractProject_Options.cs 8.6 KB