﻿using System.Collections.Generic;

namespace Ploeh.AutoFixture.Xunit
{
    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.Xunit
{
    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;
        }
    }
}
Introduce variables to avoid multiple type casting
Introduce variables to avoid multiple type casting
