Skip to content

Commit 5f1ab61

Browse files
committed
Add the IProgress<T> interface for provider interface callbacks
1 parent 4901c3a commit 5f1ab61

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/corelib/Core/IProgress`1.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
namespace net.openstack.Core
2+
{
3+
/// <summary>
4+
/// Defines a provider for progress updates.
5+
/// </summary>
6+
/// <typeparam name="T">The type of progress update value.</typeparam>
7+
/// <preliminary/>
8+
public interface IProgress<
9+
#if NET35
10+
T
11+
#else
12+
in T
13+
#endif
14+
>
15+
{
16+
/// <summary>
17+
/// Reports a progress update.
18+
/// </summary>
19+
/// <param name="value">The value of the updated progress.</param>
20+
void Report(T value);
21+
}
22+
}

src/corelib/corelib.v3.5.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
<Compile Include="Core\Exceptions\VolumeEnteredErrorStateException.cs" />
110110
<Compile Include="Core\ExtensibleEnum`1.cs" />
111111
<Compile Include="Core\InternalTaskExtensions.cs" />
112+
<Compile Include="Core\IProgress`1.cs" />
112113
<Compile Include="Core\NamespaceDoc.cs" />
113114
<Compile Include="Core\ParallelExtensionsExtras\TaskCompletionSourceExtensions.cs" />
114115
<Compile Include="Core\ParallelExtensionsExtras\TaskExtrasExtensions.cs" />

src/corelib/corelib.v4.0.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
<Compile Include="Core\Exceptions\VolumeEnteredErrorStateException.cs" />
100100
<Compile Include="Core\ExtensibleEnum`1.cs" />
101101
<Compile Include="Core\InternalTaskExtensions.cs" />
102+
<Compile Include="Core\IProgress`1.cs" />
102103
<Compile Include="Core\NamespaceDoc.cs" />
103104
<Compile Include="Core\ParallelExtensionsExtras\TaskCompletionSourceExtensions.cs" />
104105
<Compile Include="Core\ParallelExtensionsExtras\TaskExtrasExtensions.cs" />

0 commit comments

Comments
 (0)