using System.Collections.Generic;
using System.Linq;

namespace UdtSharp
{
    public static class CoreExtensions
    {
        public static bool TryGetValue(this HashSet<InfoBlock> self, InfoBlock equalValue, out InfoBlock actualValue)
        {
            if (self.Contains(equalValue))
            {
                actualValue = self.First(x=>x==equalValue);
                return true;
            }
            actualValue = null;
            return false;
        }
    }
}