internal static void SetRequestOptions(ref SerializableRequestOptions serializer, IRequestOptions requestOptions)
        {
            if (null == serializer && null == requestOptions)
            {
                return;
            }

            if (null == serializer)
            {
                serializer = CreateSerializableRequestOptions(requestOptions);
            }
            else
            {
                if ((requestOptions is FileRequestOptions)
                    && (serializer is SerializableBlobRequestOptions))
                {
                    serializer = new SerializableFileRequestOptions();
                }
                else if ((requestOptions is BlobRequestOptions)
                    && (serializer is SerializableFileRequestOptions))
                {
                    serializer = new SerializableBlobRequestOptions();
                }

                serializer.RequestOptions = requestOptions;
            }
        }
コード例 #2
0
        internal static void SetRequestOptions(ref SerializableRequestOptions serializer, IRequestOptions requestOptions)
        {
            if (null == serializer && null == requestOptions)
            {
                return;
            }

            if (null == serializer)
            {
                serializer = CreateSerializableRequestOptions(requestOptions);
            }
            else
            {
                if ((requestOptions is FileRequestOptions) &&
                    (serializer is SerializableBlobRequestOptions))
                {
                    serializer = new SerializableFileRequestOptions();
                }
                else if ((requestOptions is BlobRequestOptions) &&
                         (serializer is SerializableFileRequestOptions))
                {
                    serializer = new SerializableBlobRequestOptions();
                }

                serializer.RequestOptions = requestOptions;
            }
        }