Exemplo n.º 1
0
        private bool EquivalentMemory(EvaluatorDescriptorImpl other)
        {
            int granularity = ClrHandlerHelper.MemoryGranularity == 0
                                  ? Constants.DefaultMemoryGranularity
                                  : ClrHandlerHelper.MemoryGranularity;
            int m1 = (Memory - 1) / granularity;
            int m2 = (other.Memory - 1) / granularity;

            return(m1 == m2);
        }
Exemplo n.º 2
0
        public override bool Equals(object obj)
        {
            EvaluatorDescriptorImpl other = obj as EvaluatorDescriptorImpl;

            if (other == null)
            {
                return(false);
            }

            return(EquivalentMemory(other));
            // we don't care about rack now;
            // && string.Equals(_rack, other.Rack, StringComparison.OrdinalIgnoreCase);
        }