示例#1
0
        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj))
            {
                return(true);
            }
            var other = obj as FormatGeneratorOptions;

            if (other == null)
            {
                throw new PSInvalidOperationException("Object to be compared is of different type "
                                                      + obj.GetType().Name);
            }
            if (((Properties == null) != (other.Properties == null)) ||
                ((GroupBy == null) != (other.GroupBy == null))
                )
            {
                return(false);
            }
            return(
                Expand.Equals(other.Expand) &&
                Force.Equals(other.Force) &&
                ((GroupBy == null && other.GroupBy == null) || GroupBy.Equals(other.GroupBy)) &&
                DisplayError.Equals(other.DisplayError) &&
                ShowError.Equals(other.ShowError) &&
                String.Equals(View, other.View) &&
                ((Properties == null && other.Properties == null) || Properties.Equals(other.Properties))
                );
        }