Exemplo n.º 1
0
 public override bool Equals(object?value)
 {
     if (value is UTF7Encoding that)
     {
         return((_allowOptionals == that._allowOptionals) &&
                (EncoderFallback.Equals(that.EncoderFallback)) &&
                (DecoderFallback.Equals(that.DecoderFallback)));
     }
     return(false);
 }
Exemplo n.º 2
0
        public override bool Equals(Object value)
        {
            UTF7Encoding that = value as UTF7Encoding;

            if (that != null)
            {
                return((_allowOptionals == that._allowOptionals) &&
                       (EncoderFallback.Equals(that.EncoderFallback)) &&
                       (DecoderFallback.Equals(that.DecoderFallback)));
            }
            return(false);
        }
        public override bool Equals(object value)
        {
            UTF7Encoding e = value as UTF7Encoding;

            if (e == null)
            {
                return(false);
            }
            return(allowOptionals == e.allowOptionals &&
                   EncoderFallback.Equals(e.EncoderFallback) &&
                   DecoderFallback.Equals(e.DecoderFallback));
        }
Exemplo n.º 4
0
        public override bool Equals(Object value)
        {
            UTF32Encoding that = value as UTF32Encoding;

            if (that != null)
            {
                return((emitUTF32ByteOrderMark == that.emitUTF32ByteOrderMark) &&
                       (bigEndian == that.bigEndian) &&
                       //                       (isThrowException == that.isThrowException) && // same as encoder/decoderfallback being exceptions
                       (EncoderFallback.Equals(that.EncoderFallback)) &&
                       (DecoderFallback.Equals(that.DecoderFallback)));
            }
            return(false);
        }
Exemplo n.º 5
0
        // Determine if two Encoding objects are equal.
        public override bool Equals(Object value)
        {
            Encoding enc = (value as Encoding);

            if (enc != null)
            {
                return(codePage == enc.codePage &&
                       DecoderFallback.Equals(enc.DecoderFallback) &&
                       EncoderFallback.Equals(enc.EncoderFallback));
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 6
0
        // Determine if two Encoding objects are equal.
        public override bool Equals(Object obj)
        {
            Encoding enc = (obj as Encoding);

            if (enc != null)
            {
#if NET_2_0
                return(codePage == enc.codePage &&
                       DecoderFallback.Equals(enc.DecoderFallback) &&
                       EncoderFallback.Equals(enc.EncoderFallback));
#else
                return(codePage == enc.codePage);
#endif
            }
            else
            {
                return(false);
            }
        }