Merge branch 'curve-encoding-bug' of https://github.com/specklesystems/speckle-sharp-sdk into curve-encoding-bug

This commit is contained in:
Claire Kuang
2024-07-31 11:48:07 +01:00
136 changed files with 313 additions and 771 deletions
+2 -2
View File
@@ -6,8 +6,6 @@
<PackageVersion Include="Polly" Version="7.2.3" />
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />
<PackageVersion Include="Sentry" Version="3.33.0" />
<PackageVersion Include="Sentry.Serilog" Version="3.33.0" />
<PackageVersion Include="Serilog" Version="2.12.0" />
<PackageVersion Include="Serilog.Enrichers.ClientInfo" Version="1.3.0" />
<PackageVersion Include="Serilog.Exceptions" Version="8.4.0" />
@@ -28,6 +26,8 @@
<PackageVersion Include="Glob" Version="1.1.9" />
<PackageVersion Include="SimpleExec" Version="12.0.0" />
<PackageVersion Include="MongoDB.Driver" Version="2.19.2" />
<!-- this was the previous version used -->
<PackageVersion Include="System.Text.Json" Version="5.0.2" />
<GlobalPackageReference Include="PolySharp" Version="1.14.1" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<GlobalPackageReference Include="GitVersion.MsBuild" Version="5.12.0" />
+15
View File
@@ -12,6 +12,21 @@ const string TEST = "test";
const string INTEGRATION = "integration";
const string PACK = "pack";
const string PACK_LOCAL = "pack-local";
const string CLEAN_LOCKS = "clean-locks";
Target(
CLEAN_LOCKS,
() =>
{
foreach (var f in Glob.Files(".", "**/*.lock.json"))
{
Console.WriteLine("Found and will delete: " + f);
File.Delete(f);
}
Console.WriteLine("Running restore now.");
Run("dotnet", "restore .\\Speckle.Sdk.sln");
}
);
Target(
CLEAN,
-3
View File
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using GraphQL;
using Speckle.Core.Logging;
-15
View File
@@ -1,13 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Net.Http;
using System.Net.WebSockets;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL.Client.Http;
using Polly;
@@ -92,15 +86,6 @@ public sealed partial class Client : ISpeckleGraphQLClient, IDisposable
internal async Task<T> ExecuteWithResiliencePolicies<T>(Func<Task<T>> func)
{
// TODO: handle these in the HttpClient factory with a custom RequestHandler class
// 408 Request Timeout
// 425 Too Early
// 429 Too Many Requests
// 500 Internal Server Error
// 502 Bad Gateway
// 503 Service Unavailable
// 504 Gateway Timeout
var delay = Backoff.DecorrelatedJitterBackoffV2(TimeSpan.FromSeconds(1), 5);
var graphqlRetry = Policy
.Handle<SpeckleGraphQLInternalErrorException>()
@@ -1,9 +1,5 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL.Client.Http;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
namespace Speckle.Core.Api.GraphQL;
@@ -1,7 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
namespace Speckle.Core.Api.GraphQL;
@@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Inputs;
namespace Speckle.Core.Api.GraphQL.Inputs;
public sealed record CreateCommentInput(
CommentContentInput content,
@@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Inputs;
namespace Speckle.Core.Api.GraphQL.Inputs;
public sealed record CreateModelInput(string name, string? description, string projectId);
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Speckle.Core.Api.GraphQL.Enums;
using Speckle.Core.Api.GraphQL.Enums;
namespace Speckle.Core.Api.GraphQL.Inputs;
@@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Inputs;
namespace Speckle.Core.Api.GraphQL.Inputs;
public sealed record UpdateVersionInput(string versionId, string? message);
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
namespace Speckle.Core.Api;
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using Speckle.Core.Api.GraphQL.Resources;
@@ -1,6 +1,3 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using Speckle.Core.Api.GraphQL.Resources;
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using Speckle.Core.Api.GraphQL.Resources;
@@ -1,5 +1,3 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
namespace Speckle.Core.Api;
@@ -1,7 +1,4 @@
using System;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using Speckle.Core.Api.GraphQL.Models.Responses;
using Speckle.Core.Logging;
@@ -1,8 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Resources;
@@ -1,5 +1,4 @@
#nullable disable
using System;
using GraphQL;
using Speckle.Core.Api.SubscriptionModels;
@@ -1,5 +1,4 @@
#nullable disable
using System;
using GraphQL;
using Speckle.Core.Api.SubscriptionModels;
@@ -1,5 +1,4 @@
#nullable disable
using System;
using GraphQL;
using Speckle.Core.Api.SubscriptionModels;
@@ -1,6 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using Speckle.Core.Api.GraphQL.Enums;
using Speckle.Core.Api.GraphQL.Models;
@@ -1,6 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Speckle.Core.Api.GraphQL;
@@ -1,7 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
namespace Speckle.Core.Api.SubscriptionModels;
#region streams
@@ -1,6 +1,4 @@
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
namespace Speckle.Core.Api.GraphQL.Models;
public class ResourceCollection<T>
{
@@ -1,8 +1,5 @@
#nullable disable
using System;
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
public sealed class Comment
@@ -1,6 +1,5 @@
#nullable disable
using System;
using Speckle.Core.Api.GraphQL.Enums;
namespace Speckle.Core.Api.GraphQL.Models;
@@ -1,7 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
public sealed class Model
@@ -1,8 +1,5 @@
#nullable disable
using System;
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
public sealed class ModelsTreeItem
@@ -1,6 +1,4 @@
#nullable disable
using System;
namespace Speckle.Core.Api.GraphQL.Models;
public sealed class PendingStreamCollaborator
@@ -1,6 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using Speckle.Core.Api.GraphQL.Enums;
namespace Speckle.Core.Api.GraphQL.Models;
@@ -1,5 +1,4 @@
#nullable disable
using System;
using System.Runtime.InteropServices;
namespace Speckle.Core.Api.GraphQL.Models;
@@ -1,5 +1,4 @@
using System;
using Speckle.Core.Api.GraphQL.Enums;
using Speckle.Core.Api.GraphQL.Enums;
using Speckle.Newtonsoft.Json;
namespace Speckle.Core.Api.GraphQL.Models;
@@ -1,7 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
public abstract class UserBase
@@ -1,7 +1,5 @@
#nullable disable
using System;
namespace Speckle.Core.Api.GraphQL.Models;
public sealed class Version
@@ -1,7 +1,5 @@
#nullable disable
using System.Collections.Generic;
namespace Speckle.Core.Api.GraphQL.Models;
public class ViewerResourceGroup
@@ -1,7 +1,4 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
@@ -1,6 +1,4 @@
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL;
using Speckle.Core.Api.GraphQL.Inputs;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Api.GraphQL.Models.Responses;
@@ -1,7 +1,5 @@
#nullable disable
using System;
using System.Linq;
using System.Reflection;
using GraphQL.Client.Abstractions.Utilities;
using Speckle.Newtonsoft.Json;
@@ -1,8 +1,5 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using GraphQL;
using Speckle.Newtonsoft.Json;
using Speckle.Newtonsoft.Json.Linq;
@@ -1,9 +1,5 @@
#nullable disable
using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL.Client.Abstractions;
using GraphQL.Client.Abstractions.Websocket;
@@ -1,10 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Serilog.Context;
using Speckle.Core.Logging;
using Speckle.Core.Models;
@@ -1,10 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Serilog.Context;
using Speckle.Core.Logging;
using Speckle.Core.Models;
@@ -1,11 +1,6 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Serilog.Context;
using Speckle.Core.Logging;
using Speckle.Core.Models;
@@ -1,10 +1,5 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Serilog.Context;
using Speckle.Core.Logging;
using Speckle.Core.Models;
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Core.Serialisation;
@@ -1,6 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using Speckle.Core.Serialisation;
using Speckle.Newtonsoft.Json;
using Speckle.Newtonsoft.Json.Serialization;
@@ -52,4 +52,13 @@ public static class NotNullExtensions
}
return obj.Value;
}
public static IEnumerable<T> Empty<T>(this IEnumerable<T>? obj)
{
if (obj is null)
{
return Enumerable.Empty<T>();
}
return obj;
}
}
-2
View File
@@ -1,7 +1,5 @@
#nullable disable
using System;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Common;
using Speckle.Core.Helpers;
@@ -1,16 +1,9 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using GraphQL;
using GraphQL.Client.Http;
using Speckle.Core.Api;
@@ -1,4 +1,3 @@
using System;
using Speckle.Core.Logging;
namespace Speckle.Core.Credentials;
@@ -1,4 +1,3 @@
using System;
using System.Runtime.InteropServices;
using Speckle.Core.Api;
using Speckle.Core.Api.GraphQL.Models;
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web;
using Speckle.Core.Api;
using Speckle.Core.Common;
-1
View File
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.RegularExpressions;
-1
View File
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Security.Cryptography;
+12 -20
View File
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Threading;
using System.Threading.Tasks;
using Polly;
using Polly.Contrib.WaitAndRetry;
using Polly.Extensions.Http;
@@ -31,16 +26,10 @@ public static class Http
.HandleTransientHttpError()
.WaitAndRetryAsync(
delay ?? DefaultDelay(),
(ex, timeSpan, retryAttempt, context) => {
//context.Remove("retryCount");
//context.Add("retryCount", retryAttempt);
//Log.Information(
// ex.Exception,
// "The http request failed with {exceptionType} exception retrying after {cooldown} milliseconds. This is retry attempt {retryAttempt}",
// ex.GetType().Name,
// timeSpan.TotalSeconds * 1000,
// retryAttempt
//);
(ex, timeSpan, retryAttempt, context) =>
{
context.Remove("retryCount");
context.Add("retryCount", retryAttempt);
}
);
}
@@ -207,14 +196,16 @@ public sealed class SpeckleHttpClientHandler : HttpClientHandler
using (LogContext.PushProperty("httpMethod", request.Method))
{
SpeckleLog.Logger.Debug("Starting execution of http request to {targetUrl}", request.RequestUri);
var timer = new Stopwatch();
timer.Start();
var timer = Stopwatch.StartNew();
context.Add("retryCount", 0);
request.Headers.Add("x-request-id", context.CorrelationId.ToString());
var policyResult = await Http.HttpAsyncPolicy(_delay)
.ExecuteAndCaptureAsync(
ctx =>
{
request.Headers.Add("x-request-id", ctx.CorrelationId.ToString());
return base.SendAsync(request, cancellationToken);
},
context
@@ -226,14 +217,15 @@ public sealed class SpeckleHttpClientHandler : HttpClientHandler
SpeckleLog
.Logger.ForContext("ExceptionType", policyResult.FinalException?.GetType())
.Information(
"Execution of http request to {httpScheme}://{hostUrl}/{relativeUrl} {resultStatus} with {httpStatusCode} after {elapsed} seconds and {retryCount} retries",
"Execution of http request to {httpScheme}://{hostUrl}{relativeUrl} {resultStatus} with {httpStatusCode} after {elapsed} seconds and {retryCount} retries. Request correlation ID: {correlationId}",
request.RequestUri.Scheme,
request.RequestUri.Host,
request.RequestUri.PathAndQuery,
status,
policyResult.Result?.StatusCode,
timer.Elapsed.TotalSeconds,
retryCount ?? 0
retryCount ?? 0,
context.CorrelationId.ToString()
);
if (policyResult.Outcome == OutcomeType.Successful)
{
-2
View File
@@ -1,5 +1,3 @@
using System;
using System.IO;
using System.Reflection;
using Speckle.Core.Logging;
-2
View File
@@ -1,6 +1,4 @@
#nullable disable
using System;
namespace Speckle.Core.Helpers;
public class State<T> : IDisposable
-2
View File
@@ -1,6 +1,4 @@
#nullable disable
using System;
namespace Speckle.Core.Kits;
[AttributeUsage(AttributeTargets.Constructor)]
-1
View File
@@ -1,4 +1,3 @@
using System;
using Speckle.Core.Logging;
namespace Speckle.Core.Kits;
@@ -1,5 +1,4 @@
#nullable disable
using System.Collections.Generic;
using Speckle.Core.Models;
namespace Speckle.Core.Kits;
-3
View File
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
namespace Speckle.Core.Kits;
/// <summary>
-3
View File
@@ -1,7 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Speckle.Core.Models;
namespace Speckle.Core.Kits;
-4
View File
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Speckle.Core.Helpers;
using Speckle.Core.Logging;
-2
View File
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using Speckle.Core.Common;
-6
View File
@@ -1,16 +1,10 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.NetworkInformation;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Speckle.Core.Credentials;
using Speckle.Core.Helpers;
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Speckle.Core.Logging;
@@ -1,6 +1,4 @@
using System;
using System.Diagnostics.Contracts;
using System.Threading;
namespace Speckle.Core.Logging;
@@ -1,4 +1,3 @@
using System;
using System.Diagnostics;
namespace Speckle.Core.Logging;
-2
View File
@@ -1,8 +1,6 @@
#nullable disable
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using Speckle.Core.Credentials;
using Speckle.Core.Kits;
@@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using GraphQL;
using Sentry;
namespace Speckle.Core.Logging;
public class SpeckleException : Exception
-51
View File
@@ -1,9 +1,6 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using Sentry;
using Serilog;
using Serilog.Core;
using Serilog.Events;
@@ -37,11 +34,6 @@ public sealed class SpeckleLogConfiguration
/// </summary>
public bool LogToFile { get; }
/// <summary>
/// Flag to enable Sentry sink
/// </summary>
public bool LogToSentry { get; }
/// <summary>
/// Flag to enable Seq sink
/// </summary>
@@ -66,14 +58,12 @@ public sealed class SpeckleLogConfiguration
/// <param name="minimumLevel">Log events bellow this level are silently dropped</param>
/// <param name="logToConsole">Flag to enable console log sink</param>
/// <param name="logToSeq">Flag to enable Seq log sink</param>
/// <param name="logToSentry">Flag to enable Sentry log sink</param>
/// <param name="logToFile">Flag to enable File log sink</param>
/// <param name="enhancedLogContext">Flag to enable enhanced context on every log event</param>
public SpeckleLogConfiguration(
LogEventLevel minimumLevel = LogEventLevel.Debug,
bool logToConsole = true,
bool logToSeq = true,
bool logToSentry = true,
bool logToFile = true,
bool enhancedLogContext = true,
string sentryDns = DEFAULT_SENTRY_DNS
@@ -82,7 +72,6 @@ public sealed class SpeckleLogConfiguration
MinimumLevel = minimumLevel;
LogToConsole = logToConsole;
LogToSeq = logToSeq;
LogToSentry = logToSentry;
LogToFile = logToFile;
EnhancedLogContext = enhancedLogContext;
SentryDns = sentryDns;
@@ -139,17 +128,6 @@ public static class SpeckleLog
var id = GetUserIdFromDefaultAccount();
s_logger = s_logger.ForContext("id", id).ForContext("isMachineId", s_isMachineIdUsed);
// Configure scope after logger created.
SentrySdk.ConfigureScope(scope =>
{
scope.User = new User { Id = id };
});
SentrySdk.ConfigureScope(scope =>
{
scope.SetTag("hostApplication", hostApplicationName);
});
Logger
.ForContext("userApplicationDataPath", SpecklePathProvider.UserApplicationDataPath())
.ForContext("installApplicationDataPath", SpecklePathProvider.InstallApplicationDataPath)
@@ -223,35 +201,6 @@ public static class SpeckleLog
);
}
if (logConfiguration.LogToSentry)
{
const string ENV =
#if DEBUG
"dev";
#else
"production";
#endif
serilogLogConfiguration = serilogLogConfiguration.WriteTo.Sentry(o =>
{
o.Dsn = logConfiguration.SentryDns;
o.Debug = false;
o.Environment = ENV;
o.Release = "SpeckleCore@" + Assembly.GetExecutingAssembly().GetName().Version;
o.AttachStacktrace = true;
o.StackTraceMode = StackTraceMode.Enhanced;
// Set traces_sample_rate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
o.TracesSampleRate = 1.0;
// Enable Global Mode if running in a client app
o.IsGlobalModeEnabled = true;
// Debug and higher are stored as breadcrumbs (default is Information)
o.MinimumBreadcrumbLevel = LogEventLevel.Debug;
// Warning and higher is sent as event (default is Error)
o.MinimumEventLevel = LogEventLevel.Error;
});
}
var logger = serilogLogConfiguration.CreateLogger();
if (logConfiguration.LogToFile && !canLogToFile)
@@ -1,5 +1,3 @@
using System;
namespace Speckle.Core.Logging;
/// <summary>
@@ -1,6 +1,4 @@
#nullable disable
using System.Collections.Generic;
using System.Linq;
using Speckle.Newtonsoft.Json;
namespace Speckle.Core.Models;
-2
View File
@@ -1,5 +1,3 @@
using System;
namespace Speckle.Core.Models;
/// <summary>
-3
View File
@@ -1,9 +1,6 @@
#nullable disable
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;
using Speckle.Core.Api;
-2
View File
@@ -1,7 +1,5 @@
#nullable disable
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.Serialization;
using Speckle.Newtonsoft.Json;
@@ -1,5 +1,3 @@
using System.Collections.Generic;
namespace Speckle.Core.Models.Collections;
/// <summary>
@@ -1,6 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Speckle.Core.Logging;
using Speckle.Core.Models.Collections;
-3
View File
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Linq;
using System.Reflection;
using Speckle.Core.Kits;
using Speckle.Core.Logging;
@@ -1,5 +1,3 @@
using System;
namespace Speckle.Core.Models;
/// <summary>
@@ -1,7 +1,4 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Speckle.Core.Models.Collections;
namespace Speckle.Core.Models.Extensions;
-3
View File
@@ -1,7 +1,4 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Speckle.Core.Models.Extensions;
namespace Speckle.Core.Models;
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
using Speckle.Core.Kits;
namespace Speckle.Core.Models.GraphTraversal;
@@ -1,5 +1,4 @@
using System.Collections;
using System.Collections.Generic;
namespace Speckle.Core.Models.GraphTraversal;
@@ -1,6 +1,3 @@
using System.Collections.Generic;
using System.Linq;
namespace Speckle.Core.Models.GraphTraversal;
/// <summary>
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using System.Linq;
using Speckle.Core.Common;
namespace Speckle.Core.Models.GraphTraversal;
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Diagnostics.Contracts;
namespace Speckle.Core.Models.GraphTraversal;
@@ -1,5 +1,4 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
namespace Speckle.Core.Models.GraphTraversal;
@@ -1,4 +1,4 @@
namespace Speckle.Core.Models.Instances;
namespace Speckle.Core.Models.Instances;
/// <summary>
/// Grouped objects with a meaningful way for host application so use this proxy if you want to group object references for any purpose.
@@ -8,5 +8,8 @@ public class GroupProxy : Base, IProxyCollection
{
public List<string> objects { get; set; }
/// <summary>
/// Name of the group proxy collection which is unique for rhino, autocad and sketchup
/// </summary>
public string name { get; set; }
}
@@ -1,4 +1,4 @@
namespace Speckle.Core.Models.Instances;
namespace Speckle.Core.Models.Instances;
/// <summary>
/// Collection to proxy objects that lies in definitions, groups or whatever logic in the host app.
@@ -10,9 +10,4 @@ public interface IProxyCollection
/// On receive, they will be mapped to corresponding newly created definition ids.
/// </summary>
public List<string> objects { get; set; }
/// <summary>
/// Name of the proxy collection which is unique for rhino, autocad and sketchup
/// </summary>
public string name { get; set; }
}
@@ -12,5 +12,8 @@ public class InstanceDefinitionProxy : Base, IInstanceComponent, IProxyCollectio
public int maxDepth { get; set; }
/// <summary>
/// Name of the instance definition proxy collection which is unique for rhino, autocad and sketchup
/// </summary>
public string name { get; set; }
}
@@ -1,4 +1,3 @@
using System;
using Speckle.Core.Logging;
namespace Speckle.Core.Models;
-4
View File
@@ -1,10 +1,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using Speckle.Core.Common;

Some files were not shown because too many files have changed in this diff Show More