Skip to content

Commit e7275af

Browse files
committed
2 parents baf8e22 + 46744d4 commit e7275af

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

4.8.1/Numerics/Numerics.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,16 @@
8484
<Reference Include="System.IO.Compression.FileSystem" />
8585
<Reference Include="System.Numerics" />
8686
<Reference Include="System.Runtime.Serialization" />
87+
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
88+
<HintPath>..\..\8.0\packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
89+
</Reference>
90+
<Reference Include="System.Text.Json, Version=8.0.0.3, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL" />
91+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
92+
<HintPath>..\..\8.0\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
93+
</Reference>
94+
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
95+
<HintPath>..\..\8.0\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
96+
</Reference>
8797
<Reference Include="System.Xml" />
8898
<Reference Include="System.Xml.Linq" />
8999
</ItemGroup>

4.8.1/Numerics/Utilities/SafeProgressReporter.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,15 +204,15 @@ protected void SetContext(SynchronizationContext context)
204204
/// </summary>
205205
public void IndicateTaskStart()
206206
{
207-
_synchronizationContext.Post(new SendOrPostCallback(state => TaskStarted?.Invoke()), null);
207+
_synchronizationContext?.Post(new SendOrPostCallback(state => TaskStarted?.Invoke()), null);
208208
}
209209

210210
/// <summary>
211211
/// Indicate that the task has ended.
212212
/// </summary>
213213
public void IndicateTaskEnded()
214214
{
215-
_synchronizationContext.Post(new SendOrPostCallback(state => TaskEnded?.Invoke()), null);
215+
_synchronizationContext?.Post(new SendOrPostCallback(state => TaskEnded?.Invoke()), null);
216216
}
217217

218218
/// <summary>
@@ -312,7 +312,7 @@ public SafeProgressReporter CreateProgressModifier(float fractionOfTotal, string
312312
child._cancellationTokenSource = _cancellationTokenSource;
313313
_subProgReporterCollection.Add(child);
314314
var invokeChildCreatedHandlers = new SendOrPostCallback(state => ChildReporterCreated?.Invoke(child));
315-
_synchronizationContext.Post(invokeChildCreatedHandlers, child);
315+
_synchronizationContext?.Post(invokeChildCreatedHandlers, child);
316316
return child;
317317
}
318318

@@ -335,7 +335,7 @@ public void Report(double progress, string message, MessageType messageType)
335335
public void ReportProgress(double progress)
336336
{
337337
if (_previousProgress == progress) return;
338-
_synchronizationContext.Post(_invokeProgressHandlers, new double[] { progress, _previousProgress });
338+
_synchronizationContext?.Post(_invokeProgressHandlers, new double[] { progress, _previousProgress });
339339
_previousProgress = progress;
340340
}
341341

@@ -346,7 +346,7 @@ public void ReportProgress(double progress)
346346
/// <param name="messageType">The message type.</param>
347347
public void ReportMessage(string message, MessageType messageType = MessageType.Status)
348348
{
349-
_synchronizationContext.Post(_invokeMessageHandlers, new MessageContentStruct(message, messageType, this));
349+
_synchronizationContext?.Post(_invokeMessageHandlers, new MessageContentStruct(message, messageType, this));
350350
MessageCount += 1;
351351
_previousMessage = message;
352352
_previousMessageType = messageType;
@@ -358,7 +358,7 @@ public void ReportMessage(string message, MessageType messageType = MessageType.
358358
/// <param name="message">The message to report.</param>
359359
protected void ReportMessage(MessageContentStruct message)
360360
{
361-
_synchronizationContext.Post(_invokeMessageHandlers, message);
361+
_synchronizationContext?.Post(_invokeMessageHandlers, message);
362362
MessageCount += 1;
363363
_previousMessage = message.Message;
364364
_previousMessageType = message.MessageType;

4.8.1/Test_Numerics/Test_Numerics.csproj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@
208208
<ItemGroup>
209209
<None Include="packages.config" />
210210
</ItemGroup>
211-
<ItemGroup>
212-
<ProjectReference Include="..\Numerics\Numerics.csproj">
213-
<Project>{fcafbc53-72c3-0f70-07f2-e14a0fdaff8d}</Project>
214-
<Name>Numerics</Name>
215-
</ProjectReference>
216-
</ItemGroup>
217211
<ItemGroup />
218212
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
219213
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

0 commit comments

Comments
 (0)