System.Runtime.Serialization.Formatters.Binary.ReadObjectInfo.InitReadConstructor C# (CSharp) Method

InitReadConstructor() private method

private InitReadConstructor ( Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context ) : void
objectType System.Type
surrogateSelector ISurrogateSelector
context System.Runtime.Serialization.StreamingContext
return void
        private void InitReadConstructor(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context)
        {
            if (objectType.IsArray)
            {
                InitNoMembers();
                return;
            }

            ISurrogateSelector surrogateSelectorTemp = null;
            if (surrogateSelector != null)
            {
                _serializationSurrogate = surrogateSelector.GetSurrogate(objectType, context, out surrogateSelectorTemp);
            }

            if (_serializationSurrogate != null)
            {
                _isSi = true;
            }
            else if (!ReferenceEquals(objectType, Converter.s_typeofObject) && Converter.s_typeofISerializable.IsAssignableFrom(objectType))
            {
                _isSi = true;
            }

            if (_isSi)
            {
                InitSiRead();
            }
            else
            {
                InitMemberInfo();
            }
        }