##// END OF EJS Templates
Fixed promise rejection when there is not specified error handler in the reaction....
cin -
r295:28af686e24f7 default
parent child
Show More
@@ -1,29 +1,28
1 1 <Project Sdk="Microsoft.NET.Sdk">
2 <PropertyGroup Condition="'$(OSTYPE)'=='linux'">
3 <TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
4 <FrameworkPathOverride Condition="'$(TargetFramework)'=='net46'">/usr/lib/mono/4.5/</FrameworkPathOverride>
5 </PropertyGroup>
2 <PropertyGroup>
3 <TargetFramework>net5.0</TargetFramework>
6 4
7 <PropertyGroup Condition="'$(OSTYPE)'=='windows'">
8 <TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
9 </PropertyGroup>
10
11 <PropertyGroup>
12 5 <IsPackable>false</IsPackable>
13 6 </PropertyGroup>
14 7
15 8 <ItemGroup>
16 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0-preview-20180109-01" />
9 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
10 <PackageReference Include="xunit" Version="2.4.1" />
11 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
12 <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13 <PrivateAssets>all</PrivateAssets>
14 </PackageReference>
15 <PackageReference Include="coverlet.collector" Version="1.3.0">
16 <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
17 <PrivateAssets>all</PrivateAssets>
18 </PackageReference>
17 19 <PackageReference Include="System.Reactive" Version="4.0.0" />
18 <PackageReference Include="xunit" Version="2.3.1" />
19 <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
20 20 <ProjectReference Include="../Implab/Implab.csproj"/>
21 21 <ProjectReference Include="../Implab.ServiceHost/Implab.ServiceHost.csproj"/>
22 <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
23 22 </ItemGroup>
24 23
25 24 <ItemGroup>
26 25 <None Include="data/**/*.*" CopyToOutputDirectory="PreserveNewest" />
27 26 </ItemGroup>
28 27
29 </Project>
28 </Project> No newline at end of file
@@ -6,11 +6,11
6 6 <Description>The configurable application host.
7 7 Provides simple and flexible Xml configuration for UnityContainer.
8 8 </Description>
9 <Copyright>2012-2018 Sergey Smirnov</Copyright>
10 <Version>1.0.3</Version>
11 <PackageLicenseUrl>https://bitbucket.org/wozard/implabnet/src/v3/Implab/license.txt</PackageLicenseUrl>
12 <PackageProjectUrl>https://bitbucket.org/wozard/implabnet</PackageProjectUrl>
13 <RepositoryUrl>https://bitbucket.org/wozard/implabnet</RepositoryUrl>
9 <Copyright>2012-2021 Sergey Smirnov</Copyright>
10 <Version>1.0.4</Version>
11 <PackageLicenseUrl>https://code.implab.org/implab/ImplabNet/files/default/Implab/license.txt</PackageLicenseUrl>
12 <PackageProjectUrl>https://code.implab.org/implab/ImplabNet/</PackageProjectUrl>
13 <RepositoryUrl>https://code.implab.org/implab/ImplabNet/</RepositoryUrl>
14 14 <RepositoryType>mercurial</RepositoryType>
15 15 <PackageTags>Implab;Xml configuration;IoC;Unity container</PackageTags>
16 16 </PropertyGroup>
@@ -1,7 +1,6
1 1 using System;
2 2 using System.Xml.Serialization;
3 3 using Unity.Lifetime;
4 using Unity.Registration;
5 4
6 5 namespace Implab.ServiceHost.Unity
7 6 {
@@ -18,7 +17,7 namespace Implab.ServiceHost.Unity
18 17 get; set;
19 18 }
20 19
21 [XmlElement("signleton", typeof(SingletonLifetimeElement))]
20 [XmlElement("singleton", typeof(SingletonLifetimeElement))]
22 21 [XmlElement("context", typeof(ContextLifetimeElement))]
23 22 [XmlElement("container", typeof(ContainerLifetimeElement))]
24 23 [XmlElement("hierarchy", typeof(HierarchicalLifetimeElement))]
@@ -1,7 +1,4
1 1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using System.Reflection;
5 2 using System.Xml;
6 3 using System.Xml.Serialization;
7 4 using Implab.Components;
@@ -8,7 +8,7 namespace Implab.ServiceHost.Unity {
8 8 [XmlAttribute("name")]
9 9 public string RegistrationName { get; set; }
10 10
11 [XmlElement("signleton", typeof(SingletonLifetimeElement))]
11 [XmlElement("singleton", typeof(SingletonLifetimeElement))]
12 12 [XmlElement("context", typeof(ContextLifetimeElement))]
13 13 [XmlElement("container", typeof(ContainerLifetimeElement))]
14 14 [XmlElement("hierarchy", typeof(HierarchicalLifetimeElement))]
@@ -1,7 +1,6
1 1 using Unity.Lifetime;
2 2
3 namespace Implab.ServiceHost.Unity
4 {
3 namespace Implab.ServiceHost.Unity {
5 4 public class SingletonLifetimeElement : LifetimeElement {
6 5 public override LifetimeManager GetLifetime(ContainerBuilder builder) {
7 6 return new SingletonLifetimeManager();
@@ -1,24 +1,24
1 1 <Project Sdk="Microsoft.NET.Sdk">
2 <PropertyGroup Condition="'$(OSTYPE)'=='linux'">
3 <TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
4 <FrameworkPathOverride Condition="'$(TargetFramework)'=='net46'">/usr/lib/mono/4.5/</FrameworkPathOverride>
5 </PropertyGroup>
2 <PropertyGroup>
3 <TargetFramework>net5.0</TargetFramework>
6 4
7 <PropertyGroup Condition="'$(OSTYPE)'=='windows'">
8 <TargetFrameworks>netcoreapp2.0;net46</TargetFrameworks>
9 </PropertyGroup>
10
11 <PropertyGroup>
12 5 <IsPackable>false</IsPackable>
13 6 </PropertyGroup>
14 7
15 8 <ItemGroup>
16 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.0-preview-20180109-01" />
9 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
10 <PackageReference Include="xunit" Version="2.4.1" />
11 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
12 <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
13 <PrivateAssets>all</PrivateAssets>
14 </PackageReference>
15 <PackageReference Include="coverlet.collector" Version="1.3.0">
16 <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
17 <PrivateAssets>all</PrivateAssets>
18 </PackageReference>
19
17 20 <PackageReference Include="System.Reactive" Version="4.0.0" />
18 <PackageReference Include="xunit" Version="2.3.1" />
19 <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
20 21 <ProjectReference Include="../Implab/Implab.csproj"/>
21 <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
22 22 </ItemGroup>
23 23
24 24 </Project>
@@ -7,8 +7,8
7 7 JSON pull-parser, ECMA-style promises, lightweight synchonization routines Signal
8 8 and SharedLock, Trace helpers on top of System.Diagnostics, ObjectPool etc.
9 9 </Description>
10 <Copyright>2012-2018 Sergey Smirnov</Copyright>
11 <Version>3.0.14</Version>
10 <Copyright>2012-2021 Sergey Smirnov</Copyright>
11 <Version>3.0.16</Version>
12 12 <PackageLicenseUrl>https://bitbucket.org/wozard/implabnet/src/v3/Implab/license.txt</PackageLicenseUrl>
13 13 <PackageProjectUrl>https://bitbucket.org/wozard/implabnet</PackageProjectUrl>
14 14 <RepositoryUrl>https://bitbucket.org/wozard/implabnet</RepositoryUrl>
@@ -20,7 +20,7
20 20 </PropertyGroup>
21 21
22 22 <ItemGroup>
23 <EmbeddedResource Include="src\Xml\json.xsl"/>
23 <EmbeddedResource LogicalName="Implab.Xml.json.xsl" Include="src\Xml\json.xsl"/>
24 24 </ItemGroup>
25 25
26 26 </Project>
@@ -1,8 +1,6
1 1 using System;
2 2 using Implab.Parallels;
3 3 using System.Threading;
4 using System.Reflection;
5 using System.Diagnostics;
6 4
7 5 namespace Implab {
8 6 /// <summary>
@@ -1,8 +1,4
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
1 using System.Collections.Generic;
6 2
7 3 namespace Implab.Automaton {
8 4 /// <summary>
@@ -1,5 +1,4
1 using System;
2 using System.Collections.Generic;
1 using System.Collections.Generic;
3 2
4 3 namespace Implab.Automaton {
5 4 public interface IDFATableBuilder : IDFATable, ICollection<AutomatonTransition> {
@@ -1,8 +1,5
1 using Implab;
2 using System;
1 using System;
3 2 using System.Collections.Generic;
4 using System.Diagnostics;
5 using System.Linq;
6 3
7 4 namespace Implab.Automaton {
8 5 /// <summary>
@@ -1,9 +1,5
1 using Implab;
2 using System;
1 using System;
3 2 using System.Collections.Generic;
4 using System.Linq;
5 using System.Text;
6 using System.Threading.Tasks;
7 3
8 4 namespace Implab {
9 5 /// <summary>
@@ -2,12 +2,11
2 2 #define TRACE
3 3
4 4 using System;
5 using System.Collections.Generic;
6 5 using System.Diagnostics;
7 using System.Linq;
8 using System.Text;
6
7 #if NETFX_TRACE_BUG
9 8 using System.Threading;
10 using System.Threading.Tasks;
9 #endif
11 10
12 11 namespace Implab.Diagnostics {
13 12 /// <summary>
@@ -1,6 +1,5
1 1 using System;
2 2 using System.Collections.Generic;
3 using System.Diagnostics;
4 3 using Implab.Parallels;
5 4
6 5 namespace Implab.Diagnostics {
@@ -1,6 +1,5
1 1 using System;
2 2 using System.Threading;
3 using TraceSource = System.Diagnostics.TraceSource;
4 3
5 4 namespace Implab.Diagnostics {
6 5 /// <summary>
@@ -1,10 +1,7
1 1 using Implab.Automaton;
2 using System;
3 2 using System.Collections.Generic;
4 3 using System.Linq;
5 4 using System.Runtime.CompilerServices;
6 using System.Text;
7 using System.Threading.Tasks;
8 5
9 6 namespace Implab.Formats {
10 7 public class CharMap : IAlphabet<char> {
@@ -1,11 +1,6
1 1 using Implab.Automaton;
2 using System;
3 using System.Collections.Generic;
4 2 using System.Diagnostics;
5 using System.Linq;
6 3 using System.Runtime.CompilerServices;
7 using System.Text;
8 using System.Threading.Tasks;
9 4
10 5 namespace Implab.Formats {
11 6
@@ -1,5 +1,4
1 using Implab;
2 using System;
1 using System;
3 2 using System.Collections.Generic;
4 3 using System.Linq;
5 4 using Implab.Automaton;
@@ -1,10 +1,5
1 1 using Implab.Automaton;
2 using System;
3 using System.Collections.Generic;
4 using System.Linq;
5 2 using System.Runtime.CompilerServices;
6 using System.Text;
7 using System.Threading.Tasks;
8 3
9 4 namespace Implab.Formats {
10 5 public class InputScanner<TTag> {
@@ -7,7 +7,6 using System.Linq;
7 7 using Implab.Components;
8 8 using System.Collections.Generic;
9 9 using System.Text;
10 using System.Globalization;
11 10
12 11 namespace Implab.Formats.Json {
13 12 /// <summary>
@@ -1,9 +1,6
1 using System;
2 using System.Globalization;
3 using Implab.Automaton;
1 using Implab.Automaton;
4 2 using System.Text;
5 3 using Implab.Components;
6 using System.IO;
7 4
8 5 namespace Implab.Formats.Json {
9 6 /// <summary>
@@ -1,8 +1,4
1 1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 2
7 3 namespace Implab.Formats.Json {
8 4 public class JsonStringScanner : JsonScanner {
@@ -1,9 +1,5
1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using System.Linq;
1 using System.IO;
5 2 using System.Text;
6 using System.Threading.Tasks;
7 3
8 4 namespace Implab.Formats.Json {
9 5 public class JsonTextScanner : JsonScanner {
@@ -1,11 +1,5
1 using Implab;
2 using Implab.Formats;
3 using System;
4 using System.Collections.Generic;
5 using System.Diagnostics;
1 using System.Diagnostics;
6 2 using System.Linq;
7 using System.Text;
8 using System.Threading.Tasks;
9 3
10 4 namespace Implab.Formats.Json {
11 5 /// <summary>
@@ -1,7 +1,4
1 1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 2
6 3 namespace Implab {
7 4 public interface IPromise {
@@ -1,6 +1,4
1 using System;
2
3 namespace Implab {
1 namespace Implab {
4 2 public interface IPromise<out T> : IPromise {
5 3
6 4 void Then(IResolvable<T> next);
@@ -2,7 +2,6
2 2 using System.Collections.Generic;
3 3 using System;
4 4 using System.Collections;
5 using System.Diagnostics;
6 5 using System.Runtime.CompilerServices;
7 6
8 7 namespace Implab.Parallels {
@@ -1,6 +1,5
1 1 using System;
2 2 using System.Threading;
3 using System.Diagnostics;
4 3
5 4 namespace Implab.Parallels {
6 5 /// <summary>
@@ -1,5 +1,4
1 using System;
2 using System.Threading;
1 using System.Threading;
3 2
4 3 namespace Implab.Parallels {
5 4 /// <summary>
@@ -1,6 +1,5
1 1 using System.Threading;
2 2 using System.Collections.Generic;
3 using System;
4 3 using System.Collections;
5 4
6 5 namespace Implab.Parallels {
@@ -39,7 +38,7 namespace Implab.Parallels {
39 38 public void Enqueue(T value) {
40 39 var next = new Node(value);
41 40
42 // Interlocaked.CompareExchange implies Thread.MemoryBarrier();
41 // Interlocked.CompareExchange implies Thread.MemoryBarrier();
43 42 // to ensure that the next node is completely constructed
44 43 var last = Interlocked.Exchange(ref m_last, next);
45 44
@@ -3,7 +3,6 using System.Collections.Generic;
3 3 using System.Diagnostics;
4 4 using System.Reflection;
5 5 using System.Threading;
6 using System.Threading.Tasks;
7 6 using Implab.Parallels;
8 7
9 8 namespace Implab {
@@ -1,5 +1,4
1 1 using System;
2 using System.Diagnostics;
3 2
4 3 namespace Implab {
5 4 class PromiseActionReaction : IResolvable {
@@ -39,7 +38,7 namespace Implab {
39 38 }
40 39
41 40 public void Reject(Exception error) {
42 if (m_fulfilled != null) {
41 if (m_rejected != null) {
43 42 if (m_dispatcher != null)
44 43 m_dispatcher.Enqueue(RejectImpl, error);
45 44 else
@@ -1,5 +1,4
1 1 using System;
2 using System.Diagnostics;
3 2
4 3 namespace Implab {
5 4 class PromiseActionReaction<T> : IResolvable<T> {
@@ -38,7 +37,7 namespace Implab {
38 37 }
39 38
40 39 public void Reject(Exception error) {
41 if (m_fulfilled != null) {
40 if (m_rejected != null) {
42 41 if (m_dispatcher != null)
43 42 m_dispatcher.Enqueue(RejectImpl, error);
44 43 else
@@ -1,8 +1,4
1 using System.Threading;
2 using System;
3 using Implab.Diagnostics;
4 using System.Collections.Generic;
5 using System.Linq;
1 using System;
6 2
7 3 namespace Implab {
8 4 public static class PromiseExtensions {
@@ -1,5 +1,4
1 1 using System;
2 using System.Diagnostics;
3 2
4 3 namespace Implab {
5 4 class PromiseFuncReaction<TRet> : IResolvable {
@@ -38,7 +37,7 namespace Implab {
38 37 }
39 38
40 39 public void Reject(Exception error) {
41 if (m_fulfilled != null) {
40 if (m_rejected != null) {
42 41 if (m_dispatcher != null)
43 42 m_dispatcher.Enqueue(RejectImpl, error);
44 43 else
@@ -1,5 +1,4
1 1 using System;
2 using System.Diagnostics;
3 2
4 3 namespace Implab {
5 4 class PromiseFuncReaction<TIn, TRet> : IResolvable<TIn> {
@@ -43,7 +42,7 namespace Implab {
43 42 }
44 43
45 44 public void Reject(Exception error) {
46 if (m_fulfilled != null) {
45 if (m_rejected != null) {
47 46 if (m_dispatcher != null)
48 47 m_dispatcher.Enqueue(RejectImpl, error);
49 48 else
@@ -1,5 +1,4
1 1 using System;
2 using System.Diagnostics;
3 2 using System.Reflection;
4 3 using Implab.Parallels;
5 4
@@ -1,7 +1,5
1 1 using System;
2 2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 3 using System.Text.RegularExpressions;
6 4 using System.Diagnostics;
7 5 using System.Collections;
@@ -13,8 +11,7 using System.Threading;
13 11 using System.Threading.Tasks;
14 12 #endif
15 13
16 namespace Implab
17 {
14 namespace Implab {
18 15 public static class Safe
19 16 {
20 17 [MethodImpl(MethodImplOptions.AggressiveInlining)]
@@ -1,9 +1,5
1 using System;
2
3 namespace Implab.Xml
4 {
5 public enum JsonXmlCaseTransform
6 {
1 namespace Implab.Xml {
2 public enum JsonXmlCaseTransform {
7 3 None,
8 4 UcFirst,
9 5 LcFirst
@@ -1,7 +1,6
1 1 using Implab.Formats.Json;
2 2 using System;
3 3 using System.Collections.Generic;
4 using System.Globalization;
5 4 using System.IO;
6 5 using System.Linq;
7 6 using System.Xml;
@@ -1,10 +1,4
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6
7 namespace Implab.Xml {
1 namespace Implab.Xml {
8 2 enum JsonXmlReaderPosition {
9 3 Initial,
10 4 Declaration,
@@ -1,10 +1,5
1 using System;
2 using System.Collections.Generic;
3 using System.IO;
4 using System.Linq;
1 using System.IO;
5 2 using System.Reflection;
6 using System.Text;
7 using System.Threading.Tasks;
8 3 using System.Xml;
9 4 using System.Xml.Linq;
10 5 using System.Xml.Serialization;
@@ -1,10 +1,6
1 1 using Implab.Components;
2 2 using System;
3 using System.Collections.Generic;
4 3 using System.IO;
5 using System.Linq;
6 using System.Text;
7 using System.Threading.Tasks;
8 4 using System.Xml;
9 5 using System.Xml.Serialization;
10 6
@@ -1,8 +1,5
1 1 using System;
2 2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 3 using System.Xml;
7 4
8 5 namespace Implab.Xml {
@@ -1,9 +1,4
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 using System.Xml;
1 using System.Xml;
7 2
8 3 namespace Implab.Xml {
9 4 public class XmlSimpleAttribute {
@@ -1,10 +1,8
1 using System;
2 1 using System.IO;
3 2 using System.Reflection;
4 3 using System.Xml;
5 4 using System.Xml.Xsl;
6 5 using Implab.Components;
7 using Implab.Formats.Json;
8 6
9 7 namespace Implab.Xml {
10 8 public class XmlToJson {
General Comments 0
You need to be logged in to leave comments. Login now