title: What, if any, are the dangers of passing serialized data through a diagnostic?
body: <p>Creating a diagnostic allows you to pass in a <code>Dictionary&lt;string, string&gt;</code> with self-defined data. Afterwards you can use this in whatever reads the diagnostic to provide contextual information. A typical scenario this is available in is between an analyzer and a code fix.</p>
  
  <p>How reliable is this method of passing data? Are there any special considerations that should be kept in mind?</p>
  
  <p>I recall a discussion on the subject months ago when the concern about serializability was brought up as a reason not to provide such a feature. Something else that comes to mind is the possibility of race conditions (code fixes acting upon outdated information from the analyzer) but I'm questioning how likely this is (or whether it's even possible). A diagnostic should be cancelled when the syntax tree is changed though I'm not aware if this propagates to the Code Fix.</p>
  
  <p>To give <a href="https://github.com/Vannevelj/VSDiagnostics/pull/353/files" rel="nofollow">a specific example</a>: I'm doing some tricks to discover two things: a parameter name and a location. In the analyzer this location is used to display the squiggly underlining while the parameter is used to create a new invocation.
  Rather than computing the parameter name and the location twice, I pass both through the <code>properties</code> argument and then retrieve the affected node from the code fix using that location as determined in the analyzer.</p>