System.Text.CodePageEncoding.GetRealObject C# (CSharp) Method

GetRealObject() public method

public GetRealObject ( StreamingContext context ) : Object
context System.Runtime.Serialization.StreamingContext
return Object
        public Object GetRealObject(StreamingContext context)
        {
            this.realEncoding = Encoding.GetEncoding(this.m_codePage);

            // If its read only then it uses default fallbacks, otherwise pick up the new ones
            // Otherwise we want to leave the new one read only
            if (!this.m_deserializedFromEverett && !this.m_isReadOnly)
            {
                this.realEncoding = (Encoding)this.realEncoding.Clone();
                this.realEncoding.EncoderFallback = this.encoderFallback;
                this.realEncoding.DecoderFallback = this.decoderFallback;
            }

            return this.realEncoding;
        }