Compare commits
26 Commits
3.2.1
...
3.3.0-dev.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 9794195e9c | |||
| a61c442930 | |||
| 68a407905d | |||
| 0f2abaf532 | |||
| 07634b6f6a | |||
| e938725d35 | |||
| d3369e3ce5 | |||
| d75a61d775 | |||
| 2ae4003afb | |||
| 24db4c4ae4 | |||
| edf63d4a1b | |||
| b5b0922e7f | |||
| ff390f772d | |||
| d69f0bba2a | |||
| 33c14fc14c | |||
| 536e58aacc | |||
| 88188aace6 | |||
| ad44a7cdbc | |||
| 38449dca9a | |||
| 764eb43838 | |||
| a84e6d89ca | |||
| a479440b66 | |||
| d44b4fa52b | |||
| ea6ca8c555 | |||
| 113f0fd551 | |||
| bcc4e25970 |
@@ -3,9 +3,9 @@
|
|||||||
"isRoot": true,
|
"isRoot": true,
|
||||||
"tools": {
|
"tools": {
|
||||||
"csharpier": {
|
"csharpier": {
|
||||||
"version": "0.30.6",
|
"version": "1.0.1",
|
||||||
"commands": [
|
"commands": [
|
||||||
"dotnet-csharpier"
|
"csharpier"
|
||||||
],
|
],
|
||||||
"rollForward": false
|
"rollForward": false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
Directory.Build.targets
|
||||||
|
Directory.Build.props
|
||||||
|
|
||||||
|
**/bin/*
|
||||||
|
**/obj/*
|
||||||
|
_ReSharper.SharpCompress/
|
||||||
|
bin/
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
TestArchives/Scratch/
|
||||||
|
TestArchives/Scratch2/
|
||||||
|
TestResults/
|
||||||
|
*.nupkg
|
||||||
|
packages/*/
|
||||||
|
project.lock.json
|
||||||
|
tests/TestArchives/Scratch
|
||||||
|
.vs
|
||||||
|
tools
|
||||||
|
.vscode
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
*.snupkg
|
||||||
|
coverage.xml
|
||||||
|
|
||||||
|
*.received.*
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
printWidth: 120
|
printWidth: 120
|
||||||
useTabs: false
|
useTabs: false
|
||||||
tabWidth: 2
|
indentSize: 2
|
||||||
preprocessorSymbolSets:
|
preprocessorSymbolSets:
|
||||||
- ""
|
- ""
|
||||||
- "DEBUG"
|
- "DEBUG"
|
||||||
|
|||||||
+8
-21
@@ -1,5 +1,4 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup Label="Compiler Properties">
|
<PropertyGroup Label="Compiler Properties">
|
||||||
<LangVersion>12</LangVersion>
|
<LangVersion>12</LangVersion>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
@@ -7,7 +6,6 @@
|
|||||||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nugetspec Package Properties">
|
<PropertyGroup Label="Nugetspec Package Properties">
|
||||||
<!-- Defines common Nugetspec properties -->
|
<!-- Defines common Nugetspec properties -->
|
||||||
<!-- Inheriting packable projects should define the rest of the nugetspec properties (PackageId, Description) -->
|
<!-- Inheriting packable projects should define the rest of the nugetspec properties (PackageId, Description) -->
|
||||||
@@ -22,18 +20,16 @@
|
|||||||
<PackageTags>speckle</PackageTags>
|
<PackageTags>speckle</PackageTags>
|
||||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nuget Package Properties">
|
<PropertyGroup Label="Nuget Package Properties">
|
||||||
<IsPackable>false</IsPackable> <!--Can be set to true in inheriting .props/.csproj files for projects that should be packed-->
|
<IsPackable>false</IsPackable>
|
||||||
|
<!--Can be set to true in inheriting .props/.csproj files for projects that should be packed-->
|
||||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Analyers">
|
<PropertyGroup Label="Analyers">
|
||||||
<EnableNetAnalyzers>true</EnableNetAnalyzers>
|
<EnableNetAnalyzers>true</EnableNetAnalyzers>
|
||||||
<AnalysisLevel>latest-AllEnabledByDefault</AnalysisLevel>
|
<AnalysisLevel>latest-AllEnabledByDefault</AnalysisLevel>
|
||||||
@@ -41,7 +37,6 @@
|
|||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
|
||||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
|
||||||
<!-- Ingored warnings, some aspirational but too noisy for now, some by design. -->
|
<!-- Ingored warnings, some aspirational but too noisy for now, some by design. -->
|
||||||
<NoWarn>
|
<NoWarn>
|
||||||
<!--Disabled by design-->
|
<!--Disabled by design-->
|
||||||
@@ -59,28 +54,20 @@
|
|||||||
<!-- Aspirational -->
|
<!-- Aspirational -->
|
||||||
CA1502;CA1716;NETSDK1206;
|
CA1502;CA1716;NETSDK1206;
|
||||||
$(NoWarn)
|
$(NoWarn)
|
||||||
</NoWarn>
|
</NoWarn
|
||||||
|
>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Expose the repository root to all projects -->
|
<!-- Expose the repository root to all projects -->
|
||||||
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
|
<RepositoryRoot>$(MSBuildThisFileDirectory)</RepositoryRoot>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
|
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
|
||||||
<None
|
<None Condition="'$(IsPackable)' == 'true'" Include="..\..\logo.png" Pack="true" PackagePath="\" Visible="false" />
|
||||||
Condition="'$(IsPackable)' == 'true'"
|
|
||||||
Include="..\..\logo.png"
|
|
||||||
Pack="true"
|
|
||||||
PackagePath="\"
|
|
||||||
Visible="false"/>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- This file contains the configuration for some analyzer warnings, such as cyclomatic
|
<!-- This file contains the configuration for some analyzer warnings, such as cyclomatic
|
||||||
complexity threshold -->
|
complexity threshold -->
|
||||||
<AdditionalFiles Include="$(RepositoryRoot)CodeMetricsConfig.txt"/>
|
<AdditionalFiles Include="$(RepositoryRoot)CodeMetricsConfig.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
+13
-14
@@ -1,18 +1,17 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
|
<PropertyGroup Condition="'$(IsTestProject)' == 'true'">
|
||||||
<NoWarn>
|
<NoWarn>
|
||||||
$(NoWarn);
|
<!-- Things we need to test -->
|
||||||
<!-- Things we need to test -->
|
CS0618;CA1034;CA2201;CA1051;CA1040;CA1724;
|
||||||
CS0618;CA1034;CA2201;CA1051;CA1040;CA1724;
|
IDE0044;IDE0130;CA1508;
|
||||||
IDE0044;IDE0130;CA1508;
|
<!-- Analysers that provide no tangeable value to a test project -->
|
||||||
<!-- Analysers that provide no tangeable value to a test project -->
|
CA5394;CA2007;CA1852;CA1819;CA1711;CA1063;CA1816;CA2234;CS8618;CA1054;CA1810;CA2208;CA1019;CA1831;
|
||||||
CA5394;CA2007;CA1852;CA1819;CA1711;CA1063;CA1816;CA2234;CS8618;CA1054;CA1810;CA2208;CA1019;CA1831;
|
$(NoWarn);
|
||||||
</NoWarn>
|
</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<Target Name="DeepClean">
|
<Target Name="DeepClean">
|
||||||
<Message Text="Deep clean of $(MSBuildProjectName).csproj" Importance="high"/>
|
<Message Text="Deep clean of $(MSBuildProjectName).csproj" Importance="high" />
|
||||||
<RemoveDir Directories="$(BaseIntermediateOutputPath)"/>
|
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
|
||||||
<RemoveDir Directories="$(BaseOutputPath)"/>
|
<RemoveDir Directories="$(BaseOutputPath)" />
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<!-- Keep at exactly 7.0.5 for side by side with V2 -->
|
<!-- Keep at exactly 7.0.5 for side by side with V2 -->
|
||||||
<PackageVersion Include="Microsoft.Data.Sqlite" Version="[7.0.5,)" />
|
<PackageVersion Include="Microsoft.Data.Sqlite" Version="[7.0.5,)" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="9.0.3" />
|
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="9.0.4" />
|
||||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[2.2.0,)" />
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="[2.2.0,)" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[2.2.0,)" />
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[2.2.0,)" />
|
||||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[2.2.0,)" />
|
<PackageVersion Include="Microsoft.Extensions.Logging" Version="[2.2.0,)" />
|
||||||
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="[5.0.0,)" />
|
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="[5.0.0,)" />
|
||||||
<PackageVersion Include="Moq" Version="4.20.72" />
|
<PackageVersion Include="Moq" Version="4.20.72" />
|
||||||
<PackageVersion Include="Open.ChannelExtensions" Version="9.0.0" />
|
<PackageVersion Include="Open.ChannelExtensions" Version="9.1.0" />
|
||||||
<PackageVersion Include="Polly" Version="7.2.3" />
|
<PackageVersion Include="Polly" Version="7.2.3" />
|
||||||
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
|
<PackageVersion Include="Polly.Contrib.WaitAndRetry" Version="1.1.1" />
|
||||||
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />
|
<PackageVersion Include="Polly.Extensions.Http" Version="3.0.0" />
|
||||||
@@ -26,9 +26,9 @@
|
|||||||
<PackageVersion Include="Speckle.Newtonsoft.Json" Version="13.0.2" />
|
<PackageVersion Include="Speckle.Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageVersion Include="Speckle.DoubleNumerics" Version="4.1.0" />
|
<PackageVersion Include="Speckle.DoubleNumerics" Version="4.1.0" />
|
||||||
<PackageVersion Include="SimpleExec" Version="12.0.0" />
|
<PackageVersion Include="SimpleExec" Version="12.0.0" />
|
||||||
<PackageVersion Include="System.Threading.Channels" Version="9.0.2" />
|
<PackageVersion Include="System.Threading.Channels" Version="9.0.4" />
|
||||||
<PackageVersion Include="Verify.Quibble" Version="2.1.1" />
|
<PackageVersion Include="Verify.Quibble" Version="2.1.1" />
|
||||||
<PackageVersion Include="Verify.Xunit" Version="29.2.0" />
|
<PackageVersion Include="Verify.Xunit" Version="29.4.0" />
|
||||||
<PackageVersion Include="xunit" Version="2.9.3" />
|
<PackageVersion Include="xunit" Version="2.9.3" />
|
||||||
<PackageVersion Include="xunit.assert" Version="2.9.3" />
|
<PackageVersion Include="xunit.assert" Version="2.9.3" />
|
||||||
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
|
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.2" />
|
||||||
|
|||||||
+1
-1
@@ -68,7 +68,7 @@ Target(
|
|||||||
|
|
||||||
Target(RESTORE_TOOLS, () => RunAsync("dotnet", "tool restore"));
|
Target(RESTORE_TOOLS, () => RunAsync("dotnet", "tool restore"));
|
||||||
|
|
||||||
Target(FORMAT, dependsOn: [RESTORE_TOOLS], () => RunAsync("dotnet", "csharpier --check ."));
|
Target(FORMAT, dependsOn: [RESTORE_TOOLS], () => RunAsync("dotnet", "csharpier check ."));
|
||||||
|
|
||||||
Target(RESTORE, dependsOn: [FORMAT], () => RunAsync("dotnet", "restore Speckle.Sdk.sln --locked-mode"));
|
Target(RESTORE, dependsOn: [FORMAT], () => RunAsync("dotnet", "restore Speckle.Sdk.sln --locked-mode"));
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -1,10 +1,9 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bullseye" />
|
<PackageReference Include="Bullseye" />
|
||||||
<PackageReference Include="Glob" />
|
<PackageReference Include="Glob" />
|
||||||
<PackageReference Include="SimpleExec" />
|
<PackageReference Include="SimpleExec" />
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
using Speckle.Objects.Geometry;
|
||||||
|
using Speckle.Sdk.Models;
|
||||||
|
using Point = Speckle.Objects.Geometry.Point;
|
||||||
|
|
||||||
|
namespace Speckle.Objects.Annotation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Text class for representation in the viewer
|
||||||
|
/// </summary>
|
||||||
|
[SpeckleType("Objects.Annotation.Text")]
|
||||||
|
public class Text : Base
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Plain text, without formatting
|
||||||
|
/// </summary>
|
||||||
|
public required string value { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Origin point, relation to the text is defined by AlignmentHorizontal and AlignmentVertical
|
||||||
|
/// </summary>
|
||||||
|
public required Point origin { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Height in linear units or pixels (if Units.None)
|
||||||
|
/// </summary>
|
||||||
|
public required double height { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Units will be 'Units.None' if the text size is defined in pixels (stays the same size
|
||||||
|
/// independently of zooming the model). Default height in pixels is 17px (used for Viewer measurements)
|
||||||
|
/// </summary>
|
||||||
|
public required string units { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Horizontal alignment: Left, Center or Right
|
||||||
|
/// </summary>
|
||||||
|
public AlignmentHorizontal alignmentH { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Vertical alignment: Top, Center or Bottom
|
||||||
|
/// </summary>
|
||||||
|
public AlignmentVertical alignmentV { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Plane will be null if the text object orientation follows camera view
|
||||||
|
/// </summary>
|
||||||
|
public Plane? plane { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Maximum width of the text field (in 'units').
|
||||||
|
/// Text will be split into lines (wrapped) to fit into the width.
|
||||||
|
/// null, if text should not be wrapped.
|
||||||
|
/// </summary>
|
||||||
|
public double? maxWidth { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AlignmentHorizontal
|
||||||
|
{
|
||||||
|
Left,
|
||||||
|
Center,
|
||||||
|
Right,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AlignmentVertical
|
||||||
|
{
|
||||||
|
Top,
|
||||||
|
Center,
|
||||||
|
Bottom,
|
||||||
|
}
|
||||||
@@ -68,7 +68,6 @@ public class Plane : Base, ITransformable<Plane>
|
|||||||
/// Returns the values of this <see cref="Plane"/> as a list of numbers
|
/// Returns the values of this <see cref="Plane"/> as a list of numbers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A list of values representing the Plane.</returns>
|
/// <returns>A list of values representing the Plane.</returns>
|
||||||
|
|
||||||
public List<double> ToList()
|
public List<double> ToList()
|
||||||
{
|
{
|
||||||
var list = new List<double>();
|
var list = new List<double>();
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ public class Surface : Base, IHasBoundingBox, IHasArea, ITransformable<Surface>
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A 2-dimensional array representing this <see cref="Surface"/>s control points.</returns>
|
/// <returns>A 2-dimensional array representing this <see cref="Surface"/>s control points.</returns>
|
||||||
/// <remarks>The ControlPoints will be ordered following directions "[u][v]"</remarks>
|
/// <remarks>The ControlPoints will be ordered following directions "[u][v]"</remarks>
|
||||||
|
|
||||||
public List<List<ControlPoint>> GetControlPoints()
|
public List<List<ControlPoint>> GetControlPoints()
|
||||||
{
|
{
|
||||||
var matrix = new List<List<ControlPoint>>();
|
var matrix = new List<List<ControlPoint>>();
|
||||||
|
|||||||
@@ -1,37 +1,30 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup Label="Compiler Properties">
|
<PropertyGroup Label="Compiler Properties">
|
||||||
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
||||||
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
||||||
<Configurations>Debug;Release;Local</Configurations>
|
<Configurations>Debug;Release;Local</Configurations>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nugetspec Package Properties">
|
<PropertyGroup Label="Nugetspec Package Properties">
|
||||||
<PackageId>Speckle.Objects</PackageId>
|
<PackageId>Speckle.Objects</PackageId>
|
||||||
<Description>Objects is the default object model for Speckle</Description>
|
<Description>Objects is the default object model for Speckle</Description>
|
||||||
<PackageTags>$(PackageTags) objects</PackageTags>
|
<PackageTags>$(PackageTags) objects</PackageTags>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nuget Package Properties">
|
<PropertyGroup Label="Nuget Package Properties">
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Analyers">
|
<PropertyGroup Label="Analyers">
|
||||||
<NoWarn>
|
<NoWarn>
|
||||||
$(NoWarn);
|
$(NoWarn);
|
||||||
CA1819;CA1008;CA2225;
|
CA1819;CA1008;CA2225;
|
||||||
</NoWarn>
|
</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Label="Expose internals to test projects">
|
<ItemGroup Label="Expose internals to test projects">
|
||||||
<InternalsVisibleTo Include="Speckle.Objects.Tests.Unit" />
|
<InternalsVisibleTo Include="Speckle.Objects.Tests.Unit" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Label="Project References">
|
<ItemGroup Label="Project References">
|
||||||
<ProjectReference Include="..\Speckle.Sdk\Speckle.Sdk.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk\Speckle.Sdk.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Speckle.Sdk.Dependencies.Serialization;
|
|||||||
public abstract class ChannelSaver<T>
|
public abstract class ChannelSaver<T>
|
||||||
where T : IHasByteSize
|
where T : IHasByteSize
|
||||||
{
|
{
|
||||||
private const int SEND_CAPACITY = 500;
|
private const int SEND_CAPACITY = 1000;
|
||||||
private const int HTTP_SEND_CHUNK_SIZE = 25_000_000; //bytes
|
private const int HTTP_SEND_CHUNK_SIZE = 25_000_000; //bytes
|
||||||
private static readonly TimeSpan HTTP_BATCH_TIMEOUT = TimeSpan.FromSeconds(2);
|
private static readonly TimeSpan HTTP_BATCH_TIMEOUT = TimeSpan.FromSeconds(2);
|
||||||
private const int MAX_PARALLELISM_HTTP = 4;
|
private const int MAX_PARALLELISM_HTTP = 4;
|
||||||
@@ -68,14 +68,15 @@ public abstract class ChannelSaver<T>
|
|||||||
TaskScheduler.Current
|
TaskScheduler.Current
|
||||||
);
|
);
|
||||||
|
|
||||||
public void Save(T item)
|
public async Task SaveAsync(T item, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
if (Exception is not null)
|
if (Exception is not null)
|
||||||
{
|
{
|
||||||
return; //don't save if we're already done through an error
|
return; //don't save if we're already done through an error
|
||||||
}
|
}
|
||||||
// ReSharper disable once MethodSupportsCancellation
|
//can switch to check then try pattern when back pressure is needed or exceptions are too much
|
||||||
_checkCacheChannel.Writer.TryWrite(item);
|
//the trees don't need to respond to back pressure
|
||||||
|
await _checkCacheChannel.Writer.WriteAsync(item, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<IMemoryOwner<T>> SendToServer(IMemoryOwner<T> batch)
|
private async Task<IMemoryOwner<T>> SendToServer(IMemoryOwner<T> batch)
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup Label="Compiler Properties">
|
<PropertyGroup Label="Compiler Properties">
|
||||||
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
||||||
<Configurations>Debug;Release;Local</Configurations>
|
<Configurations>Debug;Release;Local</Configurations>
|
||||||
@@ -7,30 +6,26 @@
|
|||||||
<ILRepackRenameInternalized>true</ILRepackRenameInternalized>
|
<ILRepackRenameInternalized>true</ILRepackRenameInternalized>
|
||||||
<ILRepackMergeDebugSymbols>true</ILRepackMergeDebugSymbols>
|
<ILRepackMergeDebugSymbols>true</ILRepackMergeDebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nugetspec Package Properties">
|
<PropertyGroup Label="Nugetspec Package Properties">
|
||||||
<PackageId>Speckle.Sdk.Dependencies</PackageId>
|
<PackageId>Speckle.Sdk.Dependencies</PackageId>
|
||||||
<Description>The .NET SDK for Speckle</Description>
|
<Description>The .NET SDK for Speckle</Description>
|
||||||
<PackageTags>$(PackageTags) core sdk</PackageTags>
|
<PackageTags>$(PackageTags) core sdk</PackageTags>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nuget Package Properties">
|
<PropertyGroup Label="Nuget Package Properties">
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ILRepack.FullAuto">
|
<PackageReference Include="ILRepack.FullAuto">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.ObjectPool" PrivateAssets="all" />
|
<PackageReference Include="Microsoft.Extensions.ObjectPool" PrivateAssets="all" />
|
||||||
<PackageReference Include="Polly" PrivateAssets="all" />
|
<PackageReference Include="Polly" PrivateAssets="all" />
|
||||||
<PackageReference Include="Polly.Contrib.WaitAndRetry" PrivateAssets="all" />
|
<PackageReference Include="Polly.Contrib.WaitAndRetry" PrivateAssets="all" />
|
||||||
<PackageReference Include="Polly.Extensions.Http" PrivateAssets="all" />
|
<PackageReference Include="Polly.Extensions.Http" PrivateAssets="all" />
|
||||||
<PackageReference Include="Open.ChannelExtensions" PrivateAssets="all" />
|
<PackageReference Include="Open.ChannelExtensions" PrivateAssets="all" />
|
||||||
<PackageReference Include="System.Threading.Channels" PrivateAssets="all" />
|
<PackageReference Include="System.Threading.Channels" PrivateAssets="all" />
|
||||||
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -13,9 +13,9 @@
|
|||||||
},
|
},
|
||||||
"Microsoft.Extensions.ObjectPool": {
|
"Microsoft.Extensions.ObjectPool": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.3, )",
|
"requested": "[9.0.4, )",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "4uPdnj9hLRrb3ZSeVEDtwIm9nNrrT9vAXYC9o1/yTW8lGOPwTyI2QlkcICwYEGM1LESGTFidcPMFACznUZKbIQ=="
|
"contentHash": "G7p1k2xVZ+2aVANz0JdSiafr+AHDHeS1kF8+Y0ABbIsByd0erOL59IDXBs9vcdJf3pPV/murO0mbtr4k40QxWw=="
|
||||||
},
|
},
|
||||||
"Microsoft.SourceLink.GitHub": {
|
"Microsoft.SourceLink.GitHub": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
@@ -38,13 +38,13 @@
|
|||||||
},
|
},
|
||||||
"Open.ChannelExtensions": {
|
"Open.ChannelExtensions": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.0, )",
|
"requested": "[9.1.0, )",
|
||||||
"resolved": "9.0.0",
|
"resolved": "9.1.0",
|
||||||
"contentHash": "DP+l5S6G46wcuY4I4kNXE+RDOmJr0DKuMienOdt0mMBN9z7vmLSC8YQbqCyb9i9LNjXj1tgCx5LyitJiRr/v7g==",
|
"contentHash": "D6c24vMGy1oZ06vmkD2/FNzWHK7ZIihuv2spDgYEeaUp+eobrILQnrNQKRoASFXD4JGfZ7nfvTM0e+AX79dt8Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Bcl.AsyncInterfaces": "9.0.0",
|
"Microsoft.Bcl.AsyncInterfaces": "9.0.4",
|
||||||
"System.Collections.Immutable": "9.0.0",
|
"System.Collections.Immutable": "9.0.4",
|
||||||
"System.Threading.Channels": "9.0.0"
|
"System.Threading.Channels": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Polly": {
|
"Polly": {
|
||||||
@@ -82,11 +82,11 @@
|
|||||||
},
|
},
|
||||||
"System.Threading.Channels": {
|
"System.Threading.Channels": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.2, )",
|
"requested": "[9.0.4, )",
|
||||||
"resolved": "9.0.2",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "pUmqkuBS9OxWHOlfNad09Oxc8gRbxgN9UQtsqHPst4jfcgZRxQetNcsT2oe+VnUpEFAtBy1FZcJZiOscrBmA7g==",
|
"contentHash": "4qBn2H6/aXBpE/Pm3wY5yusY/pEvQz99NlWHrTUji0qCmOdbhhjaALcpmbfW2ksxlPM6i6S+QFLkpOQdyfeKYQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Bcl.AsyncInterfaces": "9.0.2",
|
"Microsoft.Bcl.AsyncInterfaces": "9.0.4",
|
||||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -117,8 +117,8 @@
|
|||||||
},
|
},
|
||||||
"System.Collections.Immutable": {
|
"System.Collections.Immutable": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.0",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==",
|
"contentHash": "wfm2NgK22MmBe5qJjp52qzpkeDZKb4l9LbdubhZSehY1z4LS+lld6R+B+UQNb2AZRHu/QJlHxEUcRst5hIEejg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Memory": "4.5.5",
|
"System.Memory": "4.5.5",
|
||||||
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
|
||||||
@@ -155,8 +155,8 @@
|
|||||||
"Microsoft.Bcl.AsyncInterfaces": {
|
"Microsoft.Bcl.AsyncInterfaces": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[5.0.0, )",
|
"requested": "[5.0.0, )",
|
||||||
"resolved": "9.0.2",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "1CED0BGD7dCKsbe7tDhzpPB2Qdi9x35QChu6zkBEI4s0T5bDkkttGReqQnOeOfRNSxtP2WvpX6Ik/0O93XDuMw==",
|
"contentHash": "9VGI5kxIvrNG2mqLQZnUR6y/3fcnygD8eNpHR+CqfbnIXvea6nehnYknDKQTxZVPMpzpNca+7DxLBmpdB3q0Bw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"System.Threading.Tasks.Extensions": "4.5.4"
|
"System.Threading.Tasks.Extensions": "4.5.4"
|
||||||
}
|
}
|
||||||
@@ -174,9 +174,9 @@
|
|||||||
},
|
},
|
||||||
"Microsoft.Extensions.ObjectPool": {
|
"Microsoft.Extensions.ObjectPool": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.3, )",
|
"requested": "[9.0.4, )",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "4uPdnj9hLRrb3ZSeVEDtwIm9nNrrT9vAXYC9o1/yTW8lGOPwTyI2QlkcICwYEGM1LESGTFidcPMFACznUZKbIQ=="
|
"contentHash": "G7p1k2xVZ+2aVANz0JdSiafr+AHDHeS1kF8+Y0ABbIsByd0erOL59IDXBs9vcdJf3pPV/murO0mbtr4k40QxWw=="
|
||||||
},
|
},
|
||||||
"Microsoft.SourceLink.GitHub": {
|
"Microsoft.SourceLink.GitHub": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
@@ -190,9 +190,9 @@
|
|||||||
},
|
},
|
||||||
"Open.ChannelExtensions": {
|
"Open.ChannelExtensions": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.0, )",
|
"requested": "[9.1.0, )",
|
||||||
"resolved": "9.0.0",
|
"resolved": "9.1.0",
|
||||||
"contentHash": "DP+l5S6G46wcuY4I4kNXE+RDOmJr0DKuMienOdt0mMBN9z7vmLSC8YQbqCyb9i9LNjXj1tgCx5LyitJiRr/v7g=="
|
"contentHash": "D6c24vMGy1oZ06vmkD2/FNzWHK7ZIihuv2spDgYEeaUp+eobrILQnrNQKRoASFXD4JGfZ7nfvTM0e+AX79dt8Q=="
|
||||||
},
|
},
|
||||||
"Polly": {
|
"Polly": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
@@ -229,9 +229,9 @@
|
|||||||
},
|
},
|
||||||
"System.Threading.Channels": {
|
"System.Threading.Channels": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[9.0.2, )",
|
"requested": "[9.0.4, )",
|
||||||
"resolved": "9.0.2",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "pUmqkuBS9OxWHOlfNad09Oxc8gRbxgN9UQtsqHPst4jfcgZRxQetNcsT2oe+VnUpEFAtBy1FZcJZiOscrBmA7g=="
|
"contentHash": "4qBn2H6/aXBpE/Pm3wY5yusY/pEvQz99NlWHrTUji0qCmOdbhhjaALcpmbfW2ksxlPM6i6S+QFLkpOQdyfeKYQ=="
|
||||||
},
|
},
|
||||||
"ILRepack": {
|
"ILRepack": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Speckle.Sdk.Api.GraphQL;
|
using Speckle.Sdk.Api.GraphQL;
|
||||||
|
using Speckle.Sdk.Api.GraphQL.Models;
|
||||||
|
|
||||||
namespace Speckle.Sdk.Api;
|
namespace Speckle.Sdk.Api;
|
||||||
|
|
||||||
@@ -96,3 +97,15 @@ public sealed class SpeckleGraphQLInvalidQueryException : SpeckleGraphQLExceptio
|
|||||||
public SpeckleGraphQLInvalidQueryException(string? message, Exception? innerException)
|
public SpeckleGraphQLInvalidQueryException(string? message, Exception? innerException)
|
||||||
: base(message, innerException) { }
|
: base(message, innerException) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <seealso cref="PermissionCheckResult"/>
|
||||||
|
public sealed class WorkspacePermissionException : SpeckleGraphQLException
|
||||||
|
{
|
||||||
|
public WorkspacePermissionException() { }
|
||||||
|
|
||||||
|
public WorkspacePermissionException(string? message)
|
||||||
|
: base(message) { }
|
||||||
|
|
||||||
|
public WorkspacePermissionException(string? message, Exception? innerException)
|
||||||
|
: base(message, innerException) { }
|
||||||
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ public sealed class Client : ISpeckleGraphQLClient, IClient
|
|||||||
public ProjectInviteResource ProjectInvite { get; }
|
public ProjectInviteResource ProjectInvite { get; }
|
||||||
public CommentResource Comment { get; }
|
public CommentResource Comment { get; }
|
||||||
public SubscriptionResource Subscription { get; }
|
public SubscriptionResource Subscription { get; }
|
||||||
|
public WorkspaceResource Workspace { get; }
|
||||||
|
|
||||||
public Uri ServerUrl => new(Account.serverInfo.url);
|
public Uri ServerUrl => new(Account.serverInfo.url);
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ public sealed class Client : ISpeckleGraphQLClient, IClient
|
|||||||
ProjectInvite = new(this);
|
ProjectInvite = new(this);
|
||||||
Comment = new(this);
|
Comment = new(this);
|
||||||
Subscription = new(this);
|
Subscription = new(this);
|
||||||
|
Workspace = new(this);
|
||||||
|
|
||||||
HttpClient = CreateHttpClient(application, speckleHttp, account);
|
HttpClient = CreateHttpClient(application, speckleHttp, account);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,13 @@ public sealed record ProjectCommentsFilter(bool? includeArchived, bool? loadedVe
|
|||||||
|
|
||||||
public sealed record ProjectCreateInput(string? name, string? description, ProjectVisibility? visibility);
|
public sealed record ProjectCreateInput(string? name, string? description, ProjectVisibility? visibility);
|
||||||
|
|
||||||
|
public sealed record WorkspaceProjectCreateInput(
|
||||||
|
string? name,
|
||||||
|
string? description,
|
||||||
|
ProjectVisibility? visibility,
|
||||||
|
string workspaceId
|
||||||
|
);
|
||||||
|
|
||||||
public sealed record ProjectInviteCreateInput(string? email, string? role, string? serverRole, string? userId);
|
public sealed record ProjectInviteCreateInput(string? email, string? role, string? serverRole, string? userId);
|
||||||
|
|
||||||
public sealed record ProjectInviteUseInput(bool accept, string projectId, string token);
|
public sealed record ProjectInviteUseInput(bool accept, string projectId, string token);
|
||||||
@@ -29,4 +36,4 @@ public sealed record ProjectUpdateInput(
|
|||||||
|
|
||||||
public sealed record ProjectUpdateRoleInput(string userId, string projectId, string? role);
|
public sealed record ProjectUpdateRoleInput(string userId, string projectId, string? role);
|
||||||
|
|
||||||
public sealed record UserProjectsFilter(string search, IReadOnlyList<string>? onlyWithRoles = null);
|
public sealed record WorkspaceProjectsFilter(string? search, bool? withProjectRoleOnly);
|
||||||
|
|||||||
@@ -6,3 +6,13 @@ public sealed record UserUpdateInput(
|
|||||||
string? company = null,
|
string? company = null,
|
||||||
string? name = null
|
string? name = null
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public sealed record UserProjectsFilter(
|
||||||
|
string? search = null,
|
||||||
|
IReadOnlyList<string>? onlyWithRoles = null,
|
||||||
|
string? workspaceId = null,
|
||||||
|
bool? personalOnly = null,
|
||||||
|
bool? includeImplicitAccess = null
|
||||||
|
);
|
||||||
|
|
||||||
|
public sealed record UserWorkspacesFilter(string? search);
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
namespace Speckle.Sdk.Api.GraphQL.Models;
|
||||||
|
|
||||||
|
public sealed class PermissionCheckResult
|
||||||
|
{
|
||||||
|
public bool authorized { get; init; }
|
||||||
|
public string code { get; init; }
|
||||||
|
public string message { get; init; }
|
||||||
|
|
||||||
|
/// <exception cref="SpeckleException">Throws when <see cref="PermissionCheckResult.authorized"/> is <see langword="false"/></exception>
|
||||||
|
public void EnsureAuthorised()
|
||||||
|
{
|
||||||
|
if (!authorized)
|
||||||
|
{
|
||||||
|
throw new WorkspacePermissionException(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
namespace Speckle.Sdk.Api.GraphQL.Models;
|
||||||
|
|
||||||
|
public sealed class ProjectPermissionChecks
|
||||||
|
{
|
||||||
|
public PermissionCheckResult canCreateModel { get; init; }
|
||||||
|
public PermissionCheckResult canDelete { get; init; }
|
||||||
|
}
|
||||||
@@ -7,6 +7,8 @@ public sealed class Version
|
|||||||
public string id { get; init; }
|
public string id { get; init; }
|
||||||
public string? message { get; init; }
|
public string? message { get; init; }
|
||||||
public Uri previewUrl { get; init; }
|
public Uri previewUrl { get; init; }
|
||||||
public string referencedObject { get; init; }
|
|
||||||
|
/// <remarks>May be <see langword="null"/> if workspaces version history limit has been exceeded</remarks>
|
||||||
|
public string? referencedObject { get; init; }
|
||||||
public string? sourceApplication { get; init; }
|
public string? sourceApplication { get; init; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace Speckle.Sdk.Api.GraphQL.Models;
|
||||||
|
|
||||||
|
public sealed class Workspace
|
||||||
|
{
|
||||||
|
public string id { get; init; }
|
||||||
|
public string name { get; init; }
|
||||||
|
public string role { get; init; }
|
||||||
|
public string slug { get; init; }
|
||||||
|
public string? description { get; init; }
|
||||||
|
public WorkspacePermissionChecks permissions { get; init; }
|
||||||
|
public WorkspaceCreationState? creationState { get; init; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class WorkspaceCreationState
|
||||||
|
{
|
||||||
|
public bool completed { get; init; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public sealed class WorkspacePermissionChecks
|
||||||
|
{
|
||||||
|
public PermissionCheckResult canCreateProject { get; init; }
|
||||||
|
}
|
||||||
@@ -85,6 +85,7 @@ public sealed class ActiveUserResource
|
|||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
/// <exception cref="SpeckleException">The ActiveUser could not be found (e.g. the client is not authenticated)</exception>
|
||||||
public async Task<ResourceCollection<Project>> GetProjects(
|
public async Task<ResourceCollection<Project>> GetProjects(
|
||||||
int limit = ServerLimits.DEFAULT_PAGINATION_REQUEST,
|
int limit = ServerLimits.DEFAULT_PAGINATION_REQUEST,
|
||||||
string? cursor = null,
|
string? cursor = null,
|
||||||
@@ -135,7 +136,7 @@ public sealed class ActiveUserResource
|
|||||||
|
|
||||||
if (response.data is null)
|
if (response.data is null)
|
||||||
{
|
{
|
||||||
throw new SpeckleGraphQLException("GraphQL response indicated that the ActiveUser could not be found");
|
throw new SpeckleException("GraphQL response indicated that the ActiveUser could not be found");
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.data.data;
|
return response.data.data;
|
||||||
@@ -199,8 +200,165 @@ public sealed class ActiveUserResource
|
|||||||
return response.data.data;
|
return response.data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc cref="GetProjectInvites"/>
|
/// <param name="cancellationToken"></param>
|
||||||
[Obsolete($"Renamed to {nameof(GetProjectInvites)}")]
|
/// <returns></returns>
|
||||||
public async Task<List<PendingStreamCollaborator>> ProjectInvites(CancellationToken cancellationToken = default) =>
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
await GetProjectInvites(cancellationToken).ConfigureAwait(false);
|
/// <exception cref="SpeckleException">The ActiveUser could not be found (e.g. the client is not authenticated)</exception>
|
||||||
|
public async Task<PermissionCheckResult> CanCreatePersonalProjects(CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query CanCreatePersonalProject {
|
||||||
|
data:activeUser {
|
||||||
|
data:permissions {
|
||||||
|
data:canCreatePersonalProject {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
var request = new GraphQLRequest { Query = QUERY };
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<NullableResponse<RequiredResponse<RequiredResponse<PermissionCheckResult>>?>>(
|
||||||
|
request,
|
||||||
|
cancellationToken
|
||||||
|
)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (response.data is null)
|
||||||
|
{
|
||||||
|
throw new SpeckleException("GraphQL response indicated that the ActiveUser could not be found");
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.data.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <remarks>This feature is only available on Workspace enabled servers (e.g. app.speckle.systems)</remarks>
|
||||||
|
/// <param name="limit"></param>
|
||||||
|
/// <param name="cursor"></param>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
/// <exception cref="SpeckleException">The ActiveUser could not be found (e.g. the client is not authenticated)</exception>
|
||||||
|
public async Task<ResourceCollection<Workspace>> GetWorkspaces(
|
||||||
|
int limit = ServerLimits.DEFAULT_PAGINATION_REQUEST,
|
||||||
|
string? cursor = null,
|
||||||
|
UserWorkspacesFilter? filter = null,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query ActiveUser($limit: Int!, $cursor: String, $filter: UserWorkspacesFilter) {
|
||||||
|
data:activeUser {
|
||||||
|
data:workspaces(limit: $limit, cursor: $cursor, filter: $filter) {
|
||||||
|
cursor
|
||||||
|
totalCount
|
||||||
|
items {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
role
|
||||||
|
slug
|
||||||
|
logo
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
readOnly
|
||||||
|
description
|
||||||
|
creationState
|
||||||
|
{
|
||||||
|
completed
|
||||||
|
}
|
||||||
|
permissions {
|
||||||
|
canCreateProject {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
var request = new GraphQLRequest
|
||||||
|
{
|
||||||
|
Query = QUERY,
|
||||||
|
Variables = new
|
||||||
|
{
|
||||||
|
limit,
|
||||||
|
cursor,
|
||||||
|
filter,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<NullableResponse<RequiredResponse<ResourceCollection<Workspace>>?>>(
|
||||||
|
request,
|
||||||
|
cancellationToken
|
||||||
|
)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (response.data is null)
|
||||||
|
{
|
||||||
|
throw new SpeckleException("GraphQL response indicated that the ActiveUser could not be found");
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
/// <exception cref="SpeckleException">The ActiveUser could not be found (e.g. the client is not authenticated)</exception>
|
||||||
|
public async Task<Workspace?> GetActiveWorkspace(CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query ActiveUser {
|
||||||
|
data:activeUser {
|
||||||
|
data:activeWorkspace {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
role
|
||||||
|
slug
|
||||||
|
logo
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
readOnly
|
||||||
|
description
|
||||||
|
creationState
|
||||||
|
{
|
||||||
|
completed
|
||||||
|
}
|
||||||
|
permissions {
|
||||||
|
canCreateProject {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
var request = new GraphQLRequest { Query = QUERY };
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<NullableResponse<NullableResponse<Workspace?>?>>(request, cancellationToken)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
if (response.data is null)
|
||||||
|
{
|
||||||
|
throw new SpeckleException("GraphQL response indicated that the ActiveUser could not be found");
|
||||||
|
}
|
||||||
|
|
||||||
|
return response.data.data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,42 @@ public sealed class ProjectResource
|
|||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <param name="projectId"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
public async Task<ProjectPermissionChecks> GetPermissions(
|
||||||
|
string projectId,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query Project($projectId: String!) {
|
||||||
|
data:project(id: $projectId) {
|
||||||
|
data:permissions {
|
||||||
|
canCreateModel {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
canDelete {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
GraphQLRequest request = new() { Query = QUERY, Variables = new { projectId } };
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<RequiredResponse<RequiredResponse<ProjectPermissionChecks>>>(request, cancellationToken)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
return response.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
/// <param name="projectId"></param>
|
/// <param name="projectId"></param>
|
||||||
/// <param name="modelsLimit">Max number of models to fetch</param>
|
/// <param name="modelsLimit">Max number of models to fetch</param>
|
||||||
/// <param name="modelsCursor">Optional cursor for pagination</param>
|
/// <param name="modelsCursor">Optional cursor for pagination</param>
|
||||||
@@ -186,6 +222,10 @@ public sealed class ProjectResource
|
|||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a non-workspace project (aka Personal Project)<br/>
|
||||||
|
/// See <see cref="ActiveUserResource.CanCreatePersonalProjects"/> to see if the user has permission
|
||||||
|
/// </summary>
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
@@ -219,6 +259,49 @@ public sealed class ProjectResource
|
|||||||
return response.data.data;
|
return response.data.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a workspace project.<br/>
|
||||||
|
/// This feature is only supported on Workspace Enabled Servers (e.g. app.speckle.systems)
|
||||||
|
/// See <see cref="ActiveUserResource.CanCreatePersonalProjects"/> to see if the user has permission
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
public async Task<Project> CreateInWorkspace(
|
||||||
|
WorkspaceProjectCreateInput input,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
mutation WorkspaceProjectCreate($input: WorkspaceProjectCreateInput!) {
|
||||||
|
data:workspaceMutations {
|
||||||
|
data:projects {
|
||||||
|
data:create(input: $input) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
description
|
||||||
|
visibility
|
||||||
|
allowPublicComments
|
||||||
|
role
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
sourceApps
|
||||||
|
workspaceId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
GraphQLRequest request = new() { Query = QUERY, Variables = new { input } };
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<RequiredResponse<RequiredResponse<RequiredResponse<Project>>>>(request, cancellationToken)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
return response.data.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
/// <param name="input"></param>
|
/// <param name="input"></param>
|
||||||
/// <param name="cancellationToken"></param>
|
/// <param name="cancellationToken"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
using GraphQL;
|
||||||
|
using Speckle.Sdk.Api.GraphQL.Inputs;
|
||||||
|
using Speckle.Sdk.Api.GraphQL.Models;
|
||||||
|
using Speckle.Sdk.Api.GraphQL.Models.Responses;
|
||||||
|
|
||||||
|
namespace Speckle.Sdk.Api.GraphQL.Resources;
|
||||||
|
|
||||||
|
public sealed class WorkspaceResource
|
||||||
|
{
|
||||||
|
private readonly ISpeckleGraphQLClient _client;
|
||||||
|
|
||||||
|
internal WorkspaceResource(ISpeckleGraphQLClient client)
|
||||||
|
{
|
||||||
|
_client = client;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <param name="workspaceId"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
public async Task<Workspace> Get(string workspaceId, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query WorkspaceGet($workspaceId: String!) {
|
||||||
|
data:workspace(id: $workspaceId) {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
role
|
||||||
|
slug
|
||||||
|
logo
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
readOnly
|
||||||
|
description
|
||||||
|
creationState
|
||||||
|
{
|
||||||
|
completed
|
||||||
|
}
|
||||||
|
permissions {
|
||||||
|
canCreateProject {
|
||||||
|
authorized
|
||||||
|
code
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
var request = new GraphQLRequest { Query = QUERY, Variables = new { workspaceId } };
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<RequiredResponse<RequiredResponse<Workspace>>>(request, cancellationToken)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
return response.data.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <param name="workspaceId"></param>
|
||||||
|
/// <param name="limit">Max number of projects to fetch</param>
|
||||||
|
/// <param name="cursor">Optional cursor for pagination</param>
|
||||||
|
/// <param name="filter"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <inheritdoc cref="ISpeckleGraphQLClient.ExecuteGraphQLRequest{T}"/>
|
||||||
|
/// <see cref="Get"/>
|
||||||
|
public async Task<ResourceCollection<Project>> GetProjects(
|
||||||
|
string workspaceId,
|
||||||
|
int limit = ServerLimits.DEFAULT_PAGINATION_REQUEST,
|
||||||
|
string? cursor = null,
|
||||||
|
WorkspaceProjectsFilter? filter = null,
|
||||||
|
CancellationToken cancellationToken = default
|
||||||
|
)
|
||||||
|
{
|
||||||
|
//language=graphql
|
||||||
|
const string QUERY = """
|
||||||
|
query Workspace($workspaceId: String!, $limit: Int!, $cursor: String, $filter: WorkspaceProjectsFilter) {
|
||||||
|
data:workspace(id: $workspaceId) {
|
||||||
|
data:projects(limit: $limit, cursor: $cursor, filter: $filter) {
|
||||||
|
cursor
|
||||||
|
items {
|
||||||
|
allowPublicComments
|
||||||
|
createdAt
|
||||||
|
description
|
||||||
|
id
|
||||||
|
name
|
||||||
|
role
|
||||||
|
sourceApps
|
||||||
|
updatedAt
|
||||||
|
visibility
|
||||||
|
workspaceId
|
||||||
|
}
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""";
|
||||||
|
|
||||||
|
var request = new GraphQLRequest
|
||||||
|
{
|
||||||
|
Query = QUERY,
|
||||||
|
Variables = new
|
||||||
|
{
|
||||||
|
workspaceId,
|
||||||
|
limit,
|
||||||
|
cursor,
|
||||||
|
filter,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
var response = await _client
|
||||||
|
.ExecuteGraphQLRequest<RequiredResponse<RequiredResponse<ResourceCollection<Project>>>>(
|
||||||
|
request,
|
||||||
|
cancellationToken
|
||||||
|
)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
return response.data.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,9 +12,7 @@ public interface IObjectSaver : IDisposable
|
|||||||
Task Start(int? maxParallelism, int? httpBatchSize, int? cacheBatchSize, CancellationToken cancellationToken);
|
Task Start(int? maxParallelism, int? httpBatchSize, int? cacheBatchSize, CancellationToken cancellationToken);
|
||||||
void DoneTraversing();
|
void DoneTraversing();
|
||||||
Task DoneSaving();
|
Task DoneSaving();
|
||||||
void SaveItem(BaseItem item);
|
Task SaveAsync(BaseItem item);
|
||||||
long Uploaded { get; }
|
|
||||||
long Cached { get; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public sealed class ObjectSaver(
|
public sealed class ObjectSaver(
|
||||||
@@ -40,8 +38,6 @@ public sealed class ObjectSaver(
|
|||||||
private long _cached;
|
private long _cached;
|
||||||
|
|
||||||
private long _objectsSerialized;
|
private long _objectsSerialized;
|
||||||
public long Cached => _cached;
|
|
||||||
public long Uploaded => _uploaded;
|
|
||||||
|
|
||||||
protected override async Task SendToServerInternal(Batch<BaseItem> batch)
|
protected override async Task SendToServerInternal(Batch<BaseItem> batch)
|
||||||
{
|
{
|
||||||
@@ -81,10 +77,10 @@ public sealed class ObjectSaver(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveItem(BaseItem item)
|
public async Task SaveAsync(BaseItem item)
|
||||||
{
|
{
|
||||||
Interlocked.Increment(ref _objectsSerialized);
|
Interlocked.Increment(ref _objectsSerialized);
|
||||||
Save(item);
|
await SaveAsync(item, _cancellationTokenSource.Token).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SaveToCache(List<BaseItem> batch)
|
public override void SaveToCache(List<BaseItem> batch)
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ public sealed class SerializeProcess(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Interlocked.Increment(ref _objectsSerialized);
|
Interlocked.Increment(ref _objectsSerialized);
|
||||||
objectSaver.SaveItem(item);
|
await objectSaver.SaveAsync(item).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!currentClosures.ContainsKey(item.Id))
|
if (!currentClosures.ContainsKey(item.Id))
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||||
|
using Speckle.Sdk.Api;
|
||||||
|
using Speckle.Sdk.Credentials;
|
||||||
using Speckle.Sdk.Dependencies;
|
using Speckle.Sdk.Dependencies;
|
||||||
using Speckle.Sdk.Host;
|
using Speckle.Sdk.Host;
|
||||||
using Speckle.Sdk.Logging;
|
using Speckle.Sdk.Logging;
|
||||||
|
using Speckle.Sdk.Models.GraphTraversal;
|
||||||
|
using Speckle.Sdk.Serialisation.V2;
|
||||||
|
using Speckle.Sdk.Serialisation.V2.Receive;
|
||||||
|
using Speckle.Sdk.Serialisation.V2.Send;
|
||||||
|
using Speckle.Sdk.SQLite;
|
||||||
|
using Speckle.Sdk.Transports;
|
||||||
|
using Speckle.Sdk.Transports.ServerUtils;
|
||||||
|
|
||||||
namespace Speckle.Sdk;
|
namespace Speckle.Sdk;
|
||||||
|
|
||||||
@@ -70,18 +79,39 @@ public static class ServiceRegistration
|
|||||||
);
|
);
|
||||||
serviceCollection.TryAddSingleton<ISdkActivityFactory, NullActivityFactory>();
|
serviceCollection.TryAddSingleton<ISdkActivityFactory, NullActivityFactory>();
|
||||||
serviceCollection.TryAddSingleton<ISdkMetricsFactory, NullSdkMetricsFactory>();
|
serviceCollection.TryAddSingleton<ISdkMetricsFactory, NullSdkMetricsFactory>();
|
||||||
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
|
serviceCollection.AddMatchingInterfacesAsTransient(
|
||||||
|
Assembly.GetExecutingAssembly(),
|
||||||
|
typeof(ServerTransport),
|
||||||
|
typeof(Account),
|
||||||
|
typeof(ServerApi),
|
||||||
|
typeof(SqLiteJsonCacheManager),
|
||||||
|
typeof(ServerObjectManager),
|
||||||
|
typeof(BaseSerializer),
|
||||||
|
typeof(SerializeProcess),
|
||||||
|
typeof(ObjectSaver),
|
||||||
|
typeof(ObjectSerializer),
|
||||||
|
typeof(ObjectDeserializer),
|
||||||
|
typeof(DeserializeProcess),
|
||||||
|
typeof(ObjectLoader),
|
||||||
|
typeof(TraversalRule),
|
||||||
|
typeof(Client)
|
||||||
|
);
|
||||||
serviceCollection.AddMatchingInterfacesAsTransient(typeof(GraphQLRetry).Assembly);
|
serviceCollection.AddMatchingInterfacesAsTransient(typeof(GraphQLRetry).Assembly);
|
||||||
return serviceCollection;
|
return serviceCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IServiceCollection AddMatchingInterfacesAsTransient(
|
public static IServiceCollection AddMatchingInterfacesAsTransient(
|
||||||
this IServiceCollection serviceCollection,
|
this IServiceCollection serviceCollection,
|
||||||
Assembly assembly
|
Assembly assembly,
|
||||||
|
params Type[] classesToIgnore
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
foreach (var type in assembly.ExportedTypes.Where(t => t.IsNonAbstractClass()))
|
foreach (var type in assembly.ExportedTypes.Where(t => t.IsNonAbstractClass()))
|
||||||
{
|
{
|
||||||
|
if (classesToIgnore.Contains(type))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
foreach (var matchingInterface in type.FindMatchingInterface())
|
foreach (var matchingInterface in type.FindMatchingInterface())
|
||||||
{
|
{
|
||||||
serviceCollection.TryAddTransient(matchingInterface, type);
|
serviceCollection.TryAddTransient(matchingInterface, type);
|
||||||
|
|||||||
@@ -1,50 +1,43 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup Label="Compiler Properties">
|
<PropertyGroup Label="Compiler Properties">
|
||||||
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
|
||||||
<Configurations>Debug;Release;Local</Configurations>
|
<Configurations>Debug;Release;Local</Configurations>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nugetspec Package Properties">
|
<PropertyGroup Label="Nugetspec Package Properties">
|
||||||
<PackageId>Speckle.Sdk</PackageId>
|
<PackageId>Speckle.Sdk</PackageId>
|
||||||
<Description>The .NET SDK for Speckle</Description>
|
<Description>The .NET SDK for Speckle</Description>
|
||||||
<PackageTags>$(PackageTags) core sdk</PackageTags>
|
<PackageTags>$(PackageTags) core sdk</PackageTags>
|
||||||
<NoWarn>$(NoWarn);CS8618</NoWarn>
|
<NoWarn>$(NoWarn);CS8618</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Label="Nuget Package Properties">
|
<PropertyGroup Label="Nuget Package Properties">
|
||||||
<IsPackable>true</IsPackable>
|
<IsPackable>true</IsPackable>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Label="Expose internals to test projects">
|
<ItemGroup Label="Expose internals to test projects">
|
||||||
<InternalsVisibleTo Include="Speckle.Sdk.Tests.Unit" />
|
<InternalsVisibleTo Include="Speckle.Sdk.Tests.Unit" />
|
||||||
<InternalsVisibleTo Include="Speckle.Sdk.Tests.Integration" />
|
<InternalsVisibleTo Include="Speckle.Sdk.Tests.Integration" />
|
||||||
<InternalsVisibleTo Include="Speckle.Sdk.Serialization.Tests" />
|
<InternalsVisibleTo Include="Speckle.Sdk.Serialization.Tests" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup Label="Package References">
|
||||||
<ItemGroup Label="Package References">
|
<PackageReference Include="GraphQL.Client" />
|
||||||
<PackageReference Include="GraphQL.Client"/>
|
|
||||||
<PackageReference Include="Microsoft.CSharp" />
|
<PackageReference Include="Microsoft.CSharp" />
|
||||||
<PackageReference Include="Microsoft.Data.Sqlite"/>
|
<PackageReference Include="Microsoft.Data.Sqlite" />
|
||||||
<PackageReference Include="Speckle.DoubleNumerics" />
|
<PackageReference Include="Speckle.DoubleNumerics" />
|
||||||
<PackageReference Include="Speckle.Newtonsoft.Json" />
|
<PackageReference Include="Speckle.Newtonsoft.Json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" OverrideVersion="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" OverrideVersion="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" OverrideVersion="8.0.0"/>
|
<PackageReference Include="Microsoft.Extensions.Logging" OverrideVersion="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0'">
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
|
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Dependencies\Speckle.Sdk.Dependencies.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Dependencies\Speckle.Sdk.Dependencies.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
namespace Speckle.Sdk;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// These are exceptions who's message is not user friendly
|
|
||||||
/// </summary>
|
|
||||||
public class SpeckleNonUserFacingException : SpeckleException
|
|
||||||
{
|
|
||||||
public SpeckleNonUserFacingException() { }
|
|
||||||
|
|
||||||
public SpeckleNonUserFacingException(string? message)
|
|
||||||
: base(message) { }
|
|
||||||
|
|
||||||
public SpeckleNonUserFacingException(string? message, Exception? innerException)
|
|
||||||
: base(message, innerException) { }
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,18 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit</PolySharpExcludeGeneratedTypes>
|
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit</PolySharpExcludeGeneratedTypes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="altcover" />
|
<PackageReference Include="altcover" />
|
||||||
<PackageReference Include="AwesomeAssertions" />
|
<PackageReference Include="AwesomeAssertions" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
<PackageReference Include="xunit.assert" />
|
<PackageReference Include="xunit.assert" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio"/>
|
<PackageReference Include="xunit.runner.visualstudio" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -60,8 +60,8 @@
|
|||||||
},
|
},
|
||||||
"Argon": {
|
"Argon": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.27.0",
|
"resolved": "0.28.0",
|
||||||
"contentHash": "LtZKATYeTwDyYq1AXrgVU/ly+nI6GvE0GK1isJYFPQOnb2uHUxvDA+yh40QYaITGTLViXK7rbWhNKpbZ5pb9XA=="
|
"contentHash": "78BmoFm8SK733nq4F/SjqNKkXJHdrg/MslvYfNjJX/nM/mEkltHUzPJRjBE9VI/zghsjFPQxMRPEUaqIgg98zg=="
|
||||||
},
|
},
|
||||||
"Castle.Core": {
|
"Castle.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -73,17 +73,17 @@
|
|||||||
},
|
},
|
||||||
"DiffEngine": {
|
"DiffEngine": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "16.1.0",
|
"resolved": "16.2.1",
|
||||||
"contentHash": "ImEFC6BN62paN0N7v8vrLY3x/LpfbJaJy5yDtL+/L2As6FI1npGJcFZwzz1A7pdDjIYPOXE91qv6BpgEUGjDkA==",
|
"contentHash": "UfMgXClqOGkPNfth210upiTY18LPCgjsfNrh0Olo5qI+QTkkCO6wHSuOwknxJdKtsWoaJ+E132Y2nzD0PiLWRw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"EmptyFiles": "8.8.0",
|
"EmptyFiles": "8.9.1",
|
||||||
"System.Management": "8.0.0"
|
"System.Management": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EmptyFiles": {
|
"EmptyFiles": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "8.8.0",
|
"resolved": "8.9.1",
|
||||||
"contentHash": "d0pgc/vMyKgQ9T3qiiJBn1uYUSZ1/OShh6tySnNSkELRSgM4A4IOrpdQhLqwCkPwYvdJqzKuxQ6wn3MQAd4GNA=="
|
"contentHash": "GbGf+oH/xiI3C5vJ5TnoA4sx7x7LhtOvN00fxihRZJsj40XuXk2TMz/4m26PfNSJj8JMAqo3BUBirjvam+3xkA=="
|
||||||
},
|
},
|
||||||
"FSharp.Core": {
|
"FSharp.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -265,8 +265,8 @@
|
|||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "BrMGzDRLz410PE4qC8UeKeAc0hFRjBkiCUOLTwuod65NAjqg5tDNqYU7gP0A09taEXtecB+HJc1NNnnTjsKFAQ=="
|
"contentHash": "WogPvgAFqQORFD8Iyha6RZ+/1QB3dsWRWxbwi8/HHVgiGQ8z0oMWpwe8Kk3Ti+Roe+P6a3sBg+WwBfEsyziZKg=="
|
||||||
},
|
},
|
||||||
"System.Management": {
|
"System.Management": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -311,13 +311,13 @@
|
|||||||
},
|
},
|
||||||
"Verify": {
|
"Verify": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "EhhwhXIeip9AJGWRPXh47NAUoiELnWzeBnAzFSl0+ryAfijTV1T+B4m6P6GbheWQ1CJ1cC1ZFLzgH276D5Bu3A==",
|
"contentHash": "wlqJ6ygXORa3lrAaErTA4EWkDcK9pBG2k5iC/I5F2UpWfyV7aXw/+SwGiWYe4XSk9d7VObe4xi4+0AV9rLRsBw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3"
|
"System.IO.Hashing": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit.abstractions": {
|
"xunit.abstractions": {
|
||||||
@@ -325,20 +325,6 @@
|
|||||||
"resolved": "2.0.3",
|
"resolved": "2.0.3",
|
||||||
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
||||||
},
|
},
|
||||||
"xunit.analyzers": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "1.18.0",
|
|
||||||
"contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ=="
|
|
||||||
},
|
|
||||||
"xunit.core": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.extensibility.core": "[2.9.3]",
|
|
||||||
"xunit.extensibility.execution": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.extensibility.core": {
|
"xunit.extensibility.core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.9.3",
|
"resolved": "2.9.3",
|
||||||
@@ -380,13 +366,10 @@
|
|||||||
"speckle.sdk.testing": {
|
"speckle.sdk.testing": {
|
||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NET.Test.Sdk": "[17.13.0, )",
|
|
||||||
"Moq": "[4.20.72, )",
|
"Moq": "[4.20.72, )",
|
||||||
"Speckle.Sdk": "[1.0.0, )",
|
"Speckle.Sdk": "[1.0.0, )",
|
||||||
"Verify.Quibble": "[2.1.1, )",
|
"Verify.Quibble": "[2.1.1, )",
|
||||||
"Verify.Xunit": "[29.2.0, )",
|
"Verify.Xunit": "[29.4.0, )"
|
||||||
"xunit": "[2.9.3, )",
|
|
||||||
"xunit.runner.visualstudio": "[3.0.2, )"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GraphQL.Client": {
|
"GraphQL.Client": {
|
||||||
@@ -468,29 +451,18 @@
|
|||||||
},
|
},
|
||||||
"Verify.Xunit": {
|
"Verify.Xunit": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[29.2.0, )",
|
"requested": "[29.4.0, )",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "MdcslVf40AzSA319ZHMzR+U4JqyquX28JFSrI9zA89yeZNaNcaSIb5PmE0XZ6p60Iy7eRYtnGEgSDimEUeXHZw==",
|
"contentHash": "P8HYW7aromKGm90Cgx0XKL3qKKmYZHDwHTQfBfDCCPnhNlVWevJzrpuUQ0+3vTVdRAtsts2a1OE/tD+3yjJbHA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3",
|
"System.IO.Hashing": "9.0.4",
|
||||||
"Verify": "29.2.0",
|
"Verify": "29.4.0",
|
||||||
"xunit.abstractions": "2.0.3",
|
"xunit.abstractions": "2.0.3",
|
||||||
"xunit.extensibility.execution": "2.9.3"
|
"xunit.extensibility.execution": "2.9.3"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"xunit": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.analyzers": "1.18.0",
|
|
||||||
"xunit.assert": "2.9.3",
|
|
||||||
"xunit.core": "[2.9.3]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
<PropertyGroup>
|
<OutputType>Exe</OutputType>
|
||||||
<OutputType>Exe</OutputType>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<Nullable>enable</Nullable>
|
||||||
<Nullable>enable</Nullable>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Tests.Performance\Speckle.Sdk.Tests.Performance.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Tests.Performance\Speckle.Sdk.Tests.Performance.csproj" />
|
||||||
@@ -13,5 +12,4 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class CancellationTests
|
|||||||
new SerializeProcessOptions(true, true, false, true)
|
new SerializeProcessOptions(true, true, false, true)
|
||||||
);
|
);
|
||||||
await cancellationSource.CancelAsync();
|
await cancellationSource.CancelAsync();
|
||||||
var ex = await Assert.ThrowsAsync<OperationCanceledException>(
|
var ex = await Assert.ThrowsAsync<OperationCanceledException>(async () =>
|
||||||
async () => await serializeProcess.Serialize(testClass)
|
await serializeProcess.Serialize(testClass)
|
||||||
);
|
);
|
||||||
await Verify(ex);
|
await Verify(ex);
|
||||||
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
||||||
@@ -62,8 +62,8 @@ public class CancellationTests
|
|||||||
cancellationSource.Token,
|
cancellationSource.Token,
|
||||||
new SerializeProcessOptions(true, true, false, true)
|
new SerializeProcessOptions(true, true, false, true)
|
||||||
);
|
);
|
||||||
var ex = await Assert.ThrowsAsync<OperationCanceledException>(
|
var ex = await Assert.ThrowsAsync<OperationCanceledException>(async () =>
|
||||||
async () => await serializeProcess.Serialize(testClass)
|
await serializeProcess.Serialize(testClass)
|
||||||
);
|
);
|
||||||
await Verify(ex);
|
await Verify(ex);
|
||||||
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
||||||
@@ -83,8 +83,8 @@ public class CancellationTests
|
|||||||
new SerializeProcessOptions(true, true, false, true)
|
new SerializeProcessOptions(true, true, false, true)
|
||||||
);
|
);
|
||||||
|
|
||||||
var ex = await Assert.ThrowsAsync<OperationCanceledException>(
|
var ex = await Assert.ThrowsAsync<OperationCanceledException>(async () =>
|
||||||
async () => await serializeProcess.Serialize(testClass)
|
await serializeProcess.Serialize(testClass)
|
||||||
);
|
);
|
||||||
await Verify(ex);
|
await Verify(ex);
|
||||||
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
cancellationSource.IsCancellationRequested.Should().BeTrue();
|
||||||
|
|||||||
@@ -1,30 +1,25 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="altcover" />
|
<PackageReference Include="altcover" />
|
||||||
<PackageReference Include="AwesomeAssertions" />
|
<PackageReference Include="AwesomeAssertions" />
|
||||||
<PackageReference Include="HttpMultipartParser" />
|
<PackageReference Include="HttpMultipartParser" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
<PackageReference Include="Moq" />
|
<PackageReference Include="Moq" />
|
||||||
<PackageReference Include="RichardSzalay.MockHttp" />
|
<PackageReference Include="RichardSzalay.MockHttp" />
|
||||||
<PackageReference Include="xunit.assert" />
|
<PackageReference Include="xunit.assert" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio"/>
|
<PackageReference Include="xunit.runner.visualstudio" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
||||||
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="RevitObject.json.gz" />
|
<EmbeddedResource Include="RevitObject.json.gz" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -95,8 +95,8 @@
|
|||||||
},
|
},
|
||||||
"Argon": {
|
"Argon": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.27.0",
|
"resolved": "0.28.0",
|
||||||
"contentHash": "LtZKATYeTwDyYq1AXrgVU/ly+nI6GvE0GK1isJYFPQOnb2uHUxvDA+yh40QYaITGTLViXK7rbWhNKpbZ5pb9XA=="
|
"contentHash": "78BmoFm8SK733nq4F/SjqNKkXJHdrg/MslvYfNjJX/nM/mEkltHUzPJRjBE9VI/zghsjFPQxMRPEUaqIgg98zg=="
|
||||||
},
|
},
|
||||||
"Castle.Core": {
|
"Castle.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -108,17 +108,17 @@
|
|||||||
},
|
},
|
||||||
"DiffEngine": {
|
"DiffEngine": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "16.1.0",
|
"resolved": "16.2.1",
|
||||||
"contentHash": "ImEFC6BN62paN0N7v8vrLY3x/LpfbJaJy5yDtL+/L2As6FI1npGJcFZwzz1A7pdDjIYPOXE91qv6BpgEUGjDkA==",
|
"contentHash": "UfMgXClqOGkPNfth210upiTY18LPCgjsfNrh0Olo5qI+QTkkCO6wHSuOwknxJdKtsWoaJ+E132Y2nzD0PiLWRw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"EmptyFiles": "8.8.0",
|
"EmptyFiles": "8.9.1",
|
||||||
"System.Management": "8.0.0"
|
"System.Management": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EmptyFiles": {
|
"EmptyFiles": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "8.8.0",
|
"resolved": "8.9.1",
|
||||||
"contentHash": "d0pgc/vMyKgQ9T3qiiJBn1uYUSZ1/OShh6tySnNSkELRSgM4A4IOrpdQhLqwCkPwYvdJqzKuxQ6wn3MQAd4GNA=="
|
"contentHash": "GbGf+oH/xiI3C5vJ5TnoA4sx7x7LhtOvN00fxihRZJsj40XuXk2TMz/4m26PfNSJj8JMAqo3BUBirjvam+3xkA=="
|
||||||
},
|
},
|
||||||
"FSharp.Core": {
|
"FSharp.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -310,8 +310,8 @@
|
|||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "BrMGzDRLz410PE4qC8UeKeAc0hFRjBkiCUOLTwuod65NAjqg5tDNqYU7gP0A09taEXtecB+HJc1NNnnTjsKFAQ=="
|
"contentHash": "WogPvgAFqQORFD8Iyha6RZ+/1QB3dsWRWxbwi8/HHVgiGQ8z0oMWpwe8Kk3Ti+Roe+P6a3sBg+WwBfEsyziZKg=="
|
||||||
},
|
},
|
||||||
"System.Management": {
|
"System.Management": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -356,13 +356,13 @@
|
|||||||
},
|
},
|
||||||
"Verify": {
|
"Verify": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "EhhwhXIeip9AJGWRPXh47NAUoiELnWzeBnAzFSl0+ryAfijTV1T+B4m6P6GbheWQ1CJ1cC1ZFLzgH276D5Bu3A==",
|
"contentHash": "wlqJ6ygXORa3lrAaErTA4EWkDcK9pBG2k5iC/I5F2UpWfyV7aXw/+SwGiWYe4XSk9d7VObe4xi4+0AV9rLRsBw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3"
|
"System.IO.Hashing": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit.abstractions": {
|
"xunit.abstractions": {
|
||||||
@@ -370,20 +370,6 @@
|
|||||||
"resolved": "2.0.3",
|
"resolved": "2.0.3",
|
||||||
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
||||||
},
|
},
|
||||||
"xunit.analyzers": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "1.18.0",
|
|
||||||
"contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ=="
|
|
||||||
},
|
|
||||||
"xunit.core": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.extensibility.core": "[2.9.3]",
|
|
||||||
"xunit.extensibility.execution": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.extensibility.core": {
|
"xunit.extensibility.core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.9.3",
|
"resolved": "2.9.3",
|
||||||
@@ -425,13 +411,10 @@
|
|||||||
"speckle.sdk.testing": {
|
"speckle.sdk.testing": {
|
||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NET.Test.Sdk": "[17.13.0, )",
|
|
||||||
"Moq": "[4.20.72, )",
|
"Moq": "[4.20.72, )",
|
||||||
"Speckle.Sdk": "[1.0.0, )",
|
"Speckle.Sdk": "[1.0.0, )",
|
||||||
"Verify.Quibble": "[2.1.1, )",
|
"Verify.Quibble": "[2.1.1, )",
|
||||||
"Verify.Xunit": "[29.2.0, )",
|
"Verify.Xunit": "[29.4.0, )"
|
||||||
"xunit": "[2.9.3, )",
|
|
||||||
"xunit.runner.visualstudio": "[3.0.2, )"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GraphQL.Client": {
|
"GraphQL.Client": {
|
||||||
@@ -504,29 +487,18 @@
|
|||||||
},
|
},
|
||||||
"Verify.Xunit": {
|
"Verify.Xunit": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[29.2.0, )",
|
"requested": "[29.4.0, )",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "MdcslVf40AzSA319ZHMzR+U4JqyquX28JFSrI9zA89yeZNaNcaSIb5PmE0XZ6p60Iy7eRYtnGEgSDimEUeXHZw==",
|
"contentHash": "P8HYW7aromKGm90Cgx0XKL3qKKmYZHDwHTQfBfDCCPnhNlVWevJzrpuUQ0+3vTVdRAtsts2a1OE/tD+3yjJbHA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3",
|
"System.IO.Hashing": "9.0.4",
|
||||||
"Verify": "29.2.0",
|
"Verify": "29.4.0",
|
||||||
"xunit.abstractions": "2.0.3",
|
"xunit.abstractions": "2.0.3",
|
||||||
"xunit.extensibility.execution": "2.9.3"
|
"xunit.extensibility.execution": "2.9.3"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"xunit": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.analyzers": "1.18.0",
|
|
||||||
"xunit.assert": "2.9.3",
|
|
||||||
"xunit.core": "[2.9.3]"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
<PropertyGroup>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<IsTestProject>true</IsTestProject>
|
||||||
<IsTestProject>true</IsTestProject>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Moq" />
|
||||||
<ItemGroup>
|
<PackageReference Include="Verify.Quibble" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Verify.Xunit" />
|
||||||
<PackageReference Include="Moq" />
|
</ItemGroup>
|
||||||
<PackageReference Include="Verify.Quibble" />
|
<ItemGroup>
|
||||||
<PackageReference Include="Verify.Xunit" />
|
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
||||||
<PackageReference Include="xunit" />
|
</ItemGroup>
|
||||||
<PackageReference Include="xunit.runner.visualstudio"/>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -2,16 +2,6 @@
|
|||||||
"version": 2,
|
"version": 2,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"net8.0": {
|
"net8.0": {
|
||||||
"Microsoft.NET.Test.Sdk": {
|
|
||||||
"type": "Direct",
|
|
||||||
"requested": "[17.13.0, )",
|
|
||||||
"resolved": "17.13.0",
|
|
||||||
"contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==",
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.CodeCoverage": "17.13.0",
|
|
||||||
"Microsoft.TestPlatform.TestHost": "17.13.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.SourceLink.GitHub": {
|
"Microsoft.SourceLink.GitHub": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[8.0.0, )",
|
"requested": "[8.0.0, )",
|
||||||
@@ -56,40 +46,23 @@
|
|||||||
},
|
},
|
||||||
"Verify.Xunit": {
|
"Verify.Xunit": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[29.2.0, )",
|
"requested": "[29.4.0, )",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "MdcslVf40AzSA319ZHMzR+U4JqyquX28JFSrI9zA89yeZNaNcaSIb5PmE0XZ6p60Iy7eRYtnGEgSDimEUeXHZw==",
|
"contentHash": "P8HYW7aromKGm90Cgx0XKL3qKKmYZHDwHTQfBfDCCPnhNlVWevJzrpuUQ0+3vTVdRAtsts2a1OE/tD+3yjJbHA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3",
|
"System.IO.Hashing": "9.0.4",
|
||||||
"Verify": "29.2.0",
|
"Verify": "29.4.0",
|
||||||
"xunit.abstractions": "2.0.3",
|
"xunit.abstractions": "2.0.3",
|
||||||
"xunit.extensibility.execution": "2.9.3"
|
"xunit.extensibility.execution": "2.9.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit": {
|
|
||||||
"type": "Direct",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.analyzers": "1.18.0",
|
|
||||||
"xunit.assert": "2.9.3",
|
|
||||||
"xunit.core": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.runner.visualstudio": {
|
|
||||||
"type": "Direct",
|
|
||||||
"requested": "[3.0.2, )",
|
|
||||||
"resolved": "3.0.2",
|
|
||||||
"contentHash": "oXbusR6iPq0xlqoikjdLvzh+wQDkMv9If58myz9MEzldS4nIcp442Btgs2sWbYWV+caEluMe2pQCZ0hUZgPiow=="
|
|
||||||
},
|
|
||||||
"Argon": {
|
"Argon": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.27.0",
|
"resolved": "0.28.0",
|
||||||
"contentHash": "LtZKATYeTwDyYq1AXrgVU/ly+nI6GvE0GK1isJYFPQOnb2uHUxvDA+yh40QYaITGTLViXK7rbWhNKpbZ5pb9XA=="
|
"contentHash": "78BmoFm8SK733nq4F/SjqNKkXJHdrg/MslvYfNjJX/nM/mEkltHUzPJRjBE9VI/zghsjFPQxMRPEUaqIgg98zg=="
|
||||||
},
|
},
|
||||||
"Castle.Core": {
|
"Castle.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -101,17 +74,17 @@
|
|||||||
},
|
},
|
||||||
"DiffEngine": {
|
"DiffEngine": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "16.1.0",
|
"resolved": "16.2.1",
|
||||||
"contentHash": "ImEFC6BN62paN0N7v8vrLY3x/LpfbJaJy5yDtL+/L2As6FI1npGJcFZwzz1A7pdDjIYPOXE91qv6BpgEUGjDkA==",
|
"contentHash": "UfMgXClqOGkPNfth210upiTY18LPCgjsfNrh0Olo5qI+QTkkCO6wHSuOwknxJdKtsWoaJ+E132Y2nzD0PiLWRw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"EmptyFiles": "8.8.0",
|
"EmptyFiles": "8.9.1",
|
||||||
"System.Management": "8.0.0"
|
"System.Management": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EmptyFiles": {
|
"EmptyFiles": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "8.8.0",
|
"resolved": "8.9.1",
|
||||||
"contentHash": "d0pgc/vMyKgQ9T3qiiJBn1uYUSZ1/OShh6tySnNSkELRSgM4A4IOrpdQhLqwCkPwYvdJqzKuxQ6wn3MQAd4GNA=="
|
"contentHash": "GbGf+oH/xiI3C5vJ5TnoA4sx7x7LhtOvN00fxihRZJsj40XuXk2TMz/4m26PfNSJj8JMAqo3BUBirjvam+3xkA=="
|
||||||
},
|
},
|
||||||
"FSharp.Core": {
|
"FSharp.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -144,11 +117,6 @@
|
|||||||
"resolved": "8.0.0",
|
"resolved": "8.0.0",
|
||||||
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
|
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
|
||||||
},
|
},
|
||||||
"Microsoft.CodeCoverage": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "17.13.0",
|
|
||||||
"contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg=="
|
|
||||||
},
|
|
||||||
"Microsoft.Data.Sqlite.Core": {
|
"Microsoft.Data.Sqlite.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "7.0.5",
|
"resolved": "7.0.5",
|
||||||
@@ -210,28 +178,6 @@
|
|||||||
"resolved": "8.0.0",
|
"resolved": "8.0.0",
|
||||||
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
|
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
|
||||||
},
|
},
|
||||||
"Microsoft.TestPlatform.ObjectModel": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "17.13.0",
|
|
||||||
"contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==",
|
|
||||||
"dependencies": {
|
|
||||||
"System.Reflection.Metadata": "1.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.TestPlatform.TestHost": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "17.13.0",
|
|
||||||
"contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.TestPlatform.ObjectModel": "17.13.0",
|
|
||||||
"Newtonsoft.Json": "13.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Newtonsoft.Json": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "13.0.1",
|
|
||||||
"contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A=="
|
|
||||||
},
|
|
||||||
"Quibble": {
|
"Quibble": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.3.1",
|
"resolved": "0.3.1",
|
||||||
@@ -293,8 +239,8 @@
|
|||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "BrMGzDRLz410PE4qC8UeKeAc0hFRjBkiCUOLTwuod65NAjqg5tDNqYU7gP0A09taEXtecB+HJc1NNnnTjsKFAQ=="
|
"contentHash": "WogPvgAFqQORFD8Iyha6RZ+/1QB3dsWRWxbwi8/HHVgiGQ8z0oMWpwe8Kk3Ti+Roe+P6a3sBg+WwBfEsyziZKg=="
|
||||||
},
|
},
|
||||||
"System.Management": {
|
"System.Management": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -314,11 +260,6 @@
|
|||||||
"resolved": "5.0.0",
|
"resolved": "5.0.0",
|
||||||
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ=="
|
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ=="
|
||||||
},
|
},
|
||||||
"System.Reflection.Metadata": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "1.6.0",
|
|
||||||
"contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ=="
|
|
||||||
},
|
|
||||||
"System.Runtime.CompilerServices.Unsafe": {
|
"System.Runtime.CompilerServices.Unsafe": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "4.5.1",
|
"resolved": "4.5.1",
|
||||||
@@ -339,13 +280,13 @@
|
|||||||
},
|
},
|
||||||
"Verify": {
|
"Verify": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "EhhwhXIeip9AJGWRPXh47NAUoiELnWzeBnAzFSl0+ryAfijTV1T+B4m6P6GbheWQ1CJ1cC1ZFLzgH276D5Bu3A==",
|
"contentHash": "wlqJ6ygXORa3lrAaErTA4EWkDcK9pBG2k5iC/I5F2UpWfyV7aXw/+SwGiWYe4XSk9d7VObe4xi4+0AV9rLRsBw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3"
|
"System.IO.Hashing": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit.abstractions": {
|
"xunit.abstractions": {
|
||||||
@@ -353,20 +294,6 @@
|
|||||||
"resolved": "2.0.3",
|
"resolved": "2.0.3",
|
||||||
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
||||||
},
|
},
|
||||||
"xunit.analyzers": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "1.18.0",
|
|
||||||
"contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ=="
|
|
||||||
},
|
|
||||||
"xunit.core": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.extensibility.core": "[2.9.3]",
|
|
||||||
"xunit.extensibility.execution": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.extensibility.core": {
|
"xunit.extensibility.core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.9.3",
|
"resolved": "2.9.3",
|
||||||
@@ -455,12 +382,6 @@
|
|||||||
"requested": "[13.0.2, )",
|
"requested": "[13.0.2, )",
|
||||||
"resolved": "13.0.2",
|
"resolved": "13.0.2",
|
||||||
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
|
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
|
||||||
},
|
|
||||||
"xunit.assert": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA=="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime
|
|||||||
|
|
||||||
""";
|
""";
|
||||||
GraphQLRequest request = new(query: QUERY);
|
GraphQLRequest request = new(query: QUERY);
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => await _sut.ExecuteGraphQLRequest<dynamic>(request).ConfigureAwait(false)
|
await _sut.ExecuteGraphQLRequest<dynamic>(request).ConfigureAwait(false)
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.OfType<SpeckleGraphQLForbiddenException>().Count().Should().Be(1);
|
ex.InnerExceptions.OfType<SpeckleGraphQLForbiddenException>().Count().Should().Be(1);
|
||||||
}
|
}
|
||||||
@@ -66,8 +66,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime
|
|||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
GraphQLRequest request = new(query: QUERY);
|
GraphQLRequest request = new(query: QUERY);
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => await _sut.ExecuteGraphQLRequest<dynamic>(request).ConfigureAwait(false)
|
await _sut.ExecuteGraphQLRequest<dynamic>(request).ConfigureAwait(false)
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.OfType<SpeckleGraphQLInvalidQueryException>().Count().Should().Be(1);
|
ex.InnerExceptions.OfType<SpeckleGraphQLInvalidQueryException>().Count().Should().Be(1);
|
||||||
}
|
}
|
||||||
@@ -79,8 +79,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime
|
|||||||
public async Task TestGraphQLLayer_BadInput()
|
public async Task TestGraphQLLayer_BadInput()
|
||||||
{
|
{
|
||||||
ProjectUpdateRoleInput input = new(null!, null!, null);
|
ProjectUpdateRoleInput input = new(null!, null!, null);
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => await _sut.Project.UpdateRole(input).ConfigureAwait(false)
|
await _sut.Project.UpdateRole(input).ConfigureAwait(false)
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.OfType<SpeckleGraphQLBadInputException>().Count().Should().Be(2);
|
ex.InnerExceptions.OfType<SpeckleGraphQLBadInputException>().Count().Should().Be(2);
|
||||||
}
|
}
|
||||||
@@ -91,8 +91,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime
|
|||||||
using CancellationTokenSource cts = new();
|
using CancellationTokenSource cts = new();
|
||||||
await cts.CancelAsync();
|
await cts.CancelAsync();
|
||||||
|
|
||||||
var ex = await Assert.ThrowsAsync<TaskCanceledException>(
|
var ex = await Assert.ThrowsAsync<TaskCanceledException>(async () =>
|
||||||
async () => await _sut.ActiveUser.Get(cts.Token).ConfigureAwait(false)
|
await _sut.ActiveUser.Get(cts.Token).ConfigureAwait(false)
|
||||||
);
|
);
|
||||||
|
|
||||||
ex.CancellationToken.Should().BeEquivalentTo(cts.Token);
|
ex.CancellationToken.Should().BeEquivalentTo(cts.Token);
|
||||||
@@ -121,8 +121,8 @@ public class GraphQLClientExceptionHandling : IAsyncLifetime
|
|||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
GraphQLRequest request = new(query: QUERY);
|
GraphQLRequest request = new(query: QUERY);
|
||||||
await Assert.ThrowsAsync<JsonReaderException>(
|
await Assert.ThrowsAsync<JsonReaderException>(async () =>
|
||||||
async () => await _sut.ExecuteGraphQLRequest<int>(request).ConfigureAwait(false)
|
await _sut.ExecuteGraphQLRequest<int>(request).ConfigureAwait(false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Type": "AggregateException",
|
||||||
|
"InnerException": {
|
||||||
|
"Data": {},
|
||||||
|
"Message": "WORKSPACES_MODULE_DISABLED_ERROR: Workspaces are not enabled on this server",
|
||||||
|
"Type": "SpeckleGraphQLException"
|
||||||
|
}
|
||||||
|
}
|
||||||
+51
-1
@@ -72,6 +72,56 @@ public class ActiveUserResourceTests : IAsyncLifetime
|
|||||||
await FluentActions
|
await FluentActions
|
||||||
.Invoking(async () => await Fixtures.Unauthed.ActiveUser.GetProjects())
|
.Invoking(async () => await Fixtures.Unauthed.ActiveUser.GetProjects())
|
||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<SpeckleGraphQLException>();
|
.ThrowAsync<SpeckleException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserProjectCreationPermission()
|
||||||
|
{
|
||||||
|
var res = await Sut.CanCreatePersonalProjects();
|
||||||
|
res.EnsureAuthorised();
|
||||||
|
|
||||||
|
res.authorized.Should().Be(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserProjectCreationPermission_NoAuth()
|
||||||
|
{
|
||||||
|
await FluentActions
|
||||||
|
.Invoking(async () => await Fixtures.Unauthed.ActiveUser.CanCreatePersonalProjects())
|
||||||
|
.Should()
|
||||||
|
.ThrowAsync<SpeckleException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserGetWorkspaces()
|
||||||
|
{
|
||||||
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () => _ = await Sut.GetWorkspaces());
|
||||||
|
await Verify(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserGetWorkspaces_NoAuth()
|
||||||
|
{
|
||||||
|
await FluentActions
|
||||||
|
.Invoking(async () => await Fixtures.Unauthed.ActiveUser.GetWorkspaces())
|
||||||
|
.Should()
|
||||||
|
.ThrowAsync<SpeckleException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserGetActiveWorkspace()
|
||||||
|
{
|
||||||
|
var res = await Sut.GetActiveWorkspace();
|
||||||
|
res.Should().Be(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ActiveUserGetActiveWorkspace_NoAuth()
|
||||||
|
{
|
||||||
|
await FluentActions
|
||||||
|
.Invoking(async () => await Fixtures.Unauthed.ActiveUser.GetActiveWorkspace())
|
||||||
|
.Should()
|
||||||
|
.ThrowAsync<SpeckleException>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+19
-9
@@ -54,8 +54,8 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime
|
|||||||
|
|
||||||
Project privateStream = await Sut.Create(input);
|
Project privateStream = await Sut.Create(input);
|
||||||
|
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => _ = await _unauthedUser.Project.Get(privateStream.id)
|
_ = await _unauthedUser.Project.Get(privateStream.id)
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
||||||
}
|
}
|
||||||
@@ -70,8 +70,8 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task ProjectUpdate_NonExistentProject()
|
public async Task ProjectUpdate_NonExistentProject()
|
||||||
{
|
{
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => _ = await Sut.Update(new("NonExistentProject", "My new name"))
|
_ = await Sut.Update(new("NonExistentProject", "My new name"))
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLStreamNotFoundException>();
|
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLStreamNotFoundException>();
|
||||||
}
|
}
|
||||||
@@ -79,12 +79,23 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task ProjectUpdate_NoAuth()
|
public async Task ProjectUpdate_NoAuth()
|
||||||
{
|
{
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
async () => _ = await _unauthedUser.Project.Update(new(_testProject.id, "My new name"))
|
_ = await _unauthedUser.Project.Update(new(_testProject.id, "My new name"))
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ProjectCreateInWorkspace_NonWorkspaceServer()
|
||||||
|
{
|
||||||
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () =>
|
||||||
|
_ = await _unauthedUser.Project.CreateInWorkspace(
|
||||||
|
new(_testProject.id, "My new name", ProjectVisibility.Unlisted, "NonExistentWorkspace")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLException>();
|
||||||
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData(StreamRoles.STREAM_OWNER)]
|
[InlineData(StreamRoles.STREAM_OWNER)]
|
||||||
[InlineData(StreamRoles.STREAM_CONTRIBUTOR)]
|
[InlineData(StreamRoles.STREAM_CONTRIBUTOR)]
|
||||||
@@ -107,8 +118,7 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime
|
|||||||
{
|
{
|
||||||
ProjectUpdateRoleInput input = new(_secondUser.Account.id.NotNull(), "NonExistentProject", newRole);
|
ProjectUpdateRoleInput input = new(_secondUser.Account.id.NotNull(), "NonExistentProject", newRole);
|
||||||
|
|
||||||
var ex = await Assert.ThrowsAsync<AggregateException>(
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () => _ = await _unauthedUser.Project.UpdateRole(input)
|
||||||
async () => _ = await _unauthedUser.Project.UpdateRole(input)
|
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
ex.InnerExceptions.Single().Should().BeOfType<SpeckleGraphQLForbiddenException>();
|
||||||
}
|
}
|
||||||
@@ -125,6 +135,6 @@ public class ProjectResourceExceptionalTests : IAsyncLifetime
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task ProjectInvites_NoAuth()
|
public async Task ProjectInvites_NoAuth()
|
||||||
{
|
{
|
||||||
await Assert.ThrowsAsync<SpeckleException>(async () => await Fixtures.Unauthed.ActiveUser.ProjectInvites());
|
await Assert.ThrowsAsync<SpeckleException>(async () => await Fixtures.Unauthed.ActiveUser.GetProjectInvites());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class ProjectResourceTests
|
|||||||
(_testUser, _testProject) = setupTask.Result;
|
(_testUser, _testProject) = setupTask.Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<(IClient TestUser, Project TestProject)> Setup()
|
private static async Task<(IClient TestUser, Project TestProject)> Setup()
|
||||||
{
|
{
|
||||||
var testUser = await Fixtures.SeedUserWithClient();
|
var testUser = await Fixtures.SeedUserWithClient();
|
||||||
var testProject = await testUser.Project.Create(new ProjectCreateInput("test project123", "desc", null));
|
var testProject = await testUser.Project.Create(new ProjectCreateInput("test project123", "desc", null));
|
||||||
@@ -99,4 +99,12 @@ public class ProjectResourceTests
|
|||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<SpeckleGraphQLStreamNotFoundException>();
|
.ThrowAsync<SpeckleGraphQLStreamNotFoundException>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task TestUserHasProjectPermissions()
|
||||||
|
{
|
||||||
|
var res = await Sut.GetPermissions(_testProject.id);
|
||||||
|
res.canCreateModel.authorized.Should().Be(true);
|
||||||
|
res.canDelete.authorized.Should().Be(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Type": "AggregateException",
|
||||||
|
"InnerException": {
|
||||||
|
"Data": {},
|
||||||
|
"Message": "FORBIDDEN: Your auth token does not have the required scope: workspace:read.",
|
||||||
|
"Type": "SpeckleGraphQLForbiddenException"
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"Type": "AggregateException",
|
||||||
|
"InnerException": {
|
||||||
|
"Data": {},
|
||||||
|
"Message": "FORBIDDEN: Your auth token does not have the required scope: workspace:read.",
|
||||||
|
"Type": "SpeckleGraphQLForbiddenException"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using Speckle.Sdk.Api;
|
||||||
|
using Speckle.Sdk.Api.GraphQL.Resources;
|
||||||
|
|
||||||
|
namespace Speckle.Sdk.Tests.Integration.API.GraphQL.Resources;
|
||||||
|
|
||||||
|
public class WorkspaceResourceTests
|
||||||
|
{
|
||||||
|
private readonly IClient _testUser;
|
||||||
|
private WorkspaceResource Sut => _testUser.Workspace;
|
||||||
|
|
||||||
|
public WorkspaceResourceTests()
|
||||||
|
{
|
||||||
|
var setupTask = Setup();
|
||||||
|
setupTask.Wait(); // Ensure setup runs synchronously for the constructor
|
||||||
|
_testUser = setupTask.Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static async Task<IClient> Setup()
|
||||||
|
{
|
||||||
|
var testUser = await Fixtures.SeedUserWithClient();
|
||||||
|
return testUser;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task TestGetWorkspace()
|
||||||
|
{
|
||||||
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () => _ = await Sut.Get("non-existent-id"));
|
||||||
|
await Verify(ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task TestGetProjects()
|
||||||
|
{
|
||||||
|
var ex = await Assert.ThrowsAsync<AggregateException>(async () => _ = await Sut.GetProjects("non-existent-id"));
|
||||||
|
await Verify(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,8 +40,8 @@ public class UserServerInfoTests : IAsyncLifetime
|
|||||||
Uri serverUrl = new(_acc.serverInfo.url);
|
Uri serverUrl = new(_acc.serverInfo.url);
|
||||||
|
|
||||||
await FluentActions
|
await FluentActions
|
||||||
.Invoking(
|
.Invoking(async () =>
|
||||||
async () => await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetServerInfo(serverUrl)
|
await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetServerInfo(serverUrl)
|
||||||
)
|
)
|
||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<HttpRequestException>();
|
.ThrowAsync<HttpRequestException>();
|
||||||
@@ -53,8 +53,8 @@ public class UserServerInfoTests : IAsyncLifetime
|
|||||||
Uri serverUrl = new("http://invalidserver.local");
|
Uri serverUrl = new("http://invalidserver.local");
|
||||||
|
|
||||||
await FluentActions
|
await FluentActions
|
||||||
.Invoking(
|
.Invoking(async () =>
|
||||||
async () => await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetServerInfo(serverUrl)
|
await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetServerInfo(serverUrl)
|
||||||
)
|
)
|
||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<HttpRequestException>();
|
.ThrowAsync<HttpRequestException>();
|
||||||
@@ -81,8 +81,8 @@ public class UserServerInfoTests : IAsyncLifetime
|
|||||||
Uri serverUrl = new("http://invalidserver.local");
|
Uri serverUrl = new("http://invalidserver.local");
|
||||||
|
|
||||||
await FluentActions
|
await FluentActions
|
||||||
.Invoking(
|
.Invoking(async () =>
|
||||||
async () => await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetUserInfo("", serverUrl)
|
await Fixtures.ServiceProvider.GetRequiredService<IAccountManager>().GetUserInfo("", serverUrl)
|
||||||
)
|
)
|
||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<HttpRequestException>();
|
.ThrowAsync<HttpRequestException>();
|
||||||
@@ -93,11 +93,10 @@ public class UserServerInfoTests : IAsyncLifetime
|
|||||||
{
|
{
|
||||||
Uri serverUrl = new(_acc.serverInfo.url);
|
Uri serverUrl = new(_acc.serverInfo.url);
|
||||||
await FluentActions
|
await FluentActions
|
||||||
.Invoking(
|
.Invoking(async () =>
|
||||||
async () =>
|
await Fixtures
|
||||||
await Fixtures
|
.ServiceProvider.GetRequiredService<IAccountManager>()
|
||||||
.ServiceProvider.GetRequiredService<IAccountManager>()
|
.GetUserInfo("Bearer 08913c3c1e7ac65d779d1e1f11b942a44ad9672ca9", serverUrl)
|
||||||
.GetUserInfo("Bearer 08913c3c1e7ac65d779d1e1f11b942a44ad9672ca9", serverUrl)
|
|
||||||
)
|
)
|
||||||
.Should()
|
.Should()
|
||||||
.ThrowAsync<GraphQLHttpRequestException>();
|
.ThrowAsync<GraphQLHttpRequestException>();
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ using Speckle.Sdk.Common;
|
|||||||
using Speckle.Sdk.Credentials;
|
using Speckle.Sdk.Credentials;
|
||||||
using Speckle.Sdk.Host;
|
using Speckle.Sdk.Host;
|
||||||
using Speckle.Sdk.Models;
|
using Speckle.Sdk.Models;
|
||||||
using Speckle.Sdk.Tests.Unit.Serialisation;
|
|
||||||
using Speckle.Sdk.Transports;
|
using Speckle.Sdk.Transports;
|
||||||
using Version = Speckle.Sdk.Api.GraphQL.Models.Version;
|
using Version = Speckle.Sdk.Api.GraphQL.Models.Version;
|
||||||
|
|
||||||
@@ -26,7 +25,7 @@ public static class Fixtures
|
|||||||
static Fixtures()
|
static Fixtures()
|
||||||
{
|
{
|
||||||
TypeLoader.Reset();
|
TypeLoader.Reset();
|
||||||
TypeLoader.Initialize(typeof(Base).Assembly, typeof(IgnoreTest).Assembly);
|
TypeLoader.Initialize(typeof(Base).Assembly);
|
||||||
ServiceProvider = TestServiceSetup.GetServiceProvider();
|
ServiceProvider = TestServiceSetup.GetServiceProvider();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit</PolySharpExcludeGeneratedTypes>
|
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit</PolySharpExcludeGeneratedTypes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="altcover" />
|
<PackageReference Include="altcover" />
|
||||||
|
<PackageReference Include="AwesomeAssertions" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
<PackageReference Include="xunit" />
|
<PackageReference Include="xunit" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio"/>
|
<PackageReference Include="xunit.runner.visualstudio" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Tests.Unit\Speckle.Sdk.Tests.Unit.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace Speckle.Sdk.Tests.Integration;
|
||||||
|
|
||||||
|
public static class SpeckleVerify
|
||||||
|
{
|
||||||
|
private static bool s_initialized;
|
||||||
|
|
||||||
|
[ModuleInitializer]
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
if (s_initialized)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Testing.SpeckleVerify.Initialize();
|
||||||
|
s_initialized = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,21 @@
|
|||||||
"resolved": "9.0.1",
|
"resolved": "9.0.1",
|
||||||
"contentHash": "aadciFNDT5bnylaYUkKal+s5hF7yU/lmZxImQWAlk1438iPqK1Uf79H5ylELpyLIU49HL5ql+tnWBihp3WVLCA=="
|
"contentHash": "aadciFNDT5bnylaYUkKal+s5hF7yU/lmZxImQWAlk1438iPqK1Uf79H5ylELpyLIU49HL5ql+tnWBihp3WVLCA=="
|
||||||
},
|
},
|
||||||
|
"AwesomeAssertions": {
|
||||||
|
"type": "Direct",
|
||||||
|
"requested": "[8.1.0, )",
|
||||||
|
"resolved": "8.1.0",
|
||||||
|
"contentHash": "IfNC4cpXPi9tclWvuNO9lfkuIxJsUTLTS1NXto55jDrAUQJYl0zLI9ByISrfkbBE2Xtg+IWaAXQ6jnUx3anDuw=="
|
||||||
|
},
|
||||||
|
"Microsoft.Extensions.DependencyInjection": {
|
||||||
|
"type": "Direct",
|
||||||
|
"requested": "[2.2.0, )",
|
||||||
|
"resolved": "2.2.0",
|
||||||
|
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
|
||||||
|
"dependencies": {
|
||||||
|
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"Microsoft.NET.Test.Sdk": {
|
"Microsoft.NET.Test.Sdk": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[17.13.0, )",
|
"requested": "[17.13.0, )",
|
||||||
@@ -59,8 +74,8 @@
|
|||||||
},
|
},
|
||||||
"Argon": {
|
"Argon": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.27.0",
|
"resolved": "0.28.0",
|
||||||
"contentHash": "LtZKATYeTwDyYq1AXrgVU/ly+nI6GvE0GK1isJYFPQOnb2uHUxvDA+yh40QYaITGTLViXK7rbWhNKpbZ5pb9XA=="
|
"contentHash": "78BmoFm8SK733nq4F/SjqNKkXJHdrg/MslvYfNjJX/nM/mEkltHUzPJRjBE9VI/zghsjFPQxMRPEUaqIgg98zg=="
|
||||||
},
|
},
|
||||||
"Castle.Core": {
|
"Castle.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -72,17 +87,17 @@
|
|||||||
},
|
},
|
||||||
"DiffEngine": {
|
"DiffEngine": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "16.1.0",
|
"resolved": "16.2.1",
|
||||||
"contentHash": "ImEFC6BN62paN0N7v8vrLY3x/LpfbJaJy5yDtL+/L2As6FI1npGJcFZwzz1A7pdDjIYPOXE91qv6BpgEUGjDkA==",
|
"contentHash": "UfMgXClqOGkPNfth210upiTY18LPCgjsfNrh0Olo5qI+QTkkCO6wHSuOwknxJdKtsWoaJ+E132Y2nzD0PiLWRw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"EmptyFiles": "8.8.0",
|
"EmptyFiles": "8.9.1",
|
||||||
"System.Management": "8.0.0"
|
"System.Management": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EmptyFiles": {
|
"EmptyFiles": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "8.8.0",
|
"resolved": "8.9.1",
|
||||||
"contentHash": "d0pgc/vMyKgQ9T3qiiJBn1uYUSZ1/OShh6tySnNSkELRSgM4A4IOrpdQhLqwCkPwYvdJqzKuxQ6wn3MQAd4GNA=="
|
"contentHash": "GbGf+oH/xiI3C5vJ5TnoA4sx7x7LhtOvN00fxihRZJsj40XuXk2TMz/4m26PfNSJj8JMAqo3BUBirjvam+3xkA=="
|
||||||
},
|
},
|
||||||
"FSharp.Core": {
|
"FSharp.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -264,8 +279,8 @@
|
|||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "BrMGzDRLz410PE4qC8UeKeAc0hFRjBkiCUOLTwuod65NAjqg5tDNqYU7gP0A09taEXtecB+HJc1NNnnTjsKFAQ=="
|
"contentHash": "WogPvgAFqQORFD8Iyha6RZ+/1QB3dsWRWxbwi8/HHVgiGQ8z0oMWpwe8Kk3Ti+Roe+P6a3sBg+WwBfEsyziZKg=="
|
||||||
},
|
},
|
||||||
"System.Management": {
|
"System.Management": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -310,13 +325,13 @@
|
|||||||
},
|
},
|
||||||
"Verify": {
|
"Verify": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "EhhwhXIeip9AJGWRPXh47NAUoiELnWzeBnAzFSl0+ryAfijTV1T+B4m6P6GbheWQ1CJ1cC1ZFLzgH276D5Bu3A==",
|
"contentHash": "wlqJ6ygXORa3lrAaErTA4EWkDcK9pBG2k5iC/I5F2UpWfyV7aXw/+SwGiWYe4XSk9d7VObe4xi4+0AV9rLRsBw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3"
|
"System.IO.Hashing": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit.abstractions": {
|
"xunit.abstractions": {
|
||||||
@@ -373,35 +388,12 @@
|
|||||||
"speckle.sdk.testing": {
|
"speckle.sdk.testing": {
|
||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NET.Test.Sdk": "[17.13.0, )",
|
|
||||||
"Moq": "[4.20.72, )",
|
"Moq": "[4.20.72, )",
|
||||||
"Speckle.Sdk": "[1.0.0, )",
|
"Speckle.Sdk": "[1.0.0, )",
|
||||||
"Verify.Quibble": "[2.1.1, )",
|
"Verify.Quibble": "[2.1.1, )",
|
||||||
"Verify.Xunit": "[29.2.0, )",
|
"Verify.Xunit": "[29.4.0, )"
|
||||||
"xunit": "[2.9.3, )",
|
|
||||||
"xunit.runner.visualstudio": "[3.0.2, )"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"speckle.sdk.tests.unit": {
|
|
||||||
"type": "Project",
|
|
||||||
"dependencies": {
|
|
||||||
"AwesomeAssertions": "[8.1.0, )",
|
|
||||||
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
|
|
||||||
"Microsoft.NET.Test.Sdk": "[17.13.0, )",
|
|
||||||
"RichardSzalay.MockHttp": "[7.0.0, )",
|
|
||||||
"Speckle.DoubleNumerics": "[4.1.0, )",
|
|
||||||
"Speckle.Sdk": "[1.0.0, )",
|
|
||||||
"Speckle.Sdk.Testing": "[1.0.0, )",
|
|
||||||
"altcover": "[9.0.1, )",
|
|
||||||
"xunit.runner.visualstudio": "[3.0.2, )"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"AwesomeAssertions": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[8.1.0, )",
|
|
||||||
"resolved": "8.1.0",
|
|
||||||
"contentHash": "IfNC4cpXPi9tclWvuNO9lfkuIxJsUTLTS1NXto55jDrAUQJYl0zLI9ByISrfkbBE2Xtg+IWaAXQ6jnUx3anDuw=="
|
|
||||||
},
|
|
||||||
"GraphQL.Client": {
|
"GraphQL.Client": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[6.0.0, )",
|
"requested": "[6.0.0, )",
|
||||||
@@ -429,15 +421,6 @@
|
|||||||
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
|
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Microsoft.Extensions.DependencyInjection": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.2.0, )",
|
|
||||||
"resolved": "2.2.0",
|
|
||||||
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
|
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Microsoft.Extensions.DependencyInjection.Abstractions": {
|
"Microsoft.Extensions.DependencyInjection.Abstractions": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[2.2.0, )",
|
"requested": "[2.2.0, )",
|
||||||
@@ -465,12 +448,6 @@
|
|||||||
"Castle.Core": "5.1.1"
|
"Castle.Core": "5.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"RichardSzalay.MockHttp": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[7.0.0, )",
|
|
||||||
"resolved": "7.0.0",
|
|
||||||
"contentHash": "QwnauYiaywp65QKFnP+wvgiQ2D8Pv888qB2dyfd7MSVDF06sIvxqASenk+RxsWybyyt+Hu1Y251wQxpHTv3UYg=="
|
|
||||||
},
|
|
||||||
"Speckle.DoubleNumerics": {
|
"Speckle.DoubleNumerics": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[4.1.0, )",
|
"requested": "[4.1.0, )",
|
||||||
@@ -496,15 +473,15 @@
|
|||||||
},
|
},
|
||||||
"Verify.Xunit": {
|
"Verify.Xunit": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[29.2.0, )",
|
"requested": "[29.4.0, )",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "MdcslVf40AzSA319ZHMzR+U4JqyquX28JFSrI9zA89yeZNaNcaSIb5PmE0XZ6p60Iy7eRYtnGEgSDimEUeXHZw==",
|
"contentHash": "P8HYW7aromKGm90Cgx0XKL3qKKmYZHDwHTQfBfDCCPnhNlVWevJzrpuUQ0+3vTVdRAtsts2a1OE/tD+3yjJbHA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3",
|
"System.IO.Hashing": "9.0.4",
|
||||||
"Verify": "29.2.0",
|
"Verify": "29.4.0",
|
||||||
"xunit.abstractions": "2.0.3",
|
"xunit.abstractions": "2.0.3",
|
||||||
"xunit.extensibility.execution": "2.9.3"
|
"xunit.extensibility.execution": "2.9.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ public class GeneralDeserializer : IDisposable
|
|||||||
private const string streamId = "a3ac1b2706";
|
private const string streamId = "a3ac1b2706";
|
||||||
private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/
|
private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/
|
||||||
|
|
||||||
|
|
||||||
private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf?
|
private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf?
|
||||||
private const string streamId = "2099ac4b5f";
|
private const string streamId = "2099ac4b5f";
|
||||||
private const string rootId = "30fb4cbe6eb2202b9e7b4a4fcc3dd2b6";
|
private const string rootId = "30fb4cbe6eb2202b9e7b4a4fcc3dd2b6";
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ public class GeneralReceiveTest : IDisposable
|
|||||||
private const string streamId = "a3ac1b2706";S
|
private const string streamId = "a3ac1b2706";S
|
||||||
private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/
|
private const string rootId = "7d53bcf28c6696ecac8781684a0aa006";*/
|
||||||
|
|
||||||
|
|
||||||
private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf?
|
private const string url = "https://latest.speckle.systems/projects/2099ac4b5f/models/da511c4d1e"; //perf?
|
||||||
private readonly Uri _baseUrl = new("https://latest.speckle.systems");
|
private readonly Uri _baseUrl = new("https://latest.speckle.systems");
|
||||||
private const string streamId = "2099ac4b5f";
|
private const string streamId = "2099ac4b5f";
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
<PropertyGroup>
|
<OutputType>Exe</OutputType>
|
||||||
<OutputType>Exe</OutputType>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<Nullable>disable</Nullable>
|
||||||
<Nullable>disable</Nullable>
|
<IsTestProject>true</IsTestProject>
|
||||||
<IsTestProject>true</IsTestProject>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="BenchmarkDotNet" />
|
||||||
<ItemGroup>
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
||||||
<PackageReference Include="BenchmarkDotNet" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
|
||||||
|
|
||||||
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Objects\Speckle.Objects.csproj" />
|
||||||
|
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.1.0-dev.133"/> -->
|
||||||
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.1.0-dev.133"/> -->
|
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.1.0-dev.109"/> -->
|
||||||
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.1.0-dev.109"/> -->
|
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.0.0-dev.51"/> <!–Pre-optimisation–>-->
|
||||||
<!-- <PackageReference Include="Speckle.Objects" VersionOverride="3.0.0-dev.51"/> <!–Pre-optimisation–>-->
|
</ItemGroup>
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -37,16 +37,15 @@ public sealed class GraphQLClientTests : IDisposable
|
|||||||
{
|
{
|
||||||
var tokenSource = new CancellationTokenSource();
|
var tokenSource = new CancellationTokenSource();
|
||||||
tokenSource.Cancel();
|
tokenSource.Cancel();
|
||||||
await _client.ExecuteWithResiliencePolicies(
|
await _client.ExecuteWithResiliencePolicies(async () =>
|
||||||
async () =>
|
await Task.Run(
|
||||||
await Task.Run(
|
async () =>
|
||||||
async () =>
|
{
|
||||||
{
|
await Task.Delay(1000);
|
||||||
await Task.Delay(1000);
|
return "foo";
|
||||||
return "foo";
|
},
|
||||||
},
|
tokenSource.Token
|
||||||
tokenSource.Token
|
)
|
||||||
)
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
|
|||||||
@@ -24,12 +24,11 @@ public class GraphQLErrorHandlerTests
|
|||||||
[MemberData(nameof(ErrorCases))]
|
[MemberData(nameof(ErrorCases))]
|
||||||
public void TestExceptionThrowingFromGraphQLErrors(Type exType, Map extensions)
|
public void TestExceptionThrowingFromGraphQLErrors(Type exType, Map extensions)
|
||||||
{
|
{
|
||||||
var ex = Assert.Throws<AggregateException>(
|
var ex = Assert.Throws<AggregateException>(() =>
|
||||||
() =>
|
new GraphQLResponse<GraphQLClientTests.FakeGqlResponseModel>
|
||||||
new GraphQLResponse<GraphQLClientTests.FakeGqlResponseModel>
|
{
|
||||||
{
|
Errors = [new() { Extensions = extensions }],
|
||||||
Errors = [new() { Extensions = extensions }],
|
}.EnsureGraphQLSuccess()
|
||||||
}.EnsureGraphQLSuccess()
|
|
||||||
);
|
);
|
||||||
ex.InnerExceptions.Count.Should().Be(1);
|
ex.InnerExceptions.Count.Should().Be(1);
|
||||||
ex.InnerExceptions[0].Should().BeOfType(exType);
|
ex.InnerExceptions[0].Should().BeOfType(exType);
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ public class SpeckleHttpTests : MoqTest
|
|||||||
|
|
||||||
var uri = new Uri("https://speckle.xyz");
|
var uri = new Uri("https://speckle.xyz");
|
||||||
mockHttp.When(uri.AbsoluteUri).Respond(HttpStatusCode.Unauthorized);
|
mockHttp.When(uri.AbsoluteUri).Respond(HttpStatusCode.Unauthorized);
|
||||||
await Assert.ThrowsAsync<HttpRequestException>(
|
await Assert.ThrowsAsync<HttpRequestException>(async () => await speckleHttp.HttpPing(uri, mockHttp.ToHttpClient())
|
||||||
async () => await speckleHttp.HttpPing(uri, mockHttp.ToHttpClient())
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"applicationId": "ajsdf",
|
||||||
|
"arr": null,
|
||||||
|
"attachedProp": null,
|
||||||
|
"crazyProp": null,
|
||||||
|
"detachedProp": null,
|
||||||
|
"DynamicPropertyKeys": [],
|
||||||
|
"id": null,
|
||||||
|
"IgnoredSchemaProp": null,
|
||||||
|
"list": [],
|
||||||
|
"speckle_type": "Speckle.Core.Tests.Unit.Models.BaseTests+SampleObject"
|
||||||
|
}
|
||||||
@@ -134,6 +134,16 @@ public class BaseTests
|
|||||||
names.Should().Contain(nameof(@base.attachedProp));
|
names.Should().Contain(nameof(@base.attachedProp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact(
|
||||||
|
DisplayName = $"Checks that all instance members are returned including ones on super classes (e.g. {nameof(Base)}"
|
||||||
|
)]
|
||||||
|
public async Task CanGetMembers_BaseMembers()
|
||||||
|
{
|
||||||
|
var @base = new SampleObject { applicationId = "ajsdf" };
|
||||||
|
var members = @base.GetMembers();
|
||||||
|
await Verify(members);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact(DisplayName = "Checks that only dynamic properties are returned")]
|
[Fact(DisplayName = "Checks that only dynamic properties are returned")]
|
||||||
public void CanGetMembers_OnlyDynamic()
|
public void CanGetMembers_OnlyDynamic()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ public class SqLiteJsonCacheExceptionTests
|
|||||||
public void ExpectedExceptionFires_Void()
|
public void ExpectedExceptionFires_Void()
|
||||||
{
|
{
|
||||||
using var pool = new CacheDbCommandPool("DataSource=:memory:", 1);
|
using var pool = new CacheDbCommandPool("DataSource=:memory:", 1);
|
||||||
Assert.Throws<SqLiteJsonCacheException>(
|
Assert.Throws<SqLiteJsonCacheException>(() =>
|
||||||
() => pool.Use(CacheOperation.Get, new Action<SqliteCommand>(_ => throw new SqliteException("test", 1, 1)))
|
pool.Use(CacheOperation.Get, new Action<SqliteCommand>(_ => throw new SqliteException("test", 1, 1)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,8 +18,8 @@ public class SqLiteJsonCacheExceptionTests
|
|||||||
public void ExpectedExceptionFires_Return()
|
public void ExpectedExceptionFires_Return()
|
||||||
{
|
{
|
||||||
using var pool = new CacheDbCommandPool("DataSource=:memory:", 1);
|
using var pool = new CacheDbCommandPool("DataSource=:memory:", 1);
|
||||||
Assert.Throws<SqLiteJsonCacheException>(
|
Assert.Throws<SqLiteJsonCacheException>(() =>
|
||||||
() => pool.Use(CacheOperation.Get, new Func<SqliteCommand, bool>(_ => throw new SqliteException("test", 1, 1)))
|
pool.Use(CacheOperation.Get, new Func<SqliteCommand, bool>(_ => throw new SqliteException("test", 1, 1)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using FluentAssertions;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace Speckle.Sdk.Tests.Unit;
|
||||||
|
|
||||||
|
public class ServiceRegistrationTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void RegisterDependencies_Validation()
|
||||||
|
{
|
||||||
|
var serviceCollection = new ServiceCollection();
|
||||||
|
serviceCollection.AddSpeckleSdk(new("Tests", "test"), "v3");
|
||||||
|
var serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { ValidateOnBuild = true });
|
||||||
|
serviceProvider.Should().NotBeNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void RegisterDependencies_Scopes()
|
||||||
|
{
|
||||||
|
var serviceCollection = new ServiceCollection();
|
||||||
|
serviceCollection.AddSpeckleSdk(new("Tests", "test"), "v3");
|
||||||
|
var serviceProvider = serviceCollection.BuildServiceProvider(
|
||||||
|
new ServiceProviderOptions { ValidateScopes = true, ValidateOnBuild = true }
|
||||||
|
);
|
||||||
|
serviceProvider.Should().NotBeNull();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,24 +1,21 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
<PolySharpExcludeGeneratedTypes>System.Runtime.CompilerServices.IsExternalInit;System.Runtime.CompilerServices.RequiresLocationAttribute</PolySharpExcludeGeneratedTypes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="altcover" />
|
<PackageReference Include="altcover" />
|
||||||
<PackageReference Include="AwesomeAssertions" />
|
<PackageReference Include="AwesomeAssertions" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||||
<PackageReference Include="RichardSzalay.MockHttp" />
|
<PackageReference Include="RichardSzalay.MockHttp" />
|
||||||
<PackageReference Include="Speckle.DoubleNumerics" />
|
<PackageReference Include="Speckle.DoubleNumerics" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" VersionOverride="8.0.0" />
|
||||||
<PackageReference Include="xunit.runner.visualstudio"/>
|
<PackageReference Include="xunit.assert" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
<ProjectReference Include="..\..\src\Speckle.Sdk\Speckle.Sdk.csproj" />
|
||||||
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
<ProjectReference Include="..\Speckle.Sdk.Testing\Speckle.Sdk.Testing.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
|
||||||
|
namespace Speckle.Sdk.Tests.Unit;
|
||||||
|
|
||||||
|
public static class SpeckleVerify
|
||||||
|
{
|
||||||
|
private static bool _initialized;
|
||||||
|
|
||||||
|
[ModuleInitializer]
|
||||||
|
public static void Initialize()
|
||||||
|
{
|
||||||
|
if (_initialized)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
global::Speckle.Sdk.Testing.SpeckleVerify.Initialize();
|
||||||
|
_initialized = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
namespace Speckle.Sdk.Testing;
|
namespace Speckle.Sdk.Tests.Unit;
|
||||||
|
|
||||||
public class VerifyTests
|
public class VerifyTests
|
||||||
{
|
{
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
},
|
},
|
||||||
"Microsoft.Extensions.DependencyInjection": {
|
"Microsoft.Extensions.DependencyInjection": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[2.2.0, )",
|
"requested": "[8.0.0, )",
|
||||||
"resolved": "2.2.0",
|
"resolved": "8.0.0",
|
||||||
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
|
"contentHash": "V8S3bsm50ig6JSyrbcJJ8bW2b9QLGouz+G1miK3UTaOWmMtFwNNNzUf4AleyDWUmTrWMLNnFSLEQtxmxgNQnNQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
|
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Microsoft.NET.Test.Sdk": {
|
"Microsoft.NET.Test.Sdk": {
|
||||||
@@ -67,6 +67,12 @@
|
|||||||
"resolved": "0.9.6",
|
"resolved": "0.9.6",
|
||||||
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
|
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
|
||||||
},
|
},
|
||||||
|
"xunit.assert": {
|
||||||
|
"type": "Direct",
|
||||||
|
"requested": "[2.9.3, )",
|
||||||
|
"resolved": "2.9.3",
|
||||||
|
"contentHash": "/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA=="
|
||||||
|
},
|
||||||
"xunit.runner.visualstudio": {
|
"xunit.runner.visualstudio": {
|
||||||
"type": "Direct",
|
"type": "Direct",
|
||||||
"requested": "[3.0.2, )",
|
"requested": "[3.0.2, )",
|
||||||
@@ -75,8 +81,8 @@
|
|||||||
},
|
},
|
||||||
"Argon": {
|
"Argon": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "0.27.0",
|
"resolved": "0.28.0",
|
||||||
"contentHash": "LtZKATYeTwDyYq1AXrgVU/ly+nI6GvE0GK1isJYFPQOnb2uHUxvDA+yh40QYaITGTLViXK7rbWhNKpbZ5pb9XA=="
|
"contentHash": "78BmoFm8SK733nq4F/SjqNKkXJHdrg/MslvYfNjJX/nM/mEkltHUzPJRjBE9VI/zghsjFPQxMRPEUaqIgg98zg=="
|
||||||
},
|
},
|
||||||
"Castle.Core": {
|
"Castle.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -88,17 +94,17 @@
|
|||||||
},
|
},
|
||||||
"DiffEngine": {
|
"DiffEngine": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "16.1.0",
|
"resolved": "16.2.1",
|
||||||
"contentHash": "ImEFC6BN62paN0N7v8vrLY3x/LpfbJaJy5yDtL+/L2As6FI1npGJcFZwzz1A7pdDjIYPOXE91qv6BpgEUGjDkA==",
|
"contentHash": "UfMgXClqOGkPNfth210upiTY18LPCgjsfNrh0Olo5qI+QTkkCO6wHSuOwknxJdKtsWoaJ+E132Y2nzD0PiLWRw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"EmptyFiles": "8.8.0",
|
"EmptyFiles": "8.9.1",
|
||||||
"System.Management": "8.0.0"
|
"System.Management": "8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"EmptyFiles": {
|
"EmptyFiles": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "8.8.0",
|
"resolved": "8.9.1",
|
||||||
"contentHash": "d0pgc/vMyKgQ9T3qiiJBn1uYUSZ1/OShh6tySnNSkELRSgM4A4IOrpdQhLqwCkPwYvdJqzKuxQ6wn3MQAd4GNA=="
|
"contentHash": "GbGf+oH/xiI3C5vJ5TnoA4sx7x7LhtOvN00fxihRZJsj40XuXk2TMz/4m26PfNSJj8JMAqo3BUBirjvam+3xkA=="
|
||||||
},
|
},
|
||||||
"FSharp.Core": {
|
"FSharp.Core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -280,8 +286,8 @@
|
|||||||
},
|
},
|
||||||
"System.IO.Hashing": {
|
"System.IO.Hashing": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "9.0.3",
|
"resolved": "9.0.4",
|
||||||
"contentHash": "BrMGzDRLz410PE4qC8UeKeAc0hFRjBkiCUOLTwuod65NAjqg5tDNqYU7gP0A09taEXtecB+HJc1NNnnTjsKFAQ=="
|
"contentHash": "WogPvgAFqQORFD8Iyha6RZ+/1QB3dsWRWxbwi8/HHVgiGQ8z0oMWpwe8Kk3Ti+Roe+P6a3sBg+WwBfEsyziZKg=="
|
||||||
},
|
},
|
||||||
"System.Management": {
|
"System.Management": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
@@ -326,13 +332,13 @@
|
|||||||
},
|
},
|
||||||
"Verify": {
|
"Verify": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "EhhwhXIeip9AJGWRPXh47NAUoiELnWzeBnAzFSl0+ryAfijTV1T+B4m6P6GbheWQ1CJ1cC1ZFLzgH276D5Bu3A==",
|
"contentHash": "wlqJ6ygXORa3lrAaErTA4EWkDcK9pBG2k5iC/I5F2UpWfyV7aXw/+SwGiWYe4XSk9d7VObe4xi4+0AV9rLRsBw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3"
|
"System.IO.Hashing": "9.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"xunit.abstractions": {
|
"xunit.abstractions": {
|
||||||
@@ -340,20 +346,6 @@
|
|||||||
"resolved": "2.0.3",
|
"resolved": "2.0.3",
|
||||||
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
"contentHash": "pot1I4YOxlWjIb5jmwvvQNbTrZ3lJQ+jUGkGjWE3hEFM0l5gOnBWS+H3qsex68s5cO52g+44vpGzhAt+42vwKg=="
|
||||||
},
|
},
|
||||||
"xunit.analyzers": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "1.18.0",
|
|
||||||
"contentHash": "OtFMHN8yqIcYP9wcVIgJrq01AfTxijjAqVDy/WeQVSyrDC1RzBWeQPztL49DN2syXRah8TYnfvk035s7L95EZQ=="
|
|
||||||
},
|
|
||||||
"xunit.core": {
|
|
||||||
"type": "Transitive",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "BiAEvqGvyme19wE0wTKdADH+NloYqikiU0mcnmiNyXaF9HyHmE6sr/3DC5vnBkgsWaE6yPyWszKSPSApWdRVeQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.extensibility.core": "[2.9.3]",
|
|
||||||
"xunit.extensibility.execution": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.extensibility.core": {
|
"xunit.extensibility.core": {
|
||||||
"type": "Transitive",
|
"type": "Transitive",
|
||||||
"resolved": "2.9.3",
|
"resolved": "2.9.3",
|
||||||
@@ -389,13 +381,10 @@
|
|||||||
"speckle.sdk.testing": {
|
"speckle.sdk.testing": {
|
||||||
"type": "Project",
|
"type": "Project",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NET.Test.Sdk": "[17.13.0, )",
|
|
||||||
"Moq": "[4.20.72, )",
|
"Moq": "[4.20.72, )",
|
||||||
"Speckle.Sdk": "[1.0.0, )",
|
"Speckle.Sdk": "[1.0.0, )",
|
||||||
"Verify.Quibble": "[2.1.1, )",
|
"Verify.Quibble": "[2.1.1, )",
|
||||||
"Verify.Xunit": "[29.2.0, )",
|
"Verify.Xunit": "[29.4.0, )"
|
||||||
"xunit": "[2.9.3, )",
|
|
||||||
"xunit.runner.visualstudio": "[3.0.2, )"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"GraphQL.Client": {
|
"GraphQL.Client": {
|
||||||
@@ -428,8 +417,8 @@
|
|||||||
"Microsoft.Extensions.DependencyInjection.Abstractions": {
|
"Microsoft.Extensions.DependencyInjection.Abstractions": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[2.2.0, )",
|
"requested": "[2.2.0, )",
|
||||||
"resolved": "2.2.0",
|
"resolved": "8.0.0",
|
||||||
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
|
"contentHash": "cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg=="
|
||||||
},
|
},
|
||||||
"Microsoft.Extensions.Logging": {
|
"Microsoft.Extensions.Logging": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
@@ -471,35 +460,18 @@
|
|||||||
},
|
},
|
||||||
"Verify.Xunit": {
|
"Verify.Xunit": {
|
||||||
"type": "CentralTransitive",
|
"type": "CentralTransitive",
|
||||||
"requested": "[29.2.0, )",
|
"requested": "[29.4.0, )",
|
||||||
"resolved": "29.2.0",
|
"resolved": "29.4.0",
|
||||||
"contentHash": "MdcslVf40AzSA319ZHMzR+U4JqyquX28JFSrI9zA89yeZNaNcaSIb5PmE0XZ6p60Iy7eRYtnGEgSDimEUeXHZw==",
|
"contentHash": "P8HYW7aromKGm90Cgx0XKL3qKKmYZHDwHTQfBfDCCPnhNlVWevJzrpuUQ0+3vTVdRAtsts2a1OE/tD+3yjJbHA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Argon": "0.27.0",
|
"Argon": "0.28.0",
|
||||||
"DiffEngine": "16.1.0",
|
"DiffEngine": "16.2.1",
|
||||||
"SimpleInfoName": "3.1.0",
|
"SimpleInfoName": "3.1.0",
|
||||||
"System.IO.Hashing": "9.0.3",
|
"System.IO.Hashing": "9.0.4",
|
||||||
"Verify": "29.2.0",
|
"Verify": "29.4.0",
|
||||||
"xunit.abstractions": "2.0.3",
|
"xunit.abstractions": "2.0.3",
|
||||||
"xunit.extensibility.execution": "2.9.3"
|
"xunit.extensibility.execution": "2.9.3"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"xunit": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "TlXQBinK35LpOPKHAqbLY4xlEen9TBafjs0V5KnA4wZsoQLQJiirCR4CbIXvOH8NzkW4YeJKP5P/Bnrodm0h9Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"xunit.analyzers": "1.18.0",
|
|
||||||
"xunit.assert": "2.9.3",
|
|
||||||
"xunit.core": "[2.9.3]"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xunit.assert": {
|
|
||||||
"type": "CentralTransitive",
|
|
||||||
"requested": "[2.9.3, )",
|
|
||||||
"resolved": "2.9.3",
|
|
||||||
"contentHash": "/Kq28fCE7MjOV42YLVRAJzRF0WmEqsmflm0cfpMjGtzQ2lR5mYVj1/i0Y8uDAOLczkL3/jArrwehfMD0YogMAA=="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user