public CheckRecordHandlingResult DeepCloneWithStreamRepresentation(IStreamRepresentation streamRepresentation)
        {
            var result = new CheckRecordHandlingResult(
                streamRepresentation,
                this.InternalRecordIdToHandlingStatusMap?.DeepClone());

            return(result);
        }
Example #2
0
        public CheckRecordExistsResult DeepCloneWithStreamRepresentation(IStreamRepresentation streamRepresentation)
        {
            var result = new CheckRecordExistsResult(
                streamRepresentation,
                this.RecordExists.DeepClone());

            return(result);
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckRecordExistsResult"/> class.
        /// </summary>
        /// <param name="streamRepresentation">Stream results are from.</param>
        /// <param name="recordExists">A value indicating whether the stream has records matching the filter used.</param>
        public CheckRecordExistsResult(
            IStreamRepresentation streamRepresentation,
            bool recordExists)
        {
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();

            this.StreamRepresentation = streamRepresentation;
            this.RecordExists         = recordExists;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckRecordHandlingResult"/> class.
        /// </summary>
        /// <param name="streamRepresentation">Stream results are from.</param>
        /// <param name="internalRecordIdToHandlingStatusMap">The map of the handling concern to <see cref="HandlingStatus"/>.</param>
        public CheckRecordHandlingResult(
            IStreamRepresentation streamRepresentation,
            IReadOnlyDictionary <long, HandlingStatus> internalRecordIdToHandlingStatusMap)
        {
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();
            internalRecordIdToHandlingStatusMap.MustForArg(nameof(internalRecordIdToHandlingStatusMap)).NotBeNullNorEmptyDictionary();

            this.StreamRepresentation = streamRepresentation;
            this.InternalRecordIdToHandlingStatusMap = internalRecordIdToHandlingStatusMap;
        }
        public CheckRecordHandlingOp DeepCloneWithStreamRepresentation(IStreamRepresentation streamRepresentation)
        {
            var result = new CheckRecordHandlingOp(
                streamRepresentation,
                this.Concern?.DeepClone(),
                this.RecordFilter?.DeepClone(),
                this.HandlingFilter?.DeepClone());

            return(result);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckRecordExistsOp"/> class.
        /// </summary>
        /// <param name="streamRepresentation">The <see cref="IStreamRepresentation"/> to resolve the <see cref="IStream"/> to check handling on.</param>
        /// <param name="recordFilter">The filter for the records to examine.</param>
        public CheckRecordExistsOp(
            IStreamRepresentation streamRepresentation,
            RecordFilter recordFilter)
        {
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();
            recordFilter.MustForArg(nameof(recordFilter)).NotBeNull();

            this.StreamRepresentation = streamRepresentation;
            this.RecordFilter         = recordFilter;
        }
        public RecordFilterEntry DeepCloneWithStreamRepresentation(IStreamRepresentation streamRepresentation)
        {
            var result = new RecordFilterEntry(
                this.Id?.DeepClone(),
                streamRepresentation,
                this.RecordFilter?.DeepClone(),
                this.RequiredForReaction.DeepClone(),
                this.IncludeInReaction.DeepClone());

            return(result);
        }
Example #8
0
        public EventToPutWithId <TId> DeepCloneWithStreamRepresentation(IStreamRepresentation streamRepresentation)
        {
            var result = new EventToPutWithId <TId>(
                this.Id == null ? default : this.Id.DeepClone(),
                this.EventToPut?.DeepClone(),
                streamRepresentation,
                this.UpdateTimestampOnPut.DeepClone(),
                this.Tags?.DeepClone());

            return(result);
        }
        public EventToPutWithId(
            TId id,
            IEvent eventToPut,
            IStreamRepresentation streamRepresentation,
            bool updateTimestampOnPut = true,
            IReadOnlyCollection <NamedValue <string> > tags = null)
        {
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();
            eventToPut.MustForArg(nameof(eventToPut)).NotBeNull();

            this.Id                   = id;
            this.EventToPut           = eventToPut;
            this.StreamRepresentation = streamRepresentation;
            this.UpdateTimestampOnPut = updateTimestampOnPut;
            this.Tags                 = tags;
        }
Example #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CheckRecordHandlingOp"/> class.
        /// </summary>
        /// <param name="streamRepresentation">The <see cref="IStreamRepresentation"/> to resolve the <see cref="IStream"/> to check handling on.</param>
        /// <param name="concern">The concerns that require handling.</param>
        /// <param name="recordFilter">The filter for the records to examine.</param>
        /// <param name="handlingFilter">The filter for the handling entries to examine.</param>
        public CheckRecordHandlingOp(
            IStreamRepresentation streamRepresentation,
            string concern,
            RecordFilter recordFilter,
            HandlingFilter handlingFilter)
        {
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();
            concern.MustForArg(nameof(concern)).NotBeNullNorWhiteSpace();
            recordFilter.MustForArg(nameof(recordFilter)).NotBeNull();
            handlingFilter.MustForArg(nameof(handlingFilter)).NotBeNull();

            this.StreamRepresentation = streamRepresentation;
            this.Concern        = concern;
            this.RecordFilter   = recordFilter;
            this.HandlingFilter = handlingFilter;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="RecordFilterEntry"/> class.
        /// </summary>
        /// <param name="id">The identifier of the entry.</param>
        /// <param name="streamRepresentation">The stream representation.</param>
        /// <param name="recordFilter">The record filter.</param>
        /// <param name="requiredForReaction">if set to <c>true</c> [required for reaction].</param>
        /// <param name="includeInReaction">if set to <c>true</c> [include in reaction].</param>
        public RecordFilterEntry(
            string id,
            IStreamRepresentation streamRepresentation,
            RecordFilter recordFilter,
            bool requiredForReaction,
            bool includeInReaction)
        {
            id.MustForArg(nameof(id)).NotBeNullNorWhiteSpace();
            streamRepresentation.MustForArg(nameof(streamRepresentation)).NotBeNull();
            recordFilter.MustForArg(nameof(recordFilter)).NotBeNull();

            this.Id = id;
            this.StreamRepresentation = streamRepresentation;
            this.RecordFilter         = recordFilter;
            this.RequiredForReaction  = requiredForReaction;
            this.IncludeInReaction    = includeInReaction;
        }