refactor: Move Exception utils to Spark.Core.Diagnostics ns
This commit is contained in:
1 parent
5d318b6422
commit
aacd22d496
66 files changed
+113
-99
No files matched your search
@@ -2,8 +2,7 @@ namespace bts {
|
||||
using BCG;
|
||||
using BCG.Utilities.General;
|
||||
|
||||
using mbts.utils;
|
||||
|
||||
using Spark.Core.Diagnostics;
|
||||
using Spark.Core.Disposables;
|
||||
|
||||
using System;
|
||||
|
||||
@@ -2,7 +2,7 @@ using bts;
|
||||
|
||||
using Bts.DataStreamCore;
|
||||
|
||||
using mbts.utils;
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Bts.DataStreamCore;
|
||||
|
||||
using mbts.utils;
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
using BCG.Utilities.General;
|
||||
using BCG.Utilities.General;
|
||||
|
||||
using bts;
|
||||
|
||||
using mbts.utils;
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
|
||||
@@ -3,8 +3,7 @@ namespace Bts.DataStreamCore;
|
||||
|
||||
using BCG;
|
||||
|
||||
using mbts.utils;
|
||||
|
||||
using Spark.Core.Diagnostics;
|
||||
using Spark.Core.Disposables;
|
||||
|
||||
using System;
|
||||
|
||||
@@ -3,10 +3,10 @@ using bts;
|
||||
using Bts.PubSub;
|
||||
using Bts.PubSub.Routing;
|
||||
|
||||
using mbts.utils;
|
||||
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -49,7 +49,9 @@ namespace BCG {
|
||||
|
||||
public RemoteConnectionInfo get_pub_route_for_tag(string tag) {
|
||||
if (!_pub_routes.TryGetFirst(r => r?.IsMatch(tag) ?? false, out var route)) {
|
||||
Log.assert(false, $"Failed to find route for tag '{tag}'", nameof(tag));
|
||||
var msg = $"Failed to find route for tag '{tag}'";
|
||||
Log.assert(false, msg);
|
||||
throw new ArgumentException(msg, nameof(tag));
|
||||
}
|
||||
Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {JsonSerializer.Serialize(route)}");
|
||||
ArgumentNullException.ThrowIfNull(route.ServerAddress);
|
||||
@@ -58,7 +60,9 @@ namespace BCG {
|
||||
|
||||
public RemoteConnectionInfo get_sub_route_for_tag(string tag) {
|
||||
if (!_sub_routes.TryGetFirst(r => r?.IsMatch(tag) ?? false, out var route)) {
|
||||
Log.assert(false, $"Failed to find route for tag '{tag}'", nameof(tag));
|
||||
var msg = $"Failed to find route for tag '{tag}'";
|
||||
Log.assert(false, msg);
|
||||
throw new ArgumentException(msg, nameof(tag));
|
||||
}
|
||||
Log.Gen.info($"PubSubRouter.get_sub_url_for_tag tag: {tag} route: {JsonSerializer.Serialize(route)}");
|
||||
ArgumentNullException.ThrowIfNull(route.ServerAddress);
|
||||
|
||||
@@ -20,23 +20,17 @@
|
||||
/// to detect it.
|
||||
/// </summary>
|
||||
|
||||
using BCG;
|
||||
using BCG.Utilities.General;
|
||||
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.IO;
|
||||
using BCG.Utilities.General;
|
||||
using System.Runtime.InteropServices;
|
||||
using BCG;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using Bts.PubSub;
|
||||
using Spark.Core;
|
||||
using mbts.utils;
|
||||
|
||||
namespace bts
|
||||
{
|
||||
public class AsyncTCPConnection_APM : ITCPConnection, IWorker, IDisposable
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
using System;
|
||||
//using System.Messaging;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.IO;
|
||||
|
||||
using mbts;
|
||||
using System.Linq.Expressions;
|
||||
using bts;
|
||||
using mbts.utils;
|
||||
using bts.collections;
|
||||
using Bts.PubSub;
|
||||
using Bts.PubSub.Server;
|
||||
|
||||
using mbts;
|
||||
|
||||
using Spark.Core.Diagnostics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BCG {
|
||||
/// <summary>
|
||||
/// Mantains all the state that there is in the server.
|
||||
|
||||
Reference in new issue
Block a user