public bool CheckOutcome(WarningKind kind, IOutput output, Method method, ProofOutcome outcome, string message, int primaryILOffset, int methodILOffset,
                                     IDecodeMetaData <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> mdDecoder,
                                     CacheManager <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, ExternalExpression <APC, SymbolicValue>, SymbolicValue> cacheManager)
            {
                string canonicalMethodName = XmlBaseLine <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> .CanonicalMethodName(method, mdDecoder);

                string canonical = CanonicalFormat(canonicalMethodName, kind, outcome, message, primaryILOffset, methodILOffset, baselineStrategy);

                this.actualOutcomes.Add(canonical);

                // HACK to avoid modifying tons of Clousot code
                if (cacheManager != null && !checkedHashMatch)
                {
                    if (this.methodHash != cacheManager.MethodHashAsString())
                    {
                        // the method names match, but their hashes do not. this means the programmer has changed the method *without* renaming it
                        //TextWriter errorWriter = Console.Error;
                        //errorWriter.WriteLine(string.Format("<Hash/Name Discrepancy>{0}</HashName Discrepancy>", method));
                        //Console.WriteLine(string.Format("<Hash/Name Discrepancy>{0}</HashName Discrepancy>", method));
                    }
                    checkedHashMatch = true;
                }
                if (!this.expectedOutcomes.Contains(canonical))
                {
                    if (kind != WarningKind.Informational)
                    {
                        errorCount++;
                    }
                    return(false);
                }
                return(true);
            }
 private void EnsureMethodStart()
 {
     if (!currentMethodHasFailures)
     {
         currentMethodHasFailures = true;
         xmlWriter.WriteStartElement("Method");
         xmlWriter.WriteAttributeString("Name", XmlBaseLine <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly> .CanonicalMethodName(this.currentMethod, this.mdDecoder));
         // can only get method hash if we have a cache manager to compute it with...
         if (cacheManager != null)
         {
             xmlWriter.WriteAttributeString("Hash", cacheManager.MethodHashAsString());
         }
     }
 }