Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Sources/Core/Microsoft.StreamProcessing/Aggregates/MinMaxState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,35 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License
// *********************************************************************
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace Microsoft.StreamProcessing.Internal
{
/// <summary>
/// The value representation with its timestamp.
/// </summary>
/// <typeparam name="T">The type of the underlying elements being aggregated.</typeparam>
[DataContract]
[EditorBrowsable(EditorBrowsableState.Never)]
public struct ValueAndTimestamp<T>
{
/// <summary>
/// The timestamp of the payload.
/// </summary>
[DataMember]
[EditorBrowsable(EditorBrowsableState.Never)]
public long timestamp;

/// <summary>
/// Payload of the event
/// </summary>
[DataMember]
[EditorBrowsable(EditorBrowsableState.Never)]
public T value;
}

/// <summary>
/// The state object used in minimum and maximum aggregates.
/// </summary>
Expand All @@ -22,6 +46,13 @@ public struct MinMaxState<T>
[EditorBrowsable(EditorBrowsableState.Never)]
public SortedMultiSet<T> savedValues;

/// <summary>
/// List of values and its timestamp
/// </summary>
[DataMember]
[EditorBrowsable(EditorBrowsableState.Never)]
public ElasticCircularBuffer<ValueAndTimestamp<T>> values;

/// <summary>
/// The current value if the aggregate were to be computed immediately.
/// </summary>
Expand Down

This file was deleted.

This file was deleted.

Loading