public sealed override bool Equals(object obj)
        {
            LanguageDiagnosticInfo other = obj as LanguageDiagnosticInfo;

            bool result = false;

            if (other != null &&
                other._errorCode == _errorCode &&
                this.GetType() == obj.GetType())
            {
                if (_arguments == null && other._arguments == null)
                {
                    result = true;
                }
                else if (_arguments != null && other._arguments != null && _arguments.Length == other._arguments.Length)
                {
                    result = true;
                    for (int i = 0; i < _arguments.Length; i++)
                    {
                        if (!object.Equals(_arguments[i], other._arguments[i]))
                        {
                            result = false;
                            break;
                        }
                    }
                }
            }

            return(result);
        }
 internal LanguageDiagnostic(LanguageDiagnosticInfo info, Location location, bool isSuppressed = false)
 {
     Debug.Assert(info != null);
     Debug.Assert(location != null);
     _info         = info;
     _location     = location;
     _isSuppressed = isSuppressed;
 }
 private LanguageDiagnosticInfo(LanguageDiagnosticInfo original, DiagnosticSeverity overriddenSeverity)
 {
     _errorCode         = original._errorCode;
     _arguments         = original._arguments;
     _effectiveSeverity = overriddenSeverity;
 }
 public static Diagnostic Create(LanguageDiagnosticInfo info)
 {
     return(new DiagnosticWithInfo(info, Location.None));
 }