예제 #1
0
        public void ReportError(XamlParseError parseError)
        {
            int index1 = 0;

            for (int index2 = this.errors.Count - 1; index2 >= 0; --index2)
            {
                XamlParseError xamlParseError = this.errors[index2];
                if (xamlParseError.Equals((object)parseError))
                {
                    return;
                }
                if (XamlParserContext.CompareTextLocation(xamlParseError.Line, xamlParseError.Column, parseError.Line, parseError.Column) <= 0)
                {
                    index1 = index2 + 1;
                    break;
                }
            }
            this.errors.Insert(index1, parseError);
        }
예제 #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            XamlParseError xamlParseError = obj as XamlParseError;

            if (xamlParseError == null || this.errorCode != xamlParseError.errorCode || (!this.lineInformation.Equals((object)xamlParseError.lineInformation) || !(this.messageFormat == xamlParseError.messageFormat)) || this.parameters.Count != xamlParseError.parameters.Count)
            {
                return(false);
            }
            for (int index = 0; index < this.parameters.Count; ++index)
            {
                if (this.parameters[index] != xamlParseError.parameters[index])
                {
                    return(false);
                }
            }
            return(true);
        }