﻿using System.Collections.Generic;

namespace Ploeh.AutoFixture.Xunit2
{
    internal class CustomizeAttributeComparer : Comparer<CustomizeAttribute>
    {
        public override int Compare(CustomizeAttribute x, CustomizeAttribute y)
        {
            if (x is FrozenAttribute && !(y is FrozenAttribute))
            {
                return 1;
            }

            if (y is FrozenAttribute && !(x is FrozenAttribute))
            {
                return -1;
            }

            return 0;
        }
    }
}
﻿using System.Collections.Generic;

namespace Ploeh.AutoFixture.Xunit2
{
    internal class CustomizeAttributeComparer : Comparer<CustomizeAttribute>
    {
        public override int Compare(CustomizeAttribute x, CustomizeAttribute y)
        {
            var xfrozen = x is FrozenAttribute;
            var yfrozen = y is FrozenAttribute;

            if (xfrozen && !yfrozen)
            {
                return 1;
            }

            if (yfrozen && !xfrozen)
            {
                return -1;
            }

            return 0;
        }
    }
}
Fix the 'CA1800: Do not cast unnecessarily' code analysis error
Fix the 'CA1800: Do not cast unnecessarily' code analysis error

https://msdn.microsoft.com/en-us/library/ms182271.aspx
