public void AddMessage(string fullName, MessageKind kind, string message)
 {
     lock (loadedAssemblyReferences) {
         if (!loadedAssemblyReferences.TryGetValue(fullName, out var referenceInfo))
         {
             referenceInfo = new UnresolvedAssemblyNameReference(fullName);
             loadedAssemblyReferences.Add(fullName, referenceInfo);
         }
         referenceInfo.Messages.Add((kind, message));
     }
 }
 public static void AddMessage(this Dictionary <string, UnresolvedAssemblyNameReference> container, string fullName, MessageKind kind, string message)
 {
     if (container == null)
     {
         throw new ArgumentNullException(nameof(container));
     }
     if (!container.TryGetValue(fullName, out var referenceInfo))
     {
         referenceInfo = new UnresolvedAssemblyNameReference(fullName);
         container.Add(fullName, referenceInfo);
     }
     referenceInfo.Messages.Add((kind, message));
 }
 public void AddMessageOnce(string fullName, MessageKind kind, string message)
 {
     lock (loadedAssemblyReferences) {
         if (!loadedAssemblyReferences.TryGetValue(fullName, out var referenceInfo))
         {
             referenceInfo = new UnresolvedAssemblyNameReference(fullName);
             loadedAssemblyReferences.Add(fullName, referenceInfo);
             referenceInfo.Messages.Add((kind, message));
         }
         else
         {
             var lastMsg = referenceInfo.Messages.LastOrDefault();
             if (kind != lastMsg.Item1 && message != lastMsg.Item2)
             {
                 referenceInfo.Messages.Add((kind, message));
             }
         }
     }
 }
 public bool TryGetInfo(string fullName, out UnresolvedAssemblyNameReference info)
 {
     lock (loadedAssemblyReferences) {
         return(loadedAssemblyReferences.TryGetValue(fullName, out info));
     }
 }