Example #1
0
        public override object Clone()
        {
            PayloadAttribute clone = (PayloadAttribute)base.Clone();

            if (payload != null)
            {
                clone.payload = (BytesRef)payload.Clone();
            }
            return(clone);
        }
Example #2
0
        public override bool Equals(object other)
        {
            if (other == this)
            {
                return(true);
            }

            if (other is PayloadAttribute)
            {
                PayloadAttribute o = (PayloadAttribute)other;
                if (o.payload == null || payload == null)
                {
                    return(o.payload == null && payload == null);
                }

                return(o.payload.Equals(payload));
            }

            return(false);
        }
Example #3
0
        public override void CopyTo(IAttribute target)
        {
            PayloadAttribute t = (PayloadAttribute)target;

            t.Payload = (payload == null) ? null : (BytesRef)payload.Clone();
        }