Пример #1
0
        /// <summary>Creates baseline distributing request context.</summary>
        /// <param name="endpoint">The endpoint.</param>
        /// <param name="elementId">Identifier for the element.</param>
        /// <param name="requestId">Identifier for the request.</param>
        /// <param name="sessionId">Identifier for the session.</param>
        /// <param name="distributionAttributes">The distribution attributes.</param>
        /// <param name="incremental">True if the request is incremental.</param>
        /// <param name="baselineVersion">The baseline version.</param>
        /// <param name="baselineActivationDate">Date of the baseline activation.</param>
        /// <param name="baselineExpirationDate">Date of the baseline expiration.</param>
        /// <returns>The new baseline distributing request context.</returns>
        public IRequestContext CreateBaselineDistributingRequestContext(string endpoint, string elementId, Guid requestId, Guid sessionId, BaselineDistributionAttributes distributionAttributes, bool incremental, string baselineVersion, DateTime baselineActivationDate, DateTime baselineExpirationDate)
        {
            BaselineDistributingRequestContext requestContext   = new BaselineDistributingRequestContext(endpoint, elementId, requestId, sessionId, distributionAttributes, incremental, baselineVersion, baselineActivationDate, baselineExpirationDate);
            IRequestContextProcessor           requestProcessor = new BaselineDistributingRequestContextProcessor(_remoteDataStoreFactory, _t2gManager, _baselineStatusUpdater);

            requestContext.RequestProcessor = requestProcessor;
            return(requestContext);
        }
Пример #2
0
        /// <summary>Creates baseline distributing request context.</summary>
        /// <param name="elementId">Identifier for the element.</param>
        /// <param name="requestId">Identifier for the request.</param>
        /// <param name="transferMode">The transfer mode.</param>
        /// <param name="fileCompression">True if file compression is used.</param>
        /// <param name="isIncremental">True if this request is incremental.</param>
        /// <param name="transferDate">Date of the transfer.</param>
        /// <param name="transferExpirationDate">Date of the transfer expiration.</param>
        /// <param name="priority">The priority.</param>
        /// <param name="baselineVersion">The baseline version.</param>
        /// <param name="baselineActivationDate">Date of the baseline activation.</param>
        /// <param name="baselineExpirationDate">Date of the baseline expiration.</param>
        /// <returns>The new baseline distributing request context.</returns>
        public IRequestContext CreateBaselineDistributingRequestContext(string elementId, Guid requestId, Core.Data.FileTransferMode transferMode, bool fileCompression, bool isIncremental, DateTime transferDate, DateTime transferExpirationDate, sbyte priority, string baselineVersion, DateTime baselineActivationDate, DateTime baselineExpirationDate)
        {
            BaselineDistributionAttributes distributionAttributes = new BaselineDistributionAttributes();

            distributionAttributes.fileCompression        = fileCompression;
            distributionAttributes.priority               = priority;
            distributionAttributes.transferDate           = transferDate;
            distributionAttributes.transferExpirationDate = transferExpirationDate;
            distributionAttributes.TransferMode           = transferMode;

            BaselineDistributingRequestContext requestContext   = new BaselineDistributingRequestContext(null, elementId, requestId, Guid.Empty, distributionAttributes, isIncremental, baselineVersion, baselineActivationDate, baselineExpirationDate);
            IRequestContextProcessor           requestProcessor = new BaselineDistributingRequestContextProcessor(_remoteDataStoreFactory, _t2gManager, _baselineStatusUpdater);

            requestContext.RequestProcessor = requestProcessor;
            return(requestContext);
        }