From acd4f8afeeea36549d8ccb693290c772eb518fe9 Mon Sep 17 00:00:00 2001 From: Sean McBeth Date: Sun, 3 Dec 2023 11:45:11 -0500 Subject: [PATCH] project reorg --- src/Juniper.AppShell/Juniper.AppShell.csproj | 2 +- .../AbstractStreamSource.cs | 2 +- .../IO => Juniper.Caching}/CachingStrategy.cs | 2 +- .../ContentReference.cs | 6 +- .../IO => Juniper.Caching}/FileCacheLayer.cs | 5 +- .../ICacheDestinationLayer.cs | 2 +- .../ICacheDestinationLayerExt.cs | 5 +- .../ICacheSourceLayer.cs | 2 +- .../ICacheSourceLayerExt.cs | 7 +- src/Juniper.Caching/Juniper.Caching.csproj | 40 ++++++ .../MemoryCacheLayer.cs | 9 +- .../IO => Juniper.Caching}/StreamSourceExt.cs | 3 +- .../StreamSourceLayer.cs | 3 +- .../Edge.cs | 0 .../Graph.cs | 4 +- .../Juniper.Collections.csproj | 40 ++++++ .../PriorityQueue.cs | 0 .../PriorityStack.cs | 0 .../RingBuffer.cs | 0 .../Route.cs | 0 .../RoutingGraph.cs | 0 .../SparseMatrix.cs | 0 .../Tree.cs | 0 .../TreeTraversalOrder.cs | 0 src/Juniper.Data/Juniper.Data.csproj | 6 - .../HTTP => Juniper.HTTP}/BodyInfo.cs | 0 .../HTTP => Juniper.HTTP}/DataMessage.cs | 0 .../DataMessageEventArgs.cs | 0 .../DataMessageHandler.cs | 0 .../HTTP => Juniper.HTTP}/GetRequest.cs | 0 .../HTTP => Juniper.HTTP}/HttpClientExt.cs | 0 src/Juniper.HTTP/ISerializerExt.cs | 66 ++++++++++ src/Juniper.HTTP/Juniper.HTTP.csproj | 40 ++++++ .../NETFX/Net/Http/HttpRequestMessageExt.cs | 0 .../NETFX/Net/HttpStatusDescription.cs | 0 .../REST/AbstractRequest.cs | 1 + .../HTTP => Juniper.HTTP}/WebAppManifest.cs | 0 .../WebSocketConnection.cs | 0 .../AssemblyResourceDataSource.cs | 0 .../IO => Juniper.IO}/CachingStream.cs | 0 .../IO => Juniper.IO}/FileDataSource.cs | 0 .../IO => Juniper.IO}/ForkedOutputStream.cs | 0 .../IO => Juniper.IO}/IDataSource.cs | 0 .../IO => Juniper.IO}/IDeserializer.cs | 0 .../IO => Juniper.IO}/IDeserializerExt.cs | 0 .../IO => Juniper.IO}/IFactory.cs | 0 .../IO => Juniper.IO}/IInstallable.cs | 0 .../IO => Juniper.IO}/IJsonDecoder.cs | 0 .../IO => Juniper.IO}/IJsonFactory.cs | 0 .../IO => Juniper.IO}/ISaveable.cs | 0 .../IO => Juniper.IO}/ISaveableExt.cs | 0 .../IO => Juniper.IO}/ISerializer.cs | 0 .../IO => Juniper.IO}/ISerializerExt.cs | 60 --------- .../IO => Juniper.IO}/IStreamWrapper.cs | 0 .../IO => Juniper.IO}/Installable.cs | 0 .../IO => Juniper.IO}/JsonFactory`1.cs | 0 .../IO => Juniper.IO}/JsonFactory`2.cs | 0 src/Juniper.IO/Juniper.IO.csproj | 38 ++++++ .../NETFX/IO/StreamExt.cs | 67 +++++----- .../Serialization/SerializationInfoExt.cs | 106 ++++++++++++++++ .../NETFX/Text/Json/JsonDocumentExt.cs | 0 .../NETFX/Text/StringBuilderExt.cs | 0 .../IO => Juniper.IO}/ProgressStream.cs | 0 .../IO => Juniper.IO}/StreamReaderEventer.cs | 0 .../IO => Juniper.IO}/StringFactory.cs | 0 .../IO => Juniper.IO}/TempFile.cs | 0 .../IO => Juniper.IO}/ZipFileDataSource.cs | 0 .../IErrorSource.cs | 0 .../IInfoSource.cs | 0 .../ILoggingSource.cs | 0 .../IWarningSource.cs | 0 src/Juniper.Logging/Juniper.Logging.csproj | 33 +++++ .../AbstractBinaryExpression.cs | 0 .../AbstractUnaryExpression.cs | 0 .../ActionExt.cs | 2 +- src/{Juniper.Root => Juniper.Logic}/Always.cs | 8 +- .../Logic => Juniper.Logic}/AndExpression.cs | 0 .../EmptyExpression.cs | 0 .../Logic => Juniper.Logic}/IExpression.cs | 0 .../Logic => Juniper.Logic}/ItemExpression.cs | 0 src/Juniper.Logic/Juniper.Logic.csproj | 34 +++++ .../LogicConstructor.cs | 0 .../Logic => Juniper.Logic}/NotExpression.cs | 0 .../Logic => Juniper.Logic}/OrExpression.cs | 0 src/{Juniper.Root => Juniper.Logic}/Retry.cs | 15 ++- .../Logic => Juniper.Logic}/XorExpression.cs | 0 .../AbstractStatisticsCollection.cs | 4 +- .../Juniper.Mathematics.csproj | 42 +++++++ .../Matrix3x2Serializable.cs | 0 .../Matrix4x4Serializable.cs | 0 .../NETFX/Numerics/MathExt.cs | 116 ----------------- .../PlaneSerializable.cs | 0 .../Pose.cs | 0 .../PoseSerializable.cs | 0 .../QuaternionSerializable.cs | 0 src/Juniper.Mathematics/RandomExt.cs | 32 +++++ .../Rect.cs | 0 .../SerializationInfoExt.cs | 102 --------------- .../SingleStatisticsCollection.cs | 0 .../Vector2Serializable.cs | 0 .../Vector2Statistics.cs | 0 .../Vector3Serializable.cs | 0 .../Vector3Statistics.cs | 0 .../Vector4Serializable.cs | 0 .../Vector4Statistics.cs | 0 .../VectorToStringExt.cs | 0 .../Application.Values.cs | 0 .../Application.cs | 0 .../Audio.Values.cs | 0 .../Audio.cs | 0 .../Chemical.Values.cs | 0 .../Chemical.cs | 0 .../Font.Values.cs | 0 .../Font.cs | 0 src/Juniper.MediaType/IDictionaryExt.cs | 29 +++++ .../Image.Values.cs | 0 .../Image.cs | 0 .../Juniper.MediaType.csproj | 119 ++++++++++++++++++ .../MediaType.Values.cs | 0 .../MediaType.cs | 5 - .../Message.Values.cs | 0 .../Message.cs | 0 .../Model.Values.cs | 0 .../Model.cs | 0 .../Multipart.Values.cs | 0 .../Multipart.cs | 0 .../Text.Values.cs | 0 .../Text.cs | 0 .../Unknown.cs | 0 .../Video.Values.cs | 0 .../Video.cs | 0 .../XConference.Values.cs | 0 .../XConference.cs | 0 .../XShader.Values.cs | 0 .../XShader.cs | 0 .../AbstractNamedAction.cs | 0 src/Juniper.NamedActions/IProgressExt.cs | 62 +++++++++ .../Juniper.NamedActions.csproj | 33 +++++ .../NamedAction.cs | 0 .../NamedAction`1.cs | 0 .../NamedAction`10.cs | 0 .../NamedAction`11.cs | 0 .../NamedAction`12.cs | 0 .../NamedAction`13.cs | 0 .../NamedAction`14.cs | 0 .../NamedAction`15.cs | 0 .../NamedAction`16.cs | 0 .../NamedAction`2.cs | 0 .../NamedAction`3.cs | 0 .../NamedAction`4.cs | 0 .../NamedAction`5.cs | 0 .../NamedAction`6.cs | 0 .../NamedAction`7.cs | 0 .../NamedAction`8.cs | 0 .../NamedAction`9.cs | 0 .../NamedFunc`1.cs | 0 .../NamedFunc`10.cs | 0 .../NamedFunc`11.cs | 0 .../NamedFunc`12.cs | 0 .../NamedFunc`13.cs | 0 .../NamedFunc`14.cs | 0 .../NamedFunc`15.cs | 0 .../NamedFunc`16.cs | 0 .../NamedFunc`17.cs | 0 .../NamedFunc`2.cs | 0 .../NamedFunc`3.cs | 0 .../NamedFunc`4.cs | 0 .../NamedFunc`5.cs | 0 .../NamedFunc`6.cs | 0 .../NamedFunc`7.cs | 0 .../NamedFunc`8.cs | 0 .../NamedFunc`9.cs | 0 .../Juniper.ProcessManager.csproj | 1 - .../Juniper.Processes.csproj | 4 +- .../IPreloadable.cs | 0 .../IProgress.cs | 0 .../IProgressExt.cs | 52 -------- src/Juniper.Progress/Juniper.Progress.csproj | 33 +++++ .../ProgressAggregator.cs | 0 .../ProgressEventer.cs | 0 .../ProgressSubdivision.cs | 0 src/Juniper.Root/Juniper.Root.csproj | 86 ------------- .../Collections/Generic/IDictionaryExt.cs | 56 --------- src/Juniper.Root/NETFX/RandomExt.cs | 39 ------ src/Juniper.Server/GlobalSuppressions.cs | 8 ++ .../HTTP/HttpListenerResponseExt.cs | 3 +- src/Juniper.Server/Juniper.Server.csproj | 3 +- .../BuildSystemDependency.cs | 0 .../BuildSystemOptions.cs | 0 .../DeploymentOptions.cs | 0 .../Juniper.TSBuild.Core.csproj | 38 ++++++ .../PathHelper.cs | 0 src/Juniper.TSBuild/Juniper.TSBuild.csproj | 2 +- .../ForceDirectedGraph.d.ts | 6 +- .../ForceDirectedGraph.d.ts.map | 2 +- .../ForceDirectedGraph/ForceDirectedGraph.js | 89 +++++++++++-- .../ForceDirectedGraph.js.map | 2 +- .../ForceDirectedGraph/ForceDirectedNode.d.ts | 4 +- .../ForceDirectedNode.d.ts.map | 2 +- .../ForceDirectedGraph/ForceDirectedNode.js | 50 ++++---- .../ForceDirectedNode.js.map | 2 +- .../ForceDirectedGraph/ForceDirectedGraph.ts | 106 ++++++++++++++-- .../ForceDirectedGraph/ForceDirectedNode.ts | 53 ++++---- .../Acceleration/FeetPerSecondSquared.cs | 0 .../Acceleration/MetersPerSecondSquared.cs | 0 .../Units => Juniper.Units}/Angles/Angle.cs | 0 .../Units => Juniper.Units}/Angles/Degrees.cs | 0 .../Angles/Gradians.cs | 0 .../Units => Juniper.Units}/Angles/Radians.cs | 0 .../Units => Juniper.Units}/Area/Acres.cs | 0 .../Area/SquareCentimeters.cs | 0 .../Area/SquareFeet.cs | 0 .../Area/SquareInches.cs | 0 .../Area/SquareKilometers.cs | 0 .../Area/SquareMeters.cs | 0 .../Area/SquareMicrometers.cs | 0 .../Area/SquareMiles.cs | 0 .../Area/SquareMillimeters.cs | 0 .../Area/SquareRods.cs | 0 .../Area/SquareYards.cs | 0 .../Bandwidth/BitsPerSecond.cs | 0 .../Bandwidth/BytesPerSecond.cs | 0 .../Bandwidth/ExabytesPerSecond.cs | 0 .../Bandwidth/ExbibytesPerSecond.cs | 0 .../Bandwidth/GibibytesPerSecond.cs | 0 .../Bandwidth/GigabytesPerSecond.cs | 0 .../Bandwidth/KibibytesPerSecond.cs | 0 .../Bandwidth/KilobytesPerSecond.cs | 0 .../Bandwidth/MegabytesPerSecond.cs | 0 .../Bandwidth/MibibytesPerSecond.cs | 0 .../Bandwidth/PebibytesPerSecond.cs | 0 .../Bandwidth/PetabytesPerSecond.cs | 0 .../Bandwidth/TebibytePerSecond.cs | 0 .../Bandwidth/TerabytesPerSecond.cs | 0 .../Bandwidth/YobibytesPerSecond.cs | 0 .../Bandwidth/YotabytesPerSecond.cs | 0 .../Bandwidth/ZebibytesPerSecond.cs | 0 .../Bandwidth/ZettabytesPerSecond.cs | 0 .../Units => Juniper.Units}/CartesianAxis.cs | 0 .../CartesianAxisFlags.cs | 0 .../Units => Juniper.Units}/Category.cs | 0 src/{Juniper.Root => Juniper.Units}/Color3.cs | 0 .../ColorSpace.cs | 0 .../Units => Juniper.Units}/Converter.cs | 2 +- .../Units => Juniper.Units}/FileSize.cs | 0 .../Units => Juniper.Units}/FileSize/Bits.cs | 0 .../Units => Juniper.Units}/FileSize/Bytes.cs | 0 .../FileSize/Exabytes.cs | 0 .../FileSize/Exbibytes.cs | 0 .../FileSize/Gibibytes.cs | 0 .../FileSize/Gigabytes.cs | 0 .../FileSize/Kibibytes.cs | 0 .../FileSize/Kilobytes.cs | 0 .../FileSize/Megabytes.cs | 0 .../FileSize/Mibibytes.cs | 0 .../FileSize/Pebibytes.cs | 0 .../FileSize/Petabytes.cs | 0 .../FileSize/Tebibytes.cs | 0 .../FileSize/Terabytes.cs | 0 .../FileSize/Yobibytes.cs | 0 .../FileSize/Yotabytes.cs | 0 .../FileSize/Zebibytes.cs | 0 .../FileSize/Zettabytes.cs | 0 .../Frequency/Hertz.cs | 0 src/Juniper.Units/IDictionaryExt.cs | 31 +++++ src/Juniper.Units/Juniper.Units.csproj | 37 ++++++ .../Length/Centimeters.cs | 0 .../Units => Juniper.Units}/Length/Feet.cs | 0 .../Length/Furlongs.cs | 0 .../Units => Juniper.Units}/Length/Inches.cs | 0 .../Length/Kilometers.cs | 0 .../Units => Juniper.Units}/Length/Meters.cs | 0 .../Length/Micrometers.cs | 0 .../Units => Juniper.Units}/Length/Miles.cs | 0 .../Length/Millimeters.cs | 0 .../Units => Juniper.Units}/Length/Rods.cs | 0 .../Units => Juniper.Units}/Length/Yards.cs | 0 .../Units => Juniper.Units}/Level.cs | 0 .../Light/Brightness.cs | 0 .../Units => Juniper.Units}/Light/Lumens.cs | 0 .../Units => Juniper.Units}/Light/Nits.cs | 0 .../Units => Juniper.Units}/Mass/Grams.cs | 0 .../Units => Juniper.Units}/Mass/Kilograms.cs | 0 .../Units => Juniper.Units}/Mass/Ounces.cs | 0 .../Units => Juniper.Units}/Mass/Pounds.cs | 0 .../Units => Juniper.Units}/Mass/Tons.cs | 0 .../Pressure/Hectopascals.cs | 0 .../Pressure/Kilopascals.cs | 0 .../Pressure/Millibars.cs | 0 .../Pressure/Pascals.cs | 0 .../Pressure/PoundsPerSquareInch.cs | 0 .../Proportion/Percent.cs | 0 .../Proportion/Proportion.cs | 0 .../Proportion/Ratio.cs | 0 src/Juniper.Units/RandomExt.cs | 19 +++ .../Speed/FeetPerSecond.cs | 0 .../Speed/KilometersPerHour.cs | 0 .../Speed/MetersPerSecond.cs | 0 .../Speed/MilesPerHour.cs | 0 .../Speed/MillimetersPerSecond.cs | 0 .../SystemOfMeasure.cs | 0 .../Temperature/Celsius.cs | 0 .../Temperature/Farenheit.cs | 0 .../Temperature/Kelvin.cs | 0 .../Units => Juniper.Units}/Time/Days.cs | 0 .../Units => Juniper.Units}/Time/Hours.cs | 0 .../Time/Microseconds.cs | 0 .../Time/Milliseconds.cs | 0 .../Units => Juniper.Units}/Time/Minutes.cs | 0 .../Time/Nanoseconds.cs | 0 .../Units => Juniper.Units}/Time/Seconds.cs | 0 .../Units => Juniper.Units}/Time/Ticks.cs | 0 .../NETFX => Juniper.Units}/TimeSpanExt.cs | 0 .../Units => Juniper.Units}/Unary.cs | 0 .../Units => Juniper.Units}/UnitOfMeasure.cs | 0 .../Volume/CubicCentimeters.cs | 0 .../Volume/CubicFeet.cs | 0 .../Volume/CubicInches.cs | 0 .../Volume/CubicKilometers.cs | 0 .../Volume/CubicMeters.cs | 0 .../Volume/CubicMicrometers.cs | 0 .../Volume/CubicMiles.cs | 0 .../Volume/CubicMillimeters.cs | 0 .../Units => Juniper.Units}/Volume/Cups.cs | 0 .../Volume/FluidDrams.cs | 0 .../Volume/FluidOunces.cs | 0 .../Units => Juniper.Units}/Volume/Gallons.cs | 0 .../Units => Juniper.Units}/Volume/Gills.cs | 0 .../Volume/Kiloliters.cs | 0 .../Volume/LiquidPints.cs | 0 .../Volume/LiquidQuarts.cs | 0 .../Units => Juniper.Units}/Volume/Liters.cs | 0 .../Volume/Milliliters.cs | 0 .../Units => Juniper.Units}/Volume/Minims.cs | 0 .../Volume/Tablespoons.cs | 0 .../Volume/Teaspoons.cs | 0 .../Climate/IWeatherAPI.cs | 0 .../Climate/IWeatherReport.cs | 0 .../World => Juniper.World}/GIS/Datum.cs | 0 .../GIS/EquitorialSpherical.cs | 0 .../GIS/EquitorialSphericalPosition.cs | 0 .../GIS/GeocentricEclipticSpherical.cs | 0 .../GeocentricEclipticSphericalPosition.cs | 0 .../GIS/GlobeHemisphere.cs | 0 .../GIS/HorizontalSphericalPosition.cs | 0 .../World => Juniper.World}/GIS/LatLng.cs | 0 .../GIS/LatLngPoint.cs | 0 .../GIS/LatLngPointEventArgs.cs | 0 .../World => Juniper.World}/GIS/UTM.cs | 0 .../World => Juniper.World}/GIS/UTMPoint.cs | 0 src/Juniper.World/IDictionaryExt.cs | 29 +++++ src/Juniper.World/Juniper.World.csproj | 38 ++++++ src/Juniper.World/NETFX/Numerics/MathExt.cs | 119 ++++++++++++++++++ .../World => Juniper.World}/People.cs | 0 src/Juniper.Xml/Juniper.Xml.csproj | 37 ++++++ .../SsmlDocument.cs | 2 +- .../Xml => Juniper.Xml}/XmlSpreadsheet2003.cs | 0 357 files changed, 1440 insertions(+), 667 deletions(-) rename src/{Juniper.Root/IO => Juniper.Caching}/AbstractStreamSource.cs (95%) rename src/{Juniper.Root/IO => Juniper.Caching}/CachingStrategy.cs (99%) rename src/{Juniper.Root/IO => Juniper.Caching}/ContentReference.cs (94%) rename src/{Juniper.Root/IO => Juniper.Caching}/FileCacheLayer.cs (96%) rename src/{Juniper.Root/IO => Juniper.Caching}/ICacheDestinationLayer.cs (88%) rename src/{Juniper.Root/IO => Juniper.Caching}/ICacheDestinationLayerExt.cs (95%) rename src/{Juniper.Root/IO => Juniper.Caching}/ICacheSourceLayer.cs (90%) rename src/{Juniper.Root/IO => Juniper.Caching}/ICacheSourceLayerExt.cs (96%) create mode 100644 src/Juniper.Caching/Juniper.Caching.csproj rename src/{Juniper.Root/IO => Juniper.Caching}/MemoryCacheLayer.cs (91%) rename src/{Juniper.Root/IO => Juniper.Caching}/StreamSourceExt.cs (95%) rename src/{Juniper.Root/IO => Juniper.Caching}/StreamSourceLayer.cs (96%) rename src/{Juniper.Root/Collections => Juniper.Collections}/Edge.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/Graph.cs (97%) create mode 100644 src/Juniper.Collections/Juniper.Collections.csproj rename src/{Juniper.Root/Collections => Juniper.Collections}/PriorityQueue.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/PriorityStack.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/RingBuffer.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/Route.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/RoutingGraph.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/SparseMatrix.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/Tree.cs (100%) rename src/{Juniper.Root/Collections => Juniper.Collections}/TreeTraversalOrder.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/BodyInfo.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/DataMessage.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/DataMessageEventArgs.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/DataMessageHandler.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/GetRequest.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/HttpClientExt.cs (100%) create mode 100644 src/Juniper.HTTP/ISerializerExt.cs create mode 100644 src/Juniper.HTTP/Juniper.HTTP.csproj rename src/{Juniper.Root => Juniper.HTTP}/NETFX/Net/Http/HttpRequestMessageExt.cs (100%) rename src/{Juniper.Root => Juniper.HTTP}/NETFX/Net/HttpStatusDescription.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/REST/AbstractRequest.cs (99%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/WebAppManifest.cs (100%) rename src/{Juniper.Root/HTTP => Juniper.HTTP}/WebSocketConnection.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/AssemblyResourceDataSource.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/CachingStream.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/FileDataSource.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ForkedOutputStream.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IDataSource.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IDeserializer.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IDeserializerExt.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IFactory.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IInstallable.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IJsonDecoder.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/IJsonFactory.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ISaveable.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ISaveableExt.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ISerializer.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ISerializerExt.cs (54%) rename src/{Juniper.Root/IO => Juniper.IO}/IStreamWrapper.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/Installable.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/JsonFactory`1.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/JsonFactory`2.cs (100%) create mode 100644 src/Juniper.IO/Juniper.IO.csproj rename src/{Juniper.Root => Juniper.IO}/NETFX/IO/StreamExt.cs (99%) create mode 100644 src/Juniper.IO/NETFX/Runtime/Serialization/SerializationInfoExt.cs rename src/{Juniper.Root => Juniper.IO}/NETFX/Text/Json/JsonDocumentExt.cs (100%) rename src/{Juniper.Root => Juniper.IO}/NETFX/Text/StringBuilderExt.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ProgressStream.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/StreamReaderEventer.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/StringFactory.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/TempFile.cs (100%) rename src/{Juniper.Root/IO => Juniper.IO}/ZipFileDataSource.cs (100%) rename src/{Juniper.Root/Logging => Juniper.Logging}/IErrorSource.cs (100%) rename src/{Juniper.Root/Logging => Juniper.Logging}/IInfoSource.cs (100%) rename src/{Juniper.Root/Logging => Juniper.Logging}/ILoggingSource.cs (100%) rename src/{Juniper.Root/Logging => Juniper.Logging}/IWarningSource.cs (100%) create mode 100644 src/Juniper.Logging/Juniper.Logging.csproj rename src/{Juniper.Root/Logic => Juniper.Logic}/AbstractBinaryExpression.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/AbstractUnaryExpression.cs (100%) rename src/{Juniper.Root => Juniper.Logic}/ActionExt.cs (99%) rename src/{Juniper.Root => Juniper.Logic}/Always.cs (94%) rename src/{Juniper.Root/Logic => Juniper.Logic}/AndExpression.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/EmptyExpression.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/IExpression.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/ItemExpression.cs (100%) create mode 100644 src/Juniper.Logic/Juniper.Logic.csproj rename src/{Juniper.Root/Logic => Juniper.Logic}/LogicConstructor.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/NotExpression.cs (100%) rename src/{Juniper.Root/Logic => Juniper.Logic}/OrExpression.cs (100%) rename src/{Juniper.Root => Juniper.Logic}/Retry.cs (81%) rename src/{Juniper.Root/Logic => Juniper.Logic}/XorExpression.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/AbstractStatisticsCollection.cs (100%) create mode 100644 src/Juniper.Mathematics/Juniper.Mathematics.csproj rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Matrix3x2Serializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Matrix4x4Serializable.cs (100%) rename src/{Juniper.Root => Juniper.Mathematics}/NETFX/Numerics/MathExt.cs (68%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/PlaneSerializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Pose.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/PoseSerializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/QuaternionSerializable.cs (100%) create mode 100644 src/Juniper.Mathematics/RandomExt.cs rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Rect.cs (100%) rename src/{Juniper.Root/NETFX/Runtime/Serialization => Juniper.Mathematics}/SerializationInfoExt.cs (59%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/SingleStatisticsCollection.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector2Serializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector2Statistics.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector3Serializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector3Statistics.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector4Serializable.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/Vector4Statistics.cs (100%) rename src/{Juniper.Root/Mathematics => Juniper.Mathematics}/VectorToStringExt.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Application.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Application.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Audio.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Audio.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Chemical.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Chemical.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Font.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Font.cs (100%) create mode 100644 src/Juniper.MediaType/IDictionaryExt.cs rename src/{Juniper.Root => Juniper.MediaType}/Image.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Image.cs (100%) create mode 100644 src/Juniper.MediaType/Juniper.MediaType.csproj rename src/{Juniper.Root => Juniper.MediaType}/MediaType.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/MediaType.cs (98%) rename src/{Juniper.Root => Juniper.MediaType}/Message.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Message.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Model.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Model.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Multipart.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Multipart.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Text.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Text.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Unknown.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Video.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/Video.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/XConference.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/XConference.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/XShader.Values.cs (100%) rename src/{Juniper.Root => Juniper.MediaType}/XShader.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/AbstractNamedAction.cs (100%) create mode 100644 src/Juniper.NamedActions/IProgressExt.cs create mode 100644 src/Juniper.NamedActions/Juniper.NamedActions.csproj rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`1.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`10.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`11.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`12.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`13.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`14.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`15.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`16.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`2.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`3.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`4.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`5.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`6.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`7.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`8.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedAction`9.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`1.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`10.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`11.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`12.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`13.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`14.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`15.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`16.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`17.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`2.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`3.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`4.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`5.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`6.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`7.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`8.cs (100%) rename src/{Juniper.Root/NamedActions => Juniper.NamedActions}/NamedFunc`9.cs (100%) rename src/{Juniper.Root/Progress => Juniper.Progress}/IPreloadable.cs (100%) rename src/{Juniper.Root/Progress => Juniper.Progress}/IProgress.cs (100%) rename src/{Juniper.Root/Progress => Juniper.Progress}/IProgressExt.cs (80%) create mode 100644 src/Juniper.Progress/Juniper.Progress.csproj rename src/{Juniper.Root/Progress => Juniper.Progress}/ProgressAggregator.cs (100%) rename src/{Juniper.Root/Progress => Juniper.Progress}/ProgressEventer.cs (100%) rename src/{Juniper.Root/Progress => Juniper.Progress}/ProgressSubdivision.cs (100%) create mode 100644 src/Juniper.Server/GlobalSuppressions.cs rename src/{Juniper.Root/TSBuild => Juniper.TSBuild.Core}/BuildSystemDependency.cs (100%) rename src/{Juniper.Root/TSBuild => Juniper.TSBuild.Core}/BuildSystemOptions.cs (100%) rename src/{Juniper.Root/TSBuild => Juniper.TSBuild.Core}/DeploymentOptions.cs (100%) create mode 100644 src/Juniper.TSBuild.Core/Juniper.TSBuild.Core.csproj rename src/{Juniper.Root/TSBuild => Juniper.TSBuild.Core}/PathHelper.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Acceleration/FeetPerSecondSquared.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Acceleration/MetersPerSecondSquared.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Angles/Angle.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Angles/Degrees.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Angles/Gradians.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Angles/Radians.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/Acres.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareCentimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareFeet.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareInches.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareKilometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareMeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareMicrometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareMiles.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareMillimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareRods.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Area/SquareYards.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/BitsPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/BytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/ExabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/ExbibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/GibibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/GigabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/KibibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/KilobytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/MegabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/MibibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/PebibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/PetabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/TebibytePerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/TerabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/YobibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/YotabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/ZebibytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Bandwidth/ZettabytesPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/CartesianAxis.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/CartesianAxisFlags.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Category.cs (100%) rename src/{Juniper.Root => Juniper.Units}/Color3.cs (100%) rename src/{Juniper.Root => Juniper.Units}/ColorSpace.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Converter.cs (99%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Bits.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Bytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Exabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Exbibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Gibibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Gigabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Kibibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Kilobytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Megabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Mibibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Pebibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Petabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Tebibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Terabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Yobibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Yotabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Zebibytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/FileSize/Zettabytes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Frequency/Hertz.cs (100%) create mode 100644 src/Juniper.Units/IDictionaryExt.cs create mode 100644 src/Juniper.Units/Juniper.Units.csproj rename src/{Juniper.Root/Units => Juniper.Units}/Length/Centimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Feet.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Furlongs.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Inches.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Kilometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Meters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Micrometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Miles.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Millimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Rods.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Length/Yards.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Level.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Light/Brightness.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Light/Lumens.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Light/Nits.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Mass/Grams.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Mass/Kilograms.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Mass/Ounces.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Mass/Pounds.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Mass/Tons.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Pressure/Hectopascals.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Pressure/Kilopascals.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Pressure/Millibars.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Pressure/Pascals.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Pressure/PoundsPerSquareInch.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Proportion/Percent.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Proportion/Proportion.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Proportion/Ratio.cs (100%) create mode 100644 src/Juniper.Units/RandomExt.cs rename src/{Juniper.Root/Units => Juniper.Units}/Speed/FeetPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Speed/KilometersPerHour.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Speed/MetersPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Speed/MilesPerHour.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Speed/MillimetersPerSecond.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/SystemOfMeasure.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Temperature/Celsius.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Temperature/Farenheit.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Temperature/Kelvin.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Days.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Hours.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Microseconds.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Milliseconds.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Minutes.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Nanoseconds.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Seconds.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Time/Ticks.cs (100%) rename src/{Juniper.Root/NETFX => Juniper.Units}/TimeSpanExt.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Unary.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/UnitOfMeasure.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicCentimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicFeet.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicInches.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicKilometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicMeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicMicrometers.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicMiles.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/CubicMillimeters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Cups.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/FluidDrams.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/FluidOunces.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Gallons.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Gills.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Kiloliters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/LiquidPints.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/LiquidQuarts.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Liters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Milliliters.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Minims.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Tablespoons.cs (100%) rename src/{Juniper.Root/Units => Juniper.Units}/Volume/Teaspoons.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/Climate/IWeatherAPI.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/Climate/IWeatherReport.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/Datum.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/EquitorialSpherical.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/EquitorialSphericalPosition.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/GeocentricEclipticSpherical.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/GeocentricEclipticSphericalPosition.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/GlobeHemisphere.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/HorizontalSphericalPosition.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/LatLng.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/LatLngPoint.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/LatLngPointEventArgs.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/UTM.cs (100%) rename src/{Juniper.Root/World => Juniper.World}/GIS/UTMPoint.cs (100%) create mode 100644 src/Juniper.World/IDictionaryExt.cs create mode 100644 src/Juniper.World/Juniper.World.csproj create mode 100644 src/Juniper.World/NETFX/Numerics/MathExt.cs rename src/{Juniper.Root/World => Juniper.World}/People.cs (100%) create mode 100644 src/Juniper.Xml/Juniper.Xml.csproj rename src/{Juniper.Root => Juniper.Xml}/SsmlDocument.cs (98%) rename src/{Juniper.Root/Xml => Juniper.Xml}/XmlSpreadsheet2003.cs (100%) diff --git a/src/Juniper.AppShell/Juniper.AppShell.csproj b/src/Juniper.AppShell/Juniper.AppShell.csproj index 649101cacb..4e3996305b 100644 --- a/src/Juniper.AppShell/Juniper.AppShell.csproj +++ b/src/Juniper.AppShell/Juniper.AppShell.csproj @@ -14,8 +14,8 @@ - + \ No newline at end of file diff --git a/src/Juniper.Root/IO/AbstractStreamSource.cs b/src/Juniper.Caching/AbstractStreamSource.cs similarity index 95% rename from src/Juniper.Root/IO/AbstractStreamSource.cs rename to src/Juniper.Caching/AbstractStreamSource.cs index dccb812555..e3427bbd9e 100644 --- a/src/Juniper.Root/IO/AbstractStreamSource.cs +++ b/src/Juniper.Caching/AbstractStreamSource.cs @@ -1,6 +1,6 @@ using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public abstract class AbstractStreamSource : ContentReference { diff --git a/src/Juniper.Root/IO/CachingStrategy.cs b/src/Juniper.Caching/CachingStrategy.cs similarity index 99% rename from src/Juniper.Root/IO/CachingStrategy.cs rename to src/Juniper.Caching/CachingStrategy.cs index a98bb1c4ac..68b8cc1866 100644 --- a/src/Juniper.Root/IO/CachingStrategy.cs +++ b/src/Juniper.Caching/CachingStrategy.cs @@ -2,7 +2,7 @@ using System.Collections; -namespace Juniper.IO; +namespace Juniper.Caching; /// /// A collection of source and destination layers for file content. Files diff --git a/src/Juniper.Root/IO/ContentReference.cs b/src/Juniper.Caching/ContentReference.cs similarity index 94% rename from src/Juniper.Root/IO/ContentReference.cs rename to src/Juniper.Caching/ContentReference.cs index c8e84fa881..e1e6f87db0 100644 --- a/src/Juniper.Root/IO/ContentReference.cs +++ b/src/Juniper.Caching/ContentReference.cs @@ -1,13 +1,13 @@ using System.Globalization; -namespace Juniper.IO; +namespace Juniper.Caching; public class ContentReference : IEquatable { public static bool operator ==(ContentReference left, ContentReference right) { - return (left is null && right is null) - || (left is not null && left.Equals(right)); + return left is null && right is null + || left is not null && left.Equals(right); } public static bool operator !=(ContentReference left, ContentReference right) diff --git a/src/Juniper.Root/IO/FileCacheLayer.cs b/src/Juniper.Caching/FileCacheLayer.cs similarity index 96% rename from src/Juniper.Root/IO/FileCacheLayer.cs rename to src/Juniper.Caching/FileCacheLayer.cs index b6c8866a00..b983adf310 100644 --- a/src/Juniper.Root/IO/FileCacheLayer.cs +++ b/src/Juniper.Caching/FileCacheLayer.cs @@ -1,6 +1,7 @@ +using Juniper.IO; using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public class FileCacheLayer : ICacheDestinationLayer { @@ -100,7 +101,7 @@ public IEnumerable GetContentReferences(MediaType ofType) { var shortName = file.Name; var cacheID = PathExt.RemoveShortExtension(shortName); - yield return cacheID + ofType; + yield return new ContentReference(cacheID, ofType); } } } diff --git a/src/Juniper.Root/IO/ICacheDestinationLayer.cs b/src/Juniper.Caching/ICacheDestinationLayer.cs similarity index 88% rename from src/Juniper.Root/IO/ICacheDestinationLayer.cs rename to src/Juniper.Caching/ICacheDestinationLayer.cs index 4f2f58361b..df66301099 100644 --- a/src/Juniper.Root/IO/ICacheDestinationLayer.cs +++ b/src/Juniper.Caching/ICacheDestinationLayer.cs @@ -1,4 +1,4 @@ -namespace Juniper.IO; +namespace Juniper.Caching; public interface ICacheDestinationLayer : ICacheSourceLayer { diff --git a/src/Juniper.Root/IO/ICacheDestinationLayerExt.cs b/src/Juniper.Caching/ICacheDestinationLayerExt.cs similarity index 95% rename from src/Juniper.Root/IO/ICacheDestinationLayerExt.cs rename to src/Juniper.Caching/ICacheDestinationLayerExt.cs index 6522105811..c88aabcba8 100644 --- a/src/Juniper.Root/IO/ICacheDestinationLayerExt.cs +++ b/src/Juniper.Caching/ICacheDestinationLayerExt.cs @@ -1,6 +1,7 @@ +using Juniper.IO; using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public static class ICacheDestinationLayerExt { @@ -93,7 +94,7 @@ public static void SaveJson( } var serializer = new JsonFactory(); - var fileRef = fileName + MediaType.Application_Json; + var fileRef = new ContentReference(fileName, MediaType.Application_Json); using var stream = layer.Create(fileRef); _ = serializer.Serialize(stream, value); } diff --git a/src/Juniper.Root/IO/ICacheSourceLayer.cs b/src/Juniper.Caching/ICacheSourceLayer.cs similarity index 90% rename from src/Juniper.Root/IO/ICacheSourceLayer.cs rename to src/Juniper.Caching/ICacheSourceLayer.cs index 48877160bd..094677d598 100644 --- a/src/Juniper.Root/IO/ICacheSourceLayer.cs +++ b/src/Juniper.Caching/ICacheSourceLayer.cs @@ -1,6 +1,6 @@ using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public interface ICacheSourceLayer { diff --git a/src/Juniper.Root/IO/ICacheSourceLayerExt.cs b/src/Juniper.Caching/ICacheSourceLayerExt.cs similarity index 96% rename from src/Juniper.Root/IO/ICacheSourceLayerExt.cs rename to src/Juniper.Caching/ICacheSourceLayerExt.cs index 9254705a87..3bb59351bd 100644 --- a/src/Juniper.Root/IO/ICacheSourceLayerExt.cs +++ b/src/Juniper.Caching/ICacheSourceLayerExt.cs @@ -1,6 +1,7 @@ +using Juniper.IO; using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public static class ICacheSourceLayerExt @@ -47,7 +48,7 @@ public static class ICacheSourceLayerExt var progs = prog.Split("Read", "Decode"); using var stream = await layer .GetStreamAsync(fileRef, progs[0]) - .ConfigureAwait(false) + .ConfigureAwait(false) ?? throw new FileNotFoundException(fileRef.FileName); using var progStream = new ProgressStream(stream, stream.Length, progs[1], false); @@ -84,7 +85,7 @@ public static bool TryLoadJson( where ResultT : class { var deserializer = new JsonFactory(); - var fileRef = name + MediaType.Application_Json; + var fileRef = new ContentReference(name, MediaType.Application_Json); return layer.TryLoad(deserializer, fileRef, out value, prog); } diff --git a/src/Juniper.Caching/Juniper.Caching.csproj b/src/Juniper.Caching/Juniper.Caching.csproj new file mode 100644 index 0000000000..9b336c3c28 --- /dev/null +++ b/src/Juniper.Caching/Juniper.Caching.csproj @@ -0,0 +1,40 @@ + + + + Juniper.Caching + Juniper.Caching + SeanMcBeth.Juniper.Caching + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + + + diff --git a/src/Juniper.Root/IO/MemoryCacheLayer.cs b/src/Juniper.Caching/MemoryCacheLayer.cs similarity index 91% rename from src/Juniper.Root/IO/MemoryCacheLayer.cs rename to src/Juniper.Caching/MemoryCacheLayer.cs index 12c2be65d3..e42fb6707d 100644 --- a/src/Juniper.Root/IO/MemoryCacheLayer.cs +++ b/src/Juniper.Caching/MemoryCacheLayer.cs @@ -1,8 +1,9 @@ +using Juniper.IO; using Juniper.Progress; using System.Collections.Concurrent; -namespace Juniper.IO; +namespace Juniper.Caching; public class MemoryCacheLayer : ICacheDestinationLayer { @@ -61,7 +62,7 @@ public IEnumerable GetContentReferences(MediaType ofType) { foreach (var cacheID in store[ofType].Keys) { - yield return cacheID + ofType; + yield return new ContentReference(cacheID, ofType); } } } @@ -70,10 +71,10 @@ public bool Delete(ContentReference fileRef) { if (fileRef is null) { - throw new System.ArgumentNullException(nameof(fileRef)); + throw new ArgumentNullException(nameof(fileRef)); } - if (fileRef.CacheID is not null + if (fileRef.CacheID is not null && IsCached(fileRef)) { return store[fileRef.ContentType] diff --git a/src/Juniper.Root/IO/StreamSourceExt.cs b/src/Juniper.Caching/StreamSourceExt.cs similarity index 95% rename from src/Juniper.Root/IO/StreamSourceExt.cs rename to src/Juniper.Caching/StreamSourceExt.cs index 22591b9b0e..58957f5c35 100644 --- a/src/Juniper.Root/IO/StreamSourceExt.cs +++ b/src/Juniper.Caching/StreamSourceExt.cs @@ -1,6 +1,7 @@ +using Juniper.IO; using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public static class StreamSourceExt diff --git a/src/Juniper.Root/IO/StreamSourceLayer.cs b/src/Juniper.Caching/StreamSourceLayer.cs similarity index 96% rename from src/Juniper.Root/IO/StreamSourceLayer.cs rename to src/Juniper.Caching/StreamSourceLayer.cs index a5cec2dc2f..fbb38f5b10 100644 --- a/src/Juniper.Root/IO/StreamSourceLayer.cs +++ b/src/Juniper.Caching/StreamSourceLayer.cs @@ -1,6 +1,7 @@ +using Juniper.IO; using Juniper.Progress; -namespace Juniper.IO; +namespace Juniper.Caching; public class StreamSourceLayer : ICacheSourceLayer { diff --git a/src/Juniper.Root/Collections/Edge.cs b/src/Juniper.Collections/Edge.cs similarity index 100% rename from src/Juniper.Root/Collections/Edge.cs rename to src/Juniper.Collections/Edge.cs diff --git a/src/Juniper.Root/Collections/Graph.cs b/src/Juniper.Collections/Graph.cs similarity index 97% rename from src/Juniper.Root/Collections/Graph.cs rename to src/Juniper.Collections/Graph.cs index c194f27675..49f5e300fe 100644 --- a/src/Juniper.Root/Collections/Graph.cs +++ b/src/Juniper.Collections/Graph.cs @@ -1,4 +1,6 @@ -namespace Juniper.Collections; +using Juniper.Logic; + +namespace Juniper.Collections; public static class Graph { diff --git a/src/Juniper.Collections/Juniper.Collections.csproj b/src/Juniper.Collections/Juniper.Collections.csproj new file mode 100644 index 0000000000..a6369ac90e --- /dev/null +++ b/src/Juniper.Collections/Juniper.Collections.csproj @@ -0,0 +1,40 @@ + + + + Juniper.Collections + Juniper.Collections + SeanMcBeth.Juniper.Collections + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + + + diff --git a/src/Juniper.Root/Collections/PriorityQueue.cs b/src/Juniper.Collections/PriorityQueue.cs similarity index 100% rename from src/Juniper.Root/Collections/PriorityQueue.cs rename to src/Juniper.Collections/PriorityQueue.cs diff --git a/src/Juniper.Root/Collections/PriorityStack.cs b/src/Juniper.Collections/PriorityStack.cs similarity index 100% rename from src/Juniper.Root/Collections/PriorityStack.cs rename to src/Juniper.Collections/PriorityStack.cs diff --git a/src/Juniper.Root/Collections/RingBuffer.cs b/src/Juniper.Collections/RingBuffer.cs similarity index 100% rename from src/Juniper.Root/Collections/RingBuffer.cs rename to src/Juniper.Collections/RingBuffer.cs diff --git a/src/Juniper.Root/Collections/Route.cs b/src/Juniper.Collections/Route.cs similarity index 100% rename from src/Juniper.Root/Collections/Route.cs rename to src/Juniper.Collections/Route.cs diff --git a/src/Juniper.Root/Collections/RoutingGraph.cs b/src/Juniper.Collections/RoutingGraph.cs similarity index 100% rename from src/Juniper.Root/Collections/RoutingGraph.cs rename to src/Juniper.Collections/RoutingGraph.cs diff --git a/src/Juniper.Root/Collections/SparseMatrix.cs b/src/Juniper.Collections/SparseMatrix.cs similarity index 100% rename from src/Juniper.Root/Collections/SparseMatrix.cs rename to src/Juniper.Collections/SparseMatrix.cs diff --git a/src/Juniper.Root/Collections/Tree.cs b/src/Juniper.Collections/Tree.cs similarity index 100% rename from src/Juniper.Root/Collections/Tree.cs rename to src/Juniper.Collections/Tree.cs diff --git a/src/Juniper.Root/Collections/TreeTraversalOrder.cs b/src/Juniper.Collections/TreeTraversalOrder.cs similarity index 100% rename from src/Juniper.Root/Collections/TreeTraversalOrder.cs rename to src/Juniper.Collections/TreeTraversalOrder.cs diff --git a/src/Juniper.Data/Juniper.Data.csproj b/src/Juniper.Data/Juniper.Data.csproj index 7184407b08..2427ef263a 100644 --- a/src/Juniper.Data/Juniper.Data.csproj +++ b/src/Juniper.Data/Juniper.Data.csproj @@ -31,12 +31,6 @@ - - - - - - \ No newline at end of file diff --git a/src/Juniper.Root/HTTP/BodyInfo.cs b/src/Juniper.HTTP/BodyInfo.cs similarity index 100% rename from src/Juniper.Root/HTTP/BodyInfo.cs rename to src/Juniper.HTTP/BodyInfo.cs diff --git a/src/Juniper.Root/HTTP/DataMessage.cs b/src/Juniper.HTTP/DataMessage.cs similarity index 100% rename from src/Juniper.Root/HTTP/DataMessage.cs rename to src/Juniper.HTTP/DataMessage.cs diff --git a/src/Juniper.Root/HTTP/DataMessageEventArgs.cs b/src/Juniper.HTTP/DataMessageEventArgs.cs similarity index 100% rename from src/Juniper.Root/HTTP/DataMessageEventArgs.cs rename to src/Juniper.HTTP/DataMessageEventArgs.cs diff --git a/src/Juniper.Root/HTTP/DataMessageHandler.cs b/src/Juniper.HTTP/DataMessageHandler.cs similarity index 100% rename from src/Juniper.Root/HTTP/DataMessageHandler.cs rename to src/Juniper.HTTP/DataMessageHandler.cs diff --git a/src/Juniper.Root/HTTP/GetRequest.cs b/src/Juniper.HTTP/GetRequest.cs similarity index 100% rename from src/Juniper.Root/HTTP/GetRequest.cs rename to src/Juniper.HTTP/GetRequest.cs diff --git a/src/Juniper.Root/HTTP/HttpClientExt.cs b/src/Juniper.HTTP/HttpClientExt.cs similarity index 100% rename from src/Juniper.Root/HTTP/HttpClientExt.cs rename to src/Juniper.HTTP/HttpClientExt.cs diff --git a/src/Juniper.HTTP/ISerializerExt.cs b/src/Juniper.HTTP/ISerializerExt.cs new file mode 100644 index 0000000000..2a41be7ffa --- /dev/null +++ b/src/Juniper.HTTP/ISerializerExt.cs @@ -0,0 +1,66 @@ +using Juniper.HTTP; + +using System.Net.WebSockets; +using System.Text; + +namespace Juniper.IO; + +public static class ISerializerExt +{ + public static void Serialize(this ISerializer serializer, HttpRequestMessage request, MediaType type, T value) + where M : MediaType + { + if (serializer is null) + { + throw new ArgumentNullException(nameof(serializer)); + } + + if (request is null) + { + throw new ArgumentNullException(nameof(request)); + } + + var stream = serializer.GetStream(value); + request.Body(new StreamContent(stream), type); + } + + public static Task SerializeAsync(this ISerializer serializer, WebSocketConnection socket, T value) + where M : MediaType + where U : WebSocket + { + if (serializer is null) + { + throw new ArgumentNullException(nameof(serializer)); + } + + if (socket is null) + { + throw new ArgumentNullException(nameof(socket)); + } + + var data = serializer.Serialize(value); + return socket.SendAsync(data); + } + + public static Task SerializeAsync(this ISerializer serializer, WebSocketConnection socket, string message, T value) + where M : MediaType + where U : WebSocket + { + if (serializer is null) + { + throw new ArgumentNullException(nameof(serializer)); + } + + if (socket is null) + { + throw new ArgumentNullException(nameof(socket)); + } + + if (message is null) + { + throw new ArgumentNullException(nameof(message)); + } + + return socket.SendAsync(message, value, serializer); + } +} diff --git a/src/Juniper.HTTP/Juniper.HTTP.csproj b/src/Juniper.HTTP/Juniper.HTTP.csproj new file mode 100644 index 0000000000..ffd120f797 --- /dev/null +++ b/src/Juniper.HTTP/Juniper.HTTP.csproj @@ -0,0 +1,40 @@ + + + + Juniper.HTTP + Juniper.HTTP + SeanMcBeth.Juniper.HTTP + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + + + diff --git a/src/Juniper.Root/NETFX/Net/Http/HttpRequestMessageExt.cs b/src/Juniper.HTTP/NETFX/Net/Http/HttpRequestMessageExt.cs similarity index 100% rename from src/Juniper.Root/NETFX/Net/Http/HttpRequestMessageExt.cs rename to src/Juniper.HTTP/NETFX/Net/Http/HttpRequestMessageExt.cs diff --git a/src/Juniper.Root/NETFX/Net/HttpStatusDescription.cs b/src/Juniper.HTTP/NETFX/Net/HttpStatusDescription.cs similarity index 100% rename from src/Juniper.Root/NETFX/Net/HttpStatusDescription.cs rename to src/Juniper.HTTP/NETFX/Net/HttpStatusDescription.cs diff --git a/src/Juniper.Root/HTTP/REST/AbstractRequest.cs b/src/Juniper.HTTP/REST/AbstractRequest.cs similarity index 99% rename from src/Juniper.Root/HTTP/REST/AbstractRequest.cs rename to src/Juniper.HTTP/REST/AbstractRequest.cs index bb90b405fa..20bc66fdf6 100644 --- a/src/Juniper.Root/HTTP/REST/AbstractRequest.cs +++ b/src/Juniper.HTTP/REST/AbstractRequest.cs @@ -1,3 +1,4 @@ +using Juniper.Caching; using Juniper.IO; using Juniper.Progress; diff --git a/src/Juniper.Root/HTTP/WebAppManifest.cs b/src/Juniper.HTTP/WebAppManifest.cs similarity index 100% rename from src/Juniper.Root/HTTP/WebAppManifest.cs rename to src/Juniper.HTTP/WebAppManifest.cs diff --git a/src/Juniper.Root/HTTP/WebSocketConnection.cs b/src/Juniper.HTTP/WebSocketConnection.cs similarity index 100% rename from src/Juniper.Root/HTTP/WebSocketConnection.cs rename to src/Juniper.HTTP/WebSocketConnection.cs diff --git a/src/Juniper.Root/IO/AssemblyResourceDataSource.cs b/src/Juniper.IO/AssemblyResourceDataSource.cs similarity index 100% rename from src/Juniper.Root/IO/AssemblyResourceDataSource.cs rename to src/Juniper.IO/AssemblyResourceDataSource.cs diff --git a/src/Juniper.Root/IO/CachingStream.cs b/src/Juniper.IO/CachingStream.cs similarity index 100% rename from src/Juniper.Root/IO/CachingStream.cs rename to src/Juniper.IO/CachingStream.cs diff --git a/src/Juniper.Root/IO/FileDataSource.cs b/src/Juniper.IO/FileDataSource.cs similarity index 100% rename from src/Juniper.Root/IO/FileDataSource.cs rename to src/Juniper.IO/FileDataSource.cs diff --git a/src/Juniper.Root/IO/ForkedOutputStream.cs b/src/Juniper.IO/ForkedOutputStream.cs similarity index 100% rename from src/Juniper.Root/IO/ForkedOutputStream.cs rename to src/Juniper.IO/ForkedOutputStream.cs diff --git a/src/Juniper.Root/IO/IDataSource.cs b/src/Juniper.IO/IDataSource.cs similarity index 100% rename from src/Juniper.Root/IO/IDataSource.cs rename to src/Juniper.IO/IDataSource.cs diff --git a/src/Juniper.Root/IO/IDeserializer.cs b/src/Juniper.IO/IDeserializer.cs similarity index 100% rename from src/Juniper.Root/IO/IDeserializer.cs rename to src/Juniper.IO/IDeserializer.cs diff --git a/src/Juniper.Root/IO/IDeserializerExt.cs b/src/Juniper.IO/IDeserializerExt.cs similarity index 100% rename from src/Juniper.Root/IO/IDeserializerExt.cs rename to src/Juniper.IO/IDeserializerExt.cs diff --git a/src/Juniper.Root/IO/IFactory.cs b/src/Juniper.IO/IFactory.cs similarity index 100% rename from src/Juniper.Root/IO/IFactory.cs rename to src/Juniper.IO/IFactory.cs diff --git a/src/Juniper.Root/IO/IInstallable.cs b/src/Juniper.IO/IInstallable.cs similarity index 100% rename from src/Juniper.Root/IO/IInstallable.cs rename to src/Juniper.IO/IInstallable.cs diff --git a/src/Juniper.Root/IO/IJsonDecoder.cs b/src/Juniper.IO/IJsonDecoder.cs similarity index 100% rename from src/Juniper.Root/IO/IJsonDecoder.cs rename to src/Juniper.IO/IJsonDecoder.cs diff --git a/src/Juniper.Root/IO/IJsonFactory.cs b/src/Juniper.IO/IJsonFactory.cs similarity index 100% rename from src/Juniper.Root/IO/IJsonFactory.cs rename to src/Juniper.IO/IJsonFactory.cs diff --git a/src/Juniper.Root/IO/ISaveable.cs b/src/Juniper.IO/ISaveable.cs similarity index 100% rename from src/Juniper.Root/IO/ISaveable.cs rename to src/Juniper.IO/ISaveable.cs diff --git a/src/Juniper.Root/IO/ISaveableExt.cs b/src/Juniper.IO/ISaveableExt.cs similarity index 100% rename from src/Juniper.Root/IO/ISaveableExt.cs rename to src/Juniper.IO/ISaveableExt.cs diff --git a/src/Juniper.Root/IO/ISerializer.cs b/src/Juniper.IO/ISerializer.cs similarity index 100% rename from src/Juniper.Root/IO/ISerializer.cs rename to src/Juniper.IO/ISerializer.cs diff --git a/src/Juniper.Root/IO/ISerializerExt.cs b/src/Juniper.IO/ISerializerExt.cs similarity index 54% rename from src/Juniper.Root/IO/ISerializerExt.cs rename to src/Juniper.IO/ISerializerExt.cs index 78d208dd53..8126b0c0f2 100644 --- a/src/Juniper.Root/IO/ISerializerExt.cs +++ b/src/Juniper.IO/ISerializerExt.cs @@ -1,6 +1,3 @@ -using Juniper.HTTP; - -using System.Net.WebSockets; using System.Text; namespace Juniper.IO; @@ -55,23 +52,6 @@ public static void Serialize(this ISerializer serializer, string fil serializer.Serialize(new FileInfo(fileName), value); } - public static void Serialize(this ISerializer serializer, HttpRequestMessage request, MediaType type, T value) - where M : MediaType - { - if (serializer is null) - { - throw new ArgumentNullException(nameof(serializer)); - } - - if (request is null) - { - throw new ArgumentNullException(nameof(request)); - } - - var stream = serializer.GetStream(value); - request.Body(new StreamContent(stream), type); - } - public static MemoryStream GetStream(this ISerializer serializer, T value) where M : MediaType { @@ -82,46 +62,6 @@ public static MemoryStream GetStream(this ISerializer serializer, T return stream; } - public static Task SerializeAsync(this ISerializer serializer, WebSocketConnection socket, T value) - where M : MediaType - where U : WebSocket - { - if (serializer is null) - { - throw new ArgumentNullException(nameof(serializer)); - } - - if (socket is null) - { - throw new ArgumentNullException(nameof(socket)); - } - - var data = serializer.Serialize(value); - return socket.SendAsync(data); - } - - public static Task SerializeAsync(this ISerializer serializer, WebSocketConnection socket, string message, T value) - where M : MediaType - where U : WebSocket - { - if (serializer is null) - { - throw new ArgumentNullException(nameof(serializer)); - } - - if (socket is null) - { - throw new ArgumentNullException(nameof(socket)); - } - - if (message is null) - { - throw new ArgumentNullException(nameof(message)); - } - - return socket.SendAsync(message, value, serializer); - } - public static string ToString(this ISerializer serializer, T value) where M : MediaType { diff --git a/src/Juniper.Root/IO/IStreamWrapper.cs b/src/Juniper.IO/IStreamWrapper.cs similarity index 100% rename from src/Juniper.Root/IO/IStreamWrapper.cs rename to src/Juniper.IO/IStreamWrapper.cs diff --git a/src/Juniper.Root/IO/Installable.cs b/src/Juniper.IO/Installable.cs similarity index 100% rename from src/Juniper.Root/IO/Installable.cs rename to src/Juniper.IO/Installable.cs diff --git a/src/Juniper.Root/IO/JsonFactory`1.cs b/src/Juniper.IO/JsonFactory`1.cs similarity index 100% rename from src/Juniper.Root/IO/JsonFactory`1.cs rename to src/Juniper.IO/JsonFactory`1.cs diff --git a/src/Juniper.Root/IO/JsonFactory`2.cs b/src/Juniper.IO/JsonFactory`2.cs similarity index 100% rename from src/Juniper.Root/IO/JsonFactory`2.cs rename to src/Juniper.IO/JsonFactory`2.cs diff --git a/src/Juniper.IO/Juniper.IO.csproj b/src/Juniper.IO/Juniper.IO.csproj new file mode 100644 index 0000000000..e0b5348eb7 --- /dev/null +++ b/src/Juniper.IO/Juniper.IO.csproj @@ -0,0 +1,38 @@ + + + + Juniper.IO + Juniper.IO + SeanMcBeth.Juniper.IO + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + diff --git a/src/Juniper.Root/NETFX/IO/StreamExt.cs b/src/Juniper.IO/NETFX/IO/StreamExt.cs similarity index 99% rename from src/Juniper.Root/NETFX/IO/StreamExt.cs rename to src/Juniper.IO/NETFX/IO/StreamExt.cs index 036553874e..17dc35bf75 100644 --- a/src/Juniper.Root/NETFX/IO/StreamExt.cs +++ b/src/Juniper.IO/NETFX/IO/StreamExt.cs @@ -38,40 +38,6 @@ await inStream .ConfigureAwait(false); } - public static void CopyTo(this Stream inStream, TempFile outFile) - { - if (inStream is null) - { - throw new ArgumentNullException(nameof(inStream)); - } - - if (outFile is null) - { - throw new ArgumentNullException(nameof(outFile)); - } - - using var outStream = outFile.Create(); - inStream.CopyTo(outStream); - } - - public static async Task CopyToAsync(this Stream inStream, TempFile outFile) - { - if (inStream is null) - { - throw new ArgumentNullException(nameof(inStream)); - } - - if (outFile is null) - { - throw new ArgumentNullException(nameof(outFile)); - } - - using var outStream = outFile.Create(); - await inStream - .CopyToAsync(outStream) - .ConfigureAwait(false); - } - public static void CopyTo(this Stream inStream, string outFileName) { if (inStream is null) @@ -150,4 +116,37 @@ public static void CopyTo(this FileInfo inFile, FileInfo outFile) _ = inFile.CopyTo(outFile.FullName, true); } + public static void CopyTo(this Stream inStream, TempFile outFile) + { + if (inStream is null) + { + throw new ArgumentNullException(nameof(inStream)); + } + + if (outFile is null) + { + throw new ArgumentNullException(nameof(outFile)); + } + + using var outStream = outFile.Create(); + inStream.CopyTo(outStream); + } + + public static async Task CopyToAsync(this Stream inStream, TempFile outFile) + { + if (inStream is null) + { + throw new ArgumentNullException(nameof(inStream)); + } + + if (outFile is null) + { + throw new ArgumentNullException(nameof(outFile)); + } + + using var outStream = outFile.Create(); + await inStream + .CopyToAsync(outStream) + .ConfigureAwait(false); + } } \ No newline at end of file diff --git a/src/Juniper.IO/NETFX/Runtime/Serialization/SerializationInfoExt.cs b/src/Juniper.IO/NETFX/Runtime/Serialization/SerializationInfoExt.cs new file mode 100644 index 0000000000..850bcca48d --- /dev/null +++ b/src/Juniper.IO/NETFX/Runtime/Serialization/SerializationInfoExt.cs @@ -0,0 +1,106 @@ +namespace System.Runtime.Serialization; + +public static class SerializationInfoExt +{ + public static T? GetValue(this SerializationInfo info, string name) + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + return (T?)info.GetValue(name, typeof(T)); + } + + public static List GetList(this SerializationInfo info, string name) + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + var list = new List(); + var arr = info.GetValue(name); + if (arr is not null) + { + list.AddRange(arr); + } + return list; + } + + public static void AddList(this SerializationInfo info, string name, List list) + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + info.AddValue(name, list?.ToArray()); + } + + public static T GetEnumFromString(this SerializationInfo info, string name) + where T : struct, Enum + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + var value = info.GetString(name); + if (!string.IsNullOrEmpty(value) + && Enum.TryParse(value, out T result)) + { + return result; + } + else + { + return default; + } + } + + public static void SetEnumAsString(this SerializationInfo info, string name, T value) + where T : struct, Enum + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + info.AddValue(name, value.ToString()); + } + + public static bool MaybeAddValue(this SerializationInfo info, string name, T value) + where T : class + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + if (value is not null) + { + info.AddValue(name, value); + return true; + } + + return false; + } + + public static void CheckForType(this SerializationInfo info, string expected) + { + if (info is null) + { + throw new ArgumentNullException(nameof(info)); + } + + foreach (var field in info) + { + if (field.Name == "Type" + && field.Value is string actual + && actual != expected) + { + throw new SerializationException($"Input type `{actual}` does not match expected type `{expected}`."); + } + } + } +} \ No newline at end of file diff --git a/src/Juniper.Root/NETFX/Text/Json/JsonDocumentExt.cs b/src/Juniper.IO/NETFX/Text/Json/JsonDocumentExt.cs similarity index 100% rename from src/Juniper.Root/NETFX/Text/Json/JsonDocumentExt.cs rename to src/Juniper.IO/NETFX/Text/Json/JsonDocumentExt.cs diff --git a/src/Juniper.Root/NETFX/Text/StringBuilderExt.cs b/src/Juniper.IO/NETFX/Text/StringBuilderExt.cs similarity index 100% rename from src/Juniper.Root/NETFX/Text/StringBuilderExt.cs rename to src/Juniper.IO/NETFX/Text/StringBuilderExt.cs diff --git a/src/Juniper.Root/IO/ProgressStream.cs b/src/Juniper.IO/ProgressStream.cs similarity index 100% rename from src/Juniper.Root/IO/ProgressStream.cs rename to src/Juniper.IO/ProgressStream.cs diff --git a/src/Juniper.Root/IO/StreamReaderEventer.cs b/src/Juniper.IO/StreamReaderEventer.cs similarity index 100% rename from src/Juniper.Root/IO/StreamReaderEventer.cs rename to src/Juniper.IO/StreamReaderEventer.cs diff --git a/src/Juniper.Root/IO/StringFactory.cs b/src/Juniper.IO/StringFactory.cs similarity index 100% rename from src/Juniper.Root/IO/StringFactory.cs rename to src/Juniper.IO/StringFactory.cs diff --git a/src/Juniper.Root/IO/TempFile.cs b/src/Juniper.IO/TempFile.cs similarity index 100% rename from src/Juniper.Root/IO/TempFile.cs rename to src/Juniper.IO/TempFile.cs diff --git a/src/Juniper.Root/IO/ZipFileDataSource.cs b/src/Juniper.IO/ZipFileDataSource.cs similarity index 100% rename from src/Juniper.Root/IO/ZipFileDataSource.cs rename to src/Juniper.IO/ZipFileDataSource.cs diff --git a/src/Juniper.Root/Logging/IErrorSource.cs b/src/Juniper.Logging/IErrorSource.cs similarity index 100% rename from src/Juniper.Root/Logging/IErrorSource.cs rename to src/Juniper.Logging/IErrorSource.cs diff --git a/src/Juniper.Root/Logging/IInfoSource.cs b/src/Juniper.Logging/IInfoSource.cs similarity index 100% rename from src/Juniper.Root/Logging/IInfoSource.cs rename to src/Juniper.Logging/IInfoSource.cs diff --git a/src/Juniper.Root/Logging/ILoggingSource.cs b/src/Juniper.Logging/ILoggingSource.cs similarity index 100% rename from src/Juniper.Root/Logging/ILoggingSource.cs rename to src/Juniper.Logging/ILoggingSource.cs diff --git a/src/Juniper.Root/Logging/IWarningSource.cs b/src/Juniper.Logging/IWarningSource.cs similarity index 100% rename from src/Juniper.Root/Logging/IWarningSource.cs rename to src/Juniper.Logging/IWarningSource.cs diff --git a/src/Juniper.Logging/Juniper.Logging.csproj b/src/Juniper.Logging/Juniper.Logging.csproj new file mode 100644 index 0000000000..81f966d1c8 --- /dev/null +++ b/src/Juniper.Logging/Juniper.Logging.csproj @@ -0,0 +1,33 @@ + + + + Juniper.Logging + Juniper.Logging + SeanMcBeth.Juniper.Logging + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + diff --git a/src/Juniper.Root/Logic/AbstractBinaryExpression.cs b/src/Juniper.Logic/AbstractBinaryExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/AbstractBinaryExpression.cs rename to src/Juniper.Logic/AbstractBinaryExpression.cs diff --git a/src/Juniper.Root/Logic/AbstractUnaryExpression.cs b/src/Juniper.Logic/AbstractUnaryExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/AbstractUnaryExpression.cs rename to src/Juniper.Logic/AbstractUnaryExpression.cs diff --git a/src/Juniper.Root/ActionExt.cs b/src/Juniper.Logic/ActionExt.cs similarity index 99% rename from src/Juniper.Root/ActionExt.cs rename to src/Juniper.Logic/ActionExt.cs index fa2d19dbd5..bd905db29f 100644 --- a/src/Juniper.Root/ActionExt.cs +++ b/src/Juniper.Logic/ActionExt.cs @@ -1,4 +1,4 @@ -namespace System; +namespace Juniper.Logic; public static class ActionExt { diff --git a/src/Juniper.Root/Always.cs b/src/Juniper.Logic/Always.cs similarity index 94% rename from src/Juniper.Root/Always.cs rename to src/Juniper.Logic/Always.cs index 284353a523..b1e1996541 100644 --- a/src/Juniper.Root/Always.cs +++ b/src/Juniper.Logic/Always.cs @@ -1,4 +1,4 @@ -namespace Juniper; +namespace Juniper.Logic; public static class Always { @@ -112,7 +112,7 @@ public static Func Not(Fun return (arg1, arg2, arg3, arg4, arg5, arg6) => !func(arg1, arg2, arg3, arg4, arg5, arg6); } - public static Func Eq(T arg1) + public static Func Eq(T? arg1) { return arg2 => arg1?.Equals(arg2) == true; } @@ -122,13 +122,13 @@ public static T Identity(T value) return value; } - public static bool Null(T value) + public static bool Null(T? value) where T : class { return value is null; } - public static bool NotNull(T value) + public static bool NotNull(T? value) where T : class { return value is not null; diff --git a/src/Juniper.Root/Logic/AndExpression.cs b/src/Juniper.Logic/AndExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/AndExpression.cs rename to src/Juniper.Logic/AndExpression.cs diff --git a/src/Juniper.Root/Logic/EmptyExpression.cs b/src/Juniper.Logic/EmptyExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/EmptyExpression.cs rename to src/Juniper.Logic/EmptyExpression.cs diff --git a/src/Juniper.Root/Logic/IExpression.cs b/src/Juniper.Logic/IExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/IExpression.cs rename to src/Juniper.Logic/IExpression.cs diff --git a/src/Juniper.Root/Logic/ItemExpression.cs b/src/Juniper.Logic/ItemExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/ItemExpression.cs rename to src/Juniper.Logic/ItemExpression.cs diff --git a/src/Juniper.Logic/Juniper.Logic.csproj b/src/Juniper.Logic/Juniper.Logic.csproj new file mode 100644 index 0000000000..031e91b441 --- /dev/null +++ b/src/Juniper.Logic/Juniper.Logic.csproj @@ -0,0 +1,34 @@ + + + + Juniper.Logic + Juniper.Logic + SeanMcBeth.Juniper.Logic + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + diff --git a/src/Juniper.Root/Logic/LogicConstructor.cs b/src/Juniper.Logic/LogicConstructor.cs similarity index 100% rename from src/Juniper.Root/Logic/LogicConstructor.cs rename to src/Juniper.Logic/LogicConstructor.cs diff --git a/src/Juniper.Root/Logic/NotExpression.cs b/src/Juniper.Logic/NotExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/NotExpression.cs rename to src/Juniper.Logic/NotExpression.cs diff --git a/src/Juniper.Root/Logic/OrExpression.cs b/src/Juniper.Logic/OrExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/OrExpression.cs rename to src/Juniper.Logic/OrExpression.cs diff --git a/src/Juniper.Root/Retry.cs b/src/Juniper.Logic/Retry.cs similarity index 81% rename from src/Juniper.Root/Retry.cs rename to src/Juniper.Logic/Retry.cs index 9c845fb8e8..a38ee8636c 100644 --- a/src/Juniper.Root/Retry.cs +++ b/src/Juniper.Logic/Retry.cs @@ -1,4 +1,4 @@ -namespace Juniper; +namespace Juniper.Logic; public static class Retry { @@ -6,7 +6,7 @@ public static async Task Times(int attempts, Func> action, Fu { var result = default(T); var errors = new List(); - for (int i = attempts; i > 0 && (result is null || !validate(result)); --i) + for (var i = attempts; i > 0 && (result is null || !validate(result)); --i) { try { @@ -37,7 +37,7 @@ public static T Times(int attempts, Func action, Func valida { var result = default(T); var errors = new List(); - for (int i = attempts; i > 0 && (result is null || !validate(result)); --i) + for (var i = attempts; i > 0 && (result is null || !validate(result)); --i) { try { @@ -51,7 +51,14 @@ public static T Times(int attempts, Func action, Func valida if (result is null || !validate(result)) { - throw new AggregateException("Failed to retrieve a valide result", errors); + if (result != default(T)) + { + throw new Exception(generateErrorMessage(result)); + } + else + { + throw new AggregateException("Failed to retrieve a valide result", errors); + } } return result; diff --git a/src/Juniper.Root/Logic/XorExpression.cs b/src/Juniper.Logic/XorExpression.cs similarity index 100% rename from src/Juniper.Root/Logic/XorExpression.cs rename to src/Juniper.Logic/XorExpression.cs diff --git a/src/Juniper.Root/Mathematics/AbstractStatisticsCollection.cs b/src/Juniper.Mathematics/AbstractStatisticsCollection.cs similarity index 100% rename from src/Juniper.Root/Mathematics/AbstractStatisticsCollection.cs rename to src/Juniper.Mathematics/AbstractStatisticsCollection.cs index 4926e97681..49db302ddc 100644 --- a/src/Juniper.Root/Mathematics/AbstractStatisticsCollection.cs +++ b/src/Juniper.Mathematics/AbstractStatisticsCollection.cs @@ -1,7 +1,7 @@ -using Juniper.Collections; - using System.Collections; +using Juniper.Collections; + namespace Juniper.Mathematics; /// diff --git a/src/Juniper.Mathematics/Juniper.Mathematics.csproj b/src/Juniper.Mathematics/Juniper.Mathematics.csproj new file mode 100644 index 0000000000..5f10147e9a --- /dev/null +++ b/src/Juniper.Mathematics/Juniper.Mathematics.csproj @@ -0,0 +1,42 @@ + + + + Juniper.Mathematics + Juniper.Mathematics + SeanMcBeth.Juniper.Mathematics + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + + + + + diff --git a/src/Juniper.Root/Mathematics/Matrix3x2Serializable.cs b/src/Juniper.Mathematics/Matrix3x2Serializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Matrix3x2Serializable.cs rename to src/Juniper.Mathematics/Matrix3x2Serializable.cs diff --git a/src/Juniper.Root/Mathematics/Matrix4x4Serializable.cs b/src/Juniper.Mathematics/Matrix4x4Serializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Matrix4x4Serializable.cs rename to src/Juniper.Mathematics/Matrix4x4Serializable.cs diff --git a/src/Juniper.Root/NETFX/Numerics/MathExt.cs b/src/Juniper.Mathematics/NETFX/Numerics/MathExt.cs similarity index 68% rename from src/Juniper.Root/NETFX/Numerics/MathExt.cs rename to src/Juniper.Mathematics/NETFX/Numerics/MathExt.cs index cdadc68175..88c84ca3de 100644 --- a/src/Juniper.Root/NETFX/Numerics/MathExt.cs +++ b/src/Juniper.Mathematics/NETFX/Numerics/MathExt.cs @@ -1,6 +1,3 @@ -using Juniper.Units; -using Juniper.World.GIS; - namespace System.Numerics; public static class MathExt @@ -186,86 +183,6 @@ public static Vector3 ToSystemVector3(this float[] values) return new Vector3(values[0], values[1], values[2]); } - /// - /// Convert a Vector3 with a given UTM Zone to a - /// - /// The utm. - /// Value. - /// Donated zone. - public static UTMPoint ToUTM(this Vector3 v, int donatedZone, GlobeHemisphere hemisphere) - { - return new UTMPoint(v.X, v.Z, v.Y, donatedZone, hemisphere); - } - - /// - /// Convert a Vector3 with a given UTM Zone to a - /// - /// The utm. - /// Value. - /// Donated zone. - public static Vector3 ToSystemVector3(this UTMPoint v) - { - if (v is null) - { - throw new ArgumentNullException(nameof(v)); - } - - return new Vector3( - (float)v.Easting, - (float)v.Altitude, - (float)v.Northing); - } - - /// - /// Convert this UTMPoint to a Unity Vector3, projected to the screen using the provided matrix. - /// - /// - /// - /// - public static Vector3 ToScreen(this UTMPoint v, Matrix4x4 toScreen) - { - if (v is null) - { - throw new ArgumentNullException(nameof(v)); - } - - return Vector3.Transform(v.ToSystemVector3(), toScreen); - } - - /// - /// Converts this LatLngPoint to a UTM point that is stored as a Unity Vector3 object. - /// - /// - /// - public static Vector3 ToVector3(this LatLngPoint value) - { - return value.ToUTM().ToSystemVector3(); - } - - /// - /// Converts this LatLngPoint to an intermediate value roughly corresponding to feet that - /// maintains perpendicular and parallel line relationships. The spherical model of the Earth - /// that this function uses ruins it for distance calculations. - /// - /// - [Obsolete("This should really only ever be used when trying to match visuals to Google Maps.")] - public static Vector3 SphericalMercator(this LatLngPoint value) - { - if (value is null) - { - throw new ArgumentNullException(nameof(value)); - } - - var lat = Degrees.Radians(value.Lat); - var lng = Degrees.Radians(value.Lng); - var x = DatumWGS_84.equatorialRadius * lng; - var y = DatumWGS_84.equatorialRadius * Math.Log(Math.Tan((0.25 * Math.PI) + (0.5 * lat))); - return new Vector3( - (float)x, - (float)y, - (float)value.Alt); - } - /// /// Calculate the centroid of a cloud of points. The centroid is just a fancy name for the /// average of all the vectors together. @@ -366,37 +283,4 @@ public static Plane ToSystemPlane(this float[] values) return new Plane(values[0], values[1], values[2], values[4]); } - - - /// - /// Converts an AltitudeAzimuth to Unity's standard rotation construct. - /// - public static Quaternion ToQuaternion(this HorizontalSphericalPosition p) - { - if (p is null) - { - throw new ArgumentNullException(nameof(p)); - } - - return Quaternion.CreateFromYawPitchRoll( - (float)p.AzimuthDegrees, - (float)p.AltitudeDegrees, - 0); - } - - /// - /// Converts an AltitudeAzimuth to Unity's standard Euler rotation construct. - /// - public static Vector3 ToEuler(this HorizontalSphericalPosition p) - { - if (p is null) - { - throw new ArgumentNullException(nameof(p)); - } - - return new Vector3( - (float)p.AltitudeDegrees, - (float)p.AzimuthDegrees, - 0); - } } diff --git a/src/Juniper.Root/Mathematics/PlaneSerializable.cs b/src/Juniper.Mathematics/PlaneSerializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/PlaneSerializable.cs rename to src/Juniper.Mathematics/PlaneSerializable.cs diff --git a/src/Juniper.Root/Mathematics/Pose.cs b/src/Juniper.Mathematics/Pose.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Pose.cs rename to src/Juniper.Mathematics/Pose.cs diff --git a/src/Juniper.Root/Mathematics/PoseSerializable.cs b/src/Juniper.Mathematics/PoseSerializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/PoseSerializable.cs rename to src/Juniper.Mathematics/PoseSerializable.cs diff --git a/src/Juniper.Root/Mathematics/QuaternionSerializable.cs b/src/Juniper.Mathematics/QuaternionSerializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/QuaternionSerializable.cs rename to src/Juniper.Mathematics/QuaternionSerializable.cs diff --git a/src/Juniper.Mathematics/RandomExt.cs b/src/Juniper.Mathematics/RandomExt.cs new file mode 100644 index 0000000000..6c0a7e22d6 --- /dev/null +++ b/src/Juniper.Mathematics/RandomExt.cs @@ -0,0 +1,32 @@ +using System.Numerics; + +namespace System; + +public static class RandomExt +{ + public static Vector3 NextVector3(this Random rand) + { + if (rand is null) + { + throw new ArgumentNullException(nameof(rand)); + } + + return new Vector3( + (float)rand.NextDouble() * 2 - 1, + (float)rand.NextDouble() * 2 - 1, + (float)rand.NextDouble() * 2 - 1); + } + + public static Quaternion NextQuaternion(this Random rand) + { + if (rand is null) + { + throw new ArgumentNullException(nameof(rand)); + } + + return Quaternion.CreateFromYawPitchRoll( + (float)rand.NextDouble() * 2 - 1, + (float)rand.NextDouble() * 2 - 1, + (float)rand.NextDouble() * 2 - 1); + } +} \ No newline at end of file diff --git a/src/Juniper.Root/Mathematics/Rect.cs b/src/Juniper.Mathematics/Rect.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Rect.cs rename to src/Juniper.Mathematics/Rect.cs diff --git a/src/Juniper.Root/NETFX/Runtime/Serialization/SerializationInfoExt.cs b/src/Juniper.Mathematics/SerializationInfoExt.cs similarity index 59% rename from src/Juniper.Root/NETFX/Runtime/Serialization/SerializationInfoExt.cs rename to src/Juniper.Mathematics/SerializationInfoExt.cs index d950211914..3319c8956f 100644 --- a/src/Juniper.Root/NETFX/Runtime/Serialization/SerializationInfoExt.cs +++ b/src/Juniper.Mathematics/SerializationInfoExt.cs @@ -4,42 +4,6 @@ namespace System.Runtime.Serialization; public static class SerializationInfoExt { - public static T? GetValue(this SerializationInfo info, string name) - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - return (T?)info.GetValue(name, typeof(T)); - } - - public static List GetList(this SerializationInfo info, string name) - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - var list = new List(); - var arr = info.GetValue(name); - if (arr is not null) - { - list.AddRange(arr); - } - return list; - } - - public static void AddList(this SerializationInfo info, string name, List list) - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - info.AddValue(name, list?.ToArray()); - } - public static void AddVector2(this SerializationInfo info, string name, Vector2Serializable v) { if (info is null) @@ -179,70 +143,4 @@ public static Matrix4x4Serializable GetMatrix4x4(this SerializationInfo info, st return info.GetValue(name); } - - public static T GetEnumFromString(this SerializationInfo info, string name) - where T : struct, Enum - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - var value = info.GetString(name); - if (!string.IsNullOrEmpty(value) - && Enum.TryParse(value, out T result)) - { - return result; - } - else - { - return default; - } - } - - public static void SetEnumAsString(this SerializationInfo info, string name, T value) - where T : struct, Enum - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - info.AddValue(name, value.ToString()); - } - - public static bool MaybeAddValue(this SerializationInfo info, string name, T value) - where T : class - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - if (value is not null) - { - info.AddValue(name, value); - return true; - } - - return false; - } - - public static void CheckForType(this SerializationInfo info, string expected) - { - if (info is null) - { - throw new ArgumentNullException(nameof(info)); - } - - foreach (var field in info) - { - if (field.Name == "Type" - && field.Value is string actual - && actual != expected) - { - throw new SerializationException($"Input type `{actual}` does not match expected type `{expected}`."); - } - } - } } \ No newline at end of file diff --git a/src/Juniper.Root/Mathematics/SingleStatisticsCollection.cs b/src/Juniper.Mathematics/SingleStatisticsCollection.cs similarity index 100% rename from src/Juniper.Root/Mathematics/SingleStatisticsCollection.cs rename to src/Juniper.Mathematics/SingleStatisticsCollection.cs diff --git a/src/Juniper.Root/Mathematics/Vector2Serializable.cs b/src/Juniper.Mathematics/Vector2Serializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector2Serializable.cs rename to src/Juniper.Mathematics/Vector2Serializable.cs diff --git a/src/Juniper.Root/Mathematics/Vector2Statistics.cs b/src/Juniper.Mathematics/Vector2Statistics.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector2Statistics.cs rename to src/Juniper.Mathematics/Vector2Statistics.cs diff --git a/src/Juniper.Root/Mathematics/Vector3Serializable.cs b/src/Juniper.Mathematics/Vector3Serializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector3Serializable.cs rename to src/Juniper.Mathematics/Vector3Serializable.cs diff --git a/src/Juniper.Root/Mathematics/Vector3Statistics.cs b/src/Juniper.Mathematics/Vector3Statistics.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector3Statistics.cs rename to src/Juniper.Mathematics/Vector3Statistics.cs diff --git a/src/Juniper.Root/Mathematics/Vector4Serializable.cs b/src/Juniper.Mathematics/Vector4Serializable.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector4Serializable.cs rename to src/Juniper.Mathematics/Vector4Serializable.cs diff --git a/src/Juniper.Root/Mathematics/Vector4Statistics.cs b/src/Juniper.Mathematics/Vector4Statistics.cs similarity index 100% rename from src/Juniper.Root/Mathematics/Vector4Statistics.cs rename to src/Juniper.Mathematics/Vector4Statistics.cs diff --git a/src/Juniper.Root/Mathematics/VectorToStringExt.cs b/src/Juniper.Mathematics/VectorToStringExt.cs similarity index 100% rename from src/Juniper.Root/Mathematics/VectorToStringExt.cs rename to src/Juniper.Mathematics/VectorToStringExt.cs diff --git a/src/Juniper.Root/Application.Values.cs b/src/Juniper.MediaType/Application.Values.cs similarity index 100% rename from src/Juniper.Root/Application.Values.cs rename to src/Juniper.MediaType/Application.Values.cs diff --git a/src/Juniper.Root/Application.cs b/src/Juniper.MediaType/Application.cs similarity index 100% rename from src/Juniper.Root/Application.cs rename to src/Juniper.MediaType/Application.cs diff --git a/src/Juniper.Root/Audio.Values.cs b/src/Juniper.MediaType/Audio.Values.cs similarity index 100% rename from src/Juniper.Root/Audio.Values.cs rename to src/Juniper.MediaType/Audio.Values.cs diff --git a/src/Juniper.Root/Audio.cs b/src/Juniper.MediaType/Audio.cs similarity index 100% rename from src/Juniper.Root/Audio.cs rename to src/Juniper.MediaType/Audio.cs diff --git a/src/Juniper.Root/Chemical.Values.cs b/src/Juniper.MediaType/Chemical.Values.cs similarity index 100% rename from src/Juniper.Root/Chemical.Values.cs rename to src/Juniper.MediaType/Chemical.Values.cs diff --git a/src/Juniper.Root/Chemical.cs b/src/Juniper.MediaType/Chemical.cs similarity index 100% rename from src/Juniper.Root/Chemical.cs rename to src/Juniper.MediaType/Chemical.cs diff --git a/src/Juniper.Root/Font.Values.cs b/src/Juniper.MediaType/Font.Values.cs similarity index 100% rename from src/Juniper.Root/Font.Values.cs rename to src/Juniper.MediaType/Font.Values.cs diff --git a/src/Juniper.Root/Font.cs b/src/Juniper.MediaType/Font.cs similarity index 100% rename from src/Juniper.Root/Font.cs rename to src/Juniper.MediaType/Font.cs diff --git a/src/Juniper.MediaType/IDictionaryExt.cs b/src/Juniper.MediaType/IDictionaryExt.cs new file mode 100644 index 0000000000..7eecbd3901 --- /dev/null +++ b/src/Juniper.MediaType/IDictionaryExt.cs @@ -0,0 +1,29 @@ +using Juniper; + +namespace System.Collections.Generic; + +/// +/// Extension methods for System.Collections.Generic.Dictionary{TKey, TValue} +/// +public static class IDictionaryExt +{ + + + public static bool TryGetMediaType(this IDictionary dict, string key, out MediaType? v) + { + if (dict is null) + { + throw new ArgumentNullException(nameof(dict)); + } + + if (!dict.ContainsKey(key)) + { + v = null; + return false; + } + else + { + return MediaType.TryParse(dict[key], out v); + } + } +} \ No newline at end of file diff --git a/src/Juniper.Root/Image.Values.cs b/src/Juniper.MediaType/Image.Values.cs similarity index 100% rename from src/Juniper.Root/Image.Values.cs rename to src/Juniper.MediaType/Image.Values.cs diff --git a/src/Juniper.Root/Image.cs b/src/Juniper.MediaType/Image.cs similarity index 100% rename from src/Juniper.Root/Image.cs rename to src/Juniper.MediaType/Image.cs diff --git a/src/Juniper.MediaType/Juniper.MediaType.csproj b/src/Juniper.MediaType/Juniper.MediaType.csproj new file mode 100644 index 0000000000..8bd58d98d8 --- /dev/null +++ b/src/Juniper.MediaType/Juniper.MediaType.csproj @@ -0,0 +1,119 @@ + + + + Juniper.MediaType + Juniper + SeanMcBeth.Juniper.MediaType + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + + + MediaType.cs + + + Application.cs + + + MediaType.cs + + + Audio.cs + + + MediaType.cs + + + Chemical.cs + + + MediaType.cs + + + Font.cs + + + MediaType.cs + + + Image.cs + + + MediaType.cs + + + MediaType.cs + + + Message.cs + + + MediaType.cs + + + Model.cs + + + MediaType.cs + + + Multipart.cs + + + MediaType.cs + + + Text.cs + + + MediaType.cs + + + MediaType.cs + + + Video.cs + + + MediaType.cs + + + XShader.cs + + + MediaType.cs + + + XConference.cs + + + + diff --git a/src/Juniper.Root/MediaType.Values.cs b/src/Juniper.MediaType/MediaType.Values.cs similarity index 100% rename from src/Juniper.Root/MediaType.Values.cs rename to src/Juniper.MediaType/MediaType.Values.cs diff --git a/src/Juniper.Root/MediaType.cs b/src/Juniper.MediaType/MediaType.cs similarity index 98% rename from src/Juniper.Root/MediaType.cs rename to src/Juniper.MediaType/MediaType.cs index 5579f96c89..a2eeeddadb 100644 --- a/src/Juniper.Root/MediaType.cs +++ b/src/Juniper.MediaType/MediaType.cs @@ -1,5 +1,3 @@ -using Juniper.IO; - using System.Net.Http.Headers; using System.Text.RegularExpressions; @@ -175,9 +173,6 @@ public static MediaType Lookup(string value) } } - public static ContentReference operator +(string cacheID, MediaType contentType) => - new(cacheID, contentType); - public static implicit operator string(MediaType mediaType) => mediaType.ToString(); diff --git a/src/Juniper.Root/Message.Values.cs b/src/Juniper.MediaType/Message.Values.cs similarity index 100% rename from src/Juniper.Root/Message.Values.cs rename to src/Juniper.MediaType/Message.Values.cs diff --git a/src/Juniper.Root/Message.cs b/src/Juniper.MediaType/Message.cs similarity index 100% rename from src/Juniper.Root/Message.cs rename to src/Juniper.MediaType/Message.cs diff --git a/src/Juniper.Root/Model.Values.cs b/src/Juniper.MediaType/Model.Values.cs similarity index 100% rename from src/Juniper.Root/Model.Values.cs rename to src/Juniper.MediaType/Model.Values.cs diff --git a/src/Juniper.Root/Model.cs b/src/Juniper.MediaType/Model.cs similarity index 100% rename from src/Juniper.Root/Model.cs rename to src/Juniper.MediaType/Model.cs diff --git a/src/Juniper.Root/Multipart.Values.cs b/src/Juniper.MediaType/Multipart.Values.cs similarity index 100% rename from src/Juniper.Root/Multipart.Values.cs rename to src/Juniper.MediaType/Multipart.Values.cs diff --git a/src/Juniper.Root/Multipart.cs b/src/Juniper.MediaType/Multipart.cs similarity index 100% rename from src/Juniper.Root/Multipart.cs rename to src/Juniper.MediaType/Multipart.cs diff --git a/src/Juniper.Root/Text.Values.cs b/src/Juniper.MediaType/Text.Values.cs similarity index 100% rename from src/Juniper.Root/Text.Values.cs rename to src/Juniper.MediaType/Text.Values.cs diff --git a/src/Juniper.Root/Text.cs b/src/Juniper.MediaType/Text.cs similarity index 100% rename from src/Juniper.Root/Text.cs rename to src/Juniper.MediaType/Text.cs diff --git a/src/Juniper.Root/Unknown.cs b/src/Juniper.MediaType/Unknown.cs similarity index 100% rename from src/Juniper.Root/Unknown.cs rename to src/Juniper.MediaType/Unknown.cs diff --git a/src/Juniper.Root/Video.Values.cs b/src/Juniper.MediaType/Video.Values.cs similarity index 100% rename from src/Juniper.Root/Video.Values.cs rename to src/Juniper.MediaType/Video.Values.cs diff --git a/src/Juniper.Root/Video.cs b/src/Juniper.MediaType/Video.cs similarity index 100% rename from src/Juniper.Root/Video.cs rename to src/Juniper.MediaType/Video.cs diff --git a/src/Juniper.Root/XConference.Values.cs b/src/Juniper.MediaType/XConference.Values.cs similarity index 100% rename from src/Juniper.Root/XConference.Values.cs rename to src/Juniper.MediaType/XConference.Values.cs diff --git a/src/Juniper.Root/XConference.cs b/src/Juniper.MediaType/XConference.cs similarity index 100% rename from src/Juniper.Root/XConference.cs rename to src/Juniper.MediaType/XConference.cs diff --git a/src/Juniper.Root/XShader.Values.cs b/src/Juniper.MediaType/XShader.Values.cs similarity index 100% rename from src/Juniper.Root/XShader.Values.cs rename to src/Juniper.MediaType/XShader.Values.cs diff --git a/src/Juniper.Root/XShader.cs b/src/Juniper.MediaType/XShader.cs similarity index 100% rename from src/Juniper.Root/XShader.cs rename to src/Juniper.MediaType/XShader.cs diff --git a/src/Juniper.Root/NamedActions/AbstractNamedAction.cs b/src/Juniper.NamedActions/AbstractNamedAction.cs similarity index 100% rename from src/Juniper.Root/NamedActions/AbstractNamedAction.cs rename to src/Juniper.NamedActions/AbstractNamedAction.cs diff --git a/src/Juniper.NamedActions/IProgressExt.cs b/src/Juniper.NamedActions/IProgressExt.cs new file mode 100644 index 0000000000..e9ec1af8b3 --- /dev/null +++ b/src/Juniper.NamedActions/IProgressExt.cs @@ -0,0 +1,62 @@ +using static System.Math; + +namespace Juniper.Progress; + + +/// +/// Progress reporting interface mixin methods. +/// +public static class IProgressExt +{ + private static IEnumerable<(IProgress prog, T act)> Split(this IProgress? parent, params T[] actors) + where T : INamedAction + { + return parent + .Split(actors + .Select(a => a.Name) + .ToArray()) + .Select((p, i) => (p, actors[i])); + } + + public static void Run(this IProgress parent, params NamedAction[] actors) + { + foreach ((var prog, var act) in parent.Split(actors)) + { + prog.Report(0); + act.Invoke(prog); + prog.Report(1); + } + } + + public static void Run(this IProgress parent, params NamedAction[] actors) + { + foreach ((var prog, var act) in parent.Split(actors)) + { + prog.Report(0); + act.Invoke(); + prog.Report(1); + } + } + + public static async Task RunAsync(this IProgress parent, params NamedFunc[] actors) + { + foreach ((var prog, var act) in parent.Split(actors)) + { + prog.Report(0); + await act.Invoke(prog) + .ConfigureAwait(false); + prog.Report(1); + } + } + + public static async Task RunAsync(this IProgress parent, params NamedFunc[] actors) + { + foreach ((var prog, var act) in parent.Split(actors)) + { + prog.Report(0); + await act.Invoke() + .ConfigureAwait(false); + prog.Report(1); + } + } +} \ No newline at end of file diff --git a/src/Juniper.NamedActions/Juniper.NamedActions.csproj b/src/Juniper.NamedActions/Juniper.NamedActions.csproj new file mode 100644 index 0000000000..040f1d2550 --- /dev/null +++ b/src/Juniper.NamedActions/Juniper.NamedActions.csproj @@ -0,0 +1,33 @@ + + + + Juniper.NamedActions + Juniper.NamedActions + SeanMcBeth.Juniper.NamedActions + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + diff --git a/src/Juniper.Root/NamedActions/NamedAction.cs b/src/Juniper.NamedActions/NamedAction.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction.cs rename to src/Juniper.NamedActions/NamedAction.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`1.cs b/src/Juniper.NamedActions/NamedAction`1.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`1.cs rename to src/Juniper.NamedActions/NamedAction`1.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`10.cs b/src/Juniper.NamedActions/NamedAction`10.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`10.cs rename to src/Juniper.NamedActions/NamedAction`10.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`11.cs b/src/Juniper.NamedActions/NamedAction`11.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`11.cs rename to src/Juniper.NamedActions/NamedAction`11.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`12.cs b/src/Juniper.NamedActions/NamedAction`12.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`12.cs rename to src/Juniper.NamedActions/NamedAction`12.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`13.cs b/src/Juniper.NamedActions/NamedAction`13.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`13.cs rename to src/Juniper.NamedActions/NamedAction`13.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`14.cs b/src/Juniper.NamedActions/NamedAction`14.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`14.cs rename to src/Juniper.NamedActions/NamedAction`14.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`15.cs b/src/Juniper.NamedActions/NamedAction`15.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`15.cs rename to src/Juniper.NamedActions/NamedAction`15.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`16.cs b/src/Juniper.NamedActions/NamedAction`16.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`16.cs rename to src/Juniper.NamedActions/NamedAction`16.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`2.cs b/src/Juniper.NamedActions/NamedAction`2.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`2.cs rename to src/Juniper.NamedActions/NamedAction`2.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`3.cs b/src/Juniper.NamedActions/NamedAction`3.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`3.cs rename to src/Juniper.NamedActions/NamedAction`3.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`4.cs b/src/Juniper.NamedActions/NamedAction`4.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`4.cs rename to src/Juniper.NamedActions/NamedAction`4.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`5.cs b/src/Juniper.NamedActions/NamedAction`5.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`5.cs rename to src/Juniper.NamedActions/NamedAction`5.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`6.cs b/src/Juniper.NamedActions/NamedAction`6.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`6.cs rename to src/Juniper.NamedActions/NamedAction`6.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`7.cs b/src/Juniper.NamedActions/NamedAction`7.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`7.cs rename to src/Juniper.NamedActions/NamedAction`7.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`8.cs b/src/Juniper.NamedActions/NamedAction`8.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`8.cs rename to src/Juniper.NamedActions/NamedAction`8.cs diff --git a/src/Juniper.Root/NamedActions/NamedAction`9.cs b/src/Juniper.NamedActions/NamedAction`9.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedAction`9.cs rename to src/Juniper.NamedActions/NamedAction`9.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`1.cs b/src/Juniper.NamedActions/NamedFunc`1.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`1.cs rename to src/Juniper.NamedActions/NamedFunc`1.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`10.cs b/src/Juniper.NamedActions/NamedFunc`10.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`10.cs rename to src/Juniper.NamedActions/NamedFunc`10.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`11.cs b/src/Juniper.NamedActions/NamedFunc`11.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`11.cs rename to src/Juniper.NamedActions/NamedFunc`11.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`12.cs b/src/Juniper.NamedActions/NamedFunc`12.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`12.cs rename to src/Juniper.NamedActions/NamedFunc`12.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`13.cs b/src/Juniper.NamedActions/NamedFunc`13.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`13.cs rename to src/Juniper.NamedActions/NamedFunc`13.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`14.cs b/src/Juniper.NamedActions/NamedFunc`14.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`14.cs rename to src/Juniper.NamedActions/NamedFunc`14.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`15.cs b/src/Juniper.NamedActions/NamedFunc`15.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`15.cs rename to src/Juniper.NamedActions/NamedFunc`15.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`16.cs b/src/Juniper.NamedActions/NamedFunc`16.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`16.cs rename to src/Juniper.NamedActions/NamedFunc`16.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`17.cs b/src/Juniper.NamedActions/NamedFunc`17.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`17.cs rename to src/Juniper.NamedActions/NamedFunc`17.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`2.cs b/src/Juniper.NamedActions/NamedFunc`2.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`2.cs rename to src/Juniper.NamedActions/NamedFunc`2.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`3.cs b/src/Juniper.NamedActions/NamedFunc`3.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`3.cs rename to src/Juniper.NamedActions/NamedFunc`3.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`4.cs b/src/Juniper.NamedActions/NamedFunc`4.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`4.cs rename to src/Juniper.NamedActions/NamedFunc`4.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`5.cs b/src/Juniper.NamedActions/NamedFunc`5.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`5.cs rename to src/Juniper.NamedActions/NamedFunc`5.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`6.cs b/src/Juniper.NamedActions/NamedFunc`6.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`6.cs rename to src/Juniper.NamedActions/NamedFunc`6.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`7.cs b/src/Juniper.NamedActions/NamedFunc`7.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`7.cs rename to src/Juniper.NamedActions/NamedFunc`7.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`8.cs b/src/Juniper.NamedActions/NamedFunc`8.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`8.cs rename to src/Juniper.NamedActions/NamedFunc`8.cs diff --git a/src/Juniper.Root/NamedActions/NamedFunc`9.cs b/src/Juniper.NamedActions/NamedFunc`9.cs similarity index 100% rename from src/Juniper.Root/NamedActions/NamedFunc`9.cs rename to src/Juniper.NamedActions/NamedFunc`9.cs diff --git a/src/Juniper.ProcessManager/Juniper.ProcessManager.csproj b/src/Juniper.ProcessManager/Juniper.ProcessManager.csproj index b7b6602799..40bf2f7e16 100644 --- a/src/Juniper.ProcessManager/Juniper.ProcessManager.csproj +++ b/src/Juniper.ProcessManager/Juniper.ProcessManager.csproj @@ -24,7 +24,6 @@ - diff --git a/src/Juniper.Processes/Juniper.Processes.csproj b/src/Juniper.Processes/Juniper.Processes.csproj index 691f09b7f2..3177c220f2 100644 --- a/src/Juniper.Processes/Juniper.Processes.csproj +++ b/src/Juniper.Processes/Juniper.Processes.csproj @@ -32,7 +32,9 @@ - + + + diff --git a/src/Juniper.Root/Progress/IPreloadable.cs b/src/Juniper.Progress/IPreloadable.cs similarity index 100% rename from src/Juniper.Root/Progress/IPreloadable.cs rename to src/Juniper.Progress/IPreloadable.cs diff --git a/src/Juniper.Root/Progress/IProgress.cs b/src/Juniper.Progress/IProgress.cs similarity index 100% rename from src/Juniper.Root/Progress/IProgress.cs rename to src/Juniper.Progress/IProgress.cs diff --git a/src/Juniper.Root/Progress/IProgressExt.cs b/src/Juniper.Progress/IProgressExt.cs similarity index 80% rename from src/Juniper.Root/Progress/IProgressExt.cs rename to src/Juniper.Progress/IProgressExt.cs index 272c2202c2..473c456da8 100644 --- a/src/Juniper.Root/Progress/IProgressExt.cs +++ b/src/Juniper.Progress/IProgressExt.cs @@ -84,16 +84,6 @@ public static IReadOnlyList Split(this IProgress? parent, params stri .Select((p, i) => (p, items[i])); } - private static IEnumerable<(IProgress prog, T act)> Split(this IProgress? parent, params T[] actors) - where T : INamedAction - { - return parent - .Split(actors - .Select(a => a.Name) - .ToArray()) - .Select((p, i) => (p, actors[i])); - } - private static IEnumerable<(IProgress prog, T act)> Split2(this IProgress? parent, params T[] actors) where T : Delegate { @@ -102,26 +92,6 @@ public static IReadOnlyList Split(this IProgress? parent, params stri .Select((p, i) => (p, actors[i])); } - public static void Run(this IProgress parent, params NamedAction[] actors) - { - foreach ((var prog, var act) in parent.Split(actors)) - { - prog.Report(0); - act.Invoke(prog); - prog.Report(1); - } - } - - public static void Run(this IProgress parent, params NamedAction[] actors) - { - foreach ((var prog, var act) in parent.Split(actors)) - { - prog.Report(0); - act.Invoke(); - prog.Report(1); - } - } - public static void Run(this IProgress parent, params Action[] actors) { foreach ((var prog, var act) in parent.Split2(actors)) @@ -142,28 +112,6 @@ public static void Run(this IProgress parent, params Action[] actors) } } - public static async Task RunAsync(this IProgress parent, params NamedFunc[] actors) - { - foreach ((var prog, var act) in parent.Split(actors)) - { - prog.Report(0); - await act.Invoke(prog) - .ConfigureAwait(false); - prog.Report(1); - } - } - - public static async Task RunAsync(this IProgress parent, params NamedFunc[] actors) - { - foreach ((var prog, var act) in parent.Split(actors)) - { - prog.Report(0); - await act.Invoke() - .ConfigureAwait(false); - prog.Report(1); - } - } - public static async Task RunAsync(this IProgress parent, params Func[] actors) { foreach ((var prog, var act) in parent.Split2(actors)) diff --git a/src/Juniper.Progress/Juniper.Progress.csproj b/src/Juniper.Progress/Juniper.Progress.csproj new file mode 100644 index 0000000000..e5b3ba0a00 --- /dev/null +++ b/src/Juniper.Progress/Juniper.Progress.csproj @@ -0,0 +1,33 @@ + + + + Juniper.Progress + Juniper.Progress + SeanMcBeth.Juniper.Progress + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + diff --git a/src/Juniper.Root/Progress/ProgressAggregator.cs b/src/Juniper.Progress/ProgressAggregator.cs similarity index 100% rename from src/Juniper.Root/Progress/ProgressAggregator.cs rename to src/Juniper.Progress/ProgressAggregator.cs diff --git a/src/Juniper.Root/Progress/ProgressEventer.cs b/src/Juniper.Progress/ProgressEventer.cs similarity index 100% rename from src/Juniper.Root/Progress/ProgressEventer.cs rename to src/Juniper.Progress/ProgressEventer.cs diff --git a/src/Juniper.Root/Progress/ProgressSubdivision.cs b/src/Juniper.Progress/ProgressSubdivision.cs similarity index 100% rename from src/Juniper.Root/Progress/ProgressSubdivision.cs rename to src/Juniper.Progress/ProgressSubdivision.cs diff --git a/src/Juniper.Root/Juniper.Root.csproj b/src/Juniper.Root/Juniper.Root.csproj index 4ff400ff50..99809ca536 100644 --- a/src/Juniper.Root/Juniper.Root.csproj +++ b/src/Juniper.Root/Juniper.Root.csproj @@ -31,90 +31,4 @@ - - - - - - - - MediaType.cs - - - Application.cs - - - MediaType.cs - - - Audio.cs - - - MediaType.cs - - - Chemical.cs - - - MediaType.cs - - - Font.cs - - - MediaType.cs - - - Image.cs - - - MediaType.cs - - - MediaType.cs - - - Message.cs - - - MediaType.cs - - - Model.cs - - - MediaType.cs - - - Multipart.cs - - - MediaType.cs - - - Text.cs - - - MediaType.cs - - - MediaType.cs - - - Video.cs - - - MediaType.cs - - - XShader.cs - - - MediaType.cs - - - XConference.cs - - - diff --git a/src/Juniper.Root/NETFX/Collections/Generic/IDictionaryExt.cs b/src/Juniper.Root/NETFX/Collections/Generic/IDictionaryExt.cs index f8edbc4cef..fa2e2b2757 100644 --- a/src/Juniper.Root/NETFX/Collections/Generic/IDictionaryExt.cs +++ b/src/Juniper.Root/NETFX/Collections/Generic/IDictionaryExt.cs @@ -1,7 +1,5 @@ #nullable enable -using Juniper.World.GIS; -using Juniper; using System.Net; namespace System.Collections.Generic; @@ -561,60 +559,6 @@ public static bool TryGetIPAddress(this IDictionary dict, string } } - public static bool TryGetMediaType(this IDictionary dict, string key, out MediaType? v) - { - if (dict is null) - { - throw new ArgumentNullException(nameof(dict)); - } - - if (!dict.ContainsKey(key)) - { - v = null; - return false; - } - else - { - return MediaType.TryParse(dict[key], out v); - } - } - - public static bool TryGetSize(this IDictionary dict, string key, out Size? v) - { - if (dict is null) - { - throw new ArgumentNullException(nameof(dict)); - } - - if (!dict.ContainsKey(key)) - { - v = null; - return false; - } - else - { - return Size.TryParse(dict[key], out v); - } - } - - public static bool TryGetLatLng(this IDictionary dict, string key, out LatLngPoint? v) - { - if (dict is null) - { - throw new ArgumentNullException(nameof(dict)); - } - - if (!dict.ContainsKey(key)) - { - v = null; - return false; - } - else - { - return LatLngPoint.TryParse(dict[key], out v); - } - } - public static void SetValues(this IDictionary dict, params (string Key, string Value)[] pairs) { if (dict is null) diff --git a/src/Juniper.Root/NETFX/RandomExt.cs b/src/Juniper.Root/NETFX/RandomExt.cs index 67486ae446..2fa1b696d9 100644 --- a/src/Juniper.Root/NETFX/RandomExt.cs +++ b/src/Juniper.Root/NETFX/RandomExt.cs @@ -4,32 +4,6 @@ namespace System; public static class RandomExt { - public static Vector3 NextVector3(this Random rand) - { - if (rand is null) - { - throw new ArgumentNullException(nameof(rand)); - } - - return new Vector3( - (float)rand.NextDouble() * 2 - 1, - (float)rand.NextDouble() * 2 - 1, - (float)rand.NextDouble() * 2 - 1); - } - - public static Quaternion NextQuaternion(this Random rand) - { - if (rand is null) - { - throw new ArgumentNullException(nameof(rand)); - } - - return Quaternion.CreateFromYawPitchRoll( - (float)rand.NextDouble() * 2 - 1, - (float)rand.NextDouble() * 2 - 1, - (float)rand.NextDouble() * 2 - 1); - } - public static double Number(this Random rand, float min, float max, float power) { if (rand is null) @@ -82,19 +56,6 @@ public static T Item(this Random rand, T[] arr) return arr[rand.Next(0, arr.Length)]; } - public static int Color(this Random rand) - { - if (rand is null) - { - throw new ArgumentNullException(nameof(rand)); - } - - var r = rand.Next(0, 256); - var g = rand.Next(0, 256); - var b = rand.Next(0, 256); - return (r << (2 * Juniper.Units.Bits.PER_BYTE)) | (g << Juniper.Units.Bits.PER_BYTE) | b; - } - public static bool Coin(this Random rand, double weight = 0.5) { if (rand is null) diff --git a/src/Juniper.Server/GlobalSuppressions.cs b/src/Juniper.Server/GlobalSuppressions.cs new file mode 100644 index 0000000000..2b489a4689 --- /dev/null +++ b/src/Juniper.Server/GlobalSuppressions.cs @@ -0,0 +1,8 @@ +// This file is used by Code Analysis to maintain SuppressMessage +// attributes that are applied to this project. +// Project-level suppressions either have no target or are given +// a specific target and scoped to a namespace, type, member, etc. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Style", "IDE0022:Use block body for method", Justification = "Prefered coding style")] diff --git a/src/Juniper.Server/HTTP/HttpListenerResponseExt.cs b/src/Juniper.Server/HTTP/HttpListenerResponseExt.cs index 098c7beb5c..6a404ebc8c 100644 --- a/src/Juniper.Server/HTTP/HttpListenerResponseExt.cs +++ b/src/Juniper.Server/HTTP/HttpListenerResponseExt.cs @@ -1,5 +1,4 @@ -using Juniper.IO; - +using Juniper.Caching; using System.Globalization; using System.Net; using System.Text; diff --git a/src/Juniper.Server/Juniper.Server.csproj b/src/Juniper.Server/Juniper.Server.csproj index 353e729be1..cde5cfa10d 100644 --- a/src/Juniper.Server/Juniper.Server.csproj +++ b/src/Juniper.Server/Juniper.Server.csproj @@ -33,13 +33,12 @@ - - + diff --git a/src/Juniper.Root/TSBuild/BuildSystemDependency.cs b/src/Juniper.TSBuild.Core/BuildSystemDependency.cs similarity index 100% rename from src/Juniper.Root/TSBuild/BuildSystemDependency.cs rename to src/Juniper.TSBuild.Core/BuildSystemDependency.cs diff --git a/src/Juniper.Root/TSBuild/BuildSystemOptions.cs b/src/Juniper.TSBuild.Core/BuildSystemOptions.cs similarity index 100% rename from src/Juniper.Root/TSBuild/BuildSystemOptions.cs rename to src/Juniper.TSBuild.Core/BuildSystemOptions.cs diff --git a/src/Juniper.Root/TSBuild/DeploymentOptions.cs b/src/Juniper.TSBuild.Core/DeploymentOptions.cs similarity index 100% rename from src/Juniper.Root/TSBuild/DeploymentOptions.cs rename to src/Juniper.TSBuild.Core/DeploymentOptions.cs diff --git a/src/Juniper.TSBuild.Core/Juniper.TSBuild.Core.csproj b/src/Juniper.TSBuild.Core/Juniper.TSBuild.Core.csproj new file mode 100644 index 0000000000..0e40996417 --- /dev/null +++ b/src/Juniper.TSBuild.Core/Juniper.TSBuild.Core.csproj @@ -0,0 +1,38 @@ + + + + Juniper.TSBuild.Core + Juniper.TSBuild + SeanMcBeth.Juniper.TSBuild.Core + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + diff --git a/src/Juniper.Root/TSBuild/PathHelper.cs b/src/Juniper.TSBuild.Core/PathHelper.cs similarity index 100% rename from src/Juniper.Root/TSBuild/PathHelper.cs rename to src/Juniper.TSBuild.Core/PathHelper.cs diff --git a/src/Juniper.TSBuild/Juniper.TSBuild.csproj b/src/Juniper.TSBuild/Juniper.TSBuild.csproj index f1f9c67ade..e3a0aee127 100644 --- a/src/Juniper.TSBuild/Juniper.TSBuild.csproj +++ b/src/Juniper.TSBuild/Juniper.TSBuild.csproj @@ -31,7 +31,7 @@ - + diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts index c9bbb57d36..38feec2612 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts @@ -1,3 +1,4 @@ +type GraphMode = "directed" | "reverse-directed" | "undirected"; export declare class ForceDirectedGraph { private readonly container; private readonly getWeightMod; @@ -32,12 +33,14 @@ export declare class ForceDirectedGraph { get h(): number; get scale(): number; set scale(v: number); + private mid; constructor(container: HTMLElement, getWeightMod: (connected: boolean, dist: number, a: T, b: T) => number, makeElementClass: (value: T) => string, makeContent: (value: T) => string | HTMLElement); start(): void; stop(): void; + showCycles(show: boolean, strict: boolean): void; get values(): T[]; set values(v: T[]); - connect(connections: [T, T][]): void; + connect(connections: [T, T][], mode?: GraphMode): void; reset(): void; private _render; private setMouse; @@ -51,4 +54,5 @@ export declare class ForceDirectedGraph { private applyForces; fr91(): void; } +export {}; //# sourceMappingURL=ForceDirectedGraph.d.ts.map \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts.map b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts.map index 7fb0e4edc7..891df0f222 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts.map +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.d.ts.map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,MAAM,QAET;IAED,IAAI,MAAM,CAAC,CAAC,KAAA,EA8BX;IAED,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,GAAE,SAAsB;IAkB3D,KAAK;IAiBL,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmC;IAE/D,OAAO,CAAC,IAAI;IAuDZ,UAAU,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW;IAKjC,OAAO,CAAC,eAAe;IAmBvB,MAAM,CAAC,KAAK,EAAE,CAAC;IASf,QAAQ;IAQR,OAAO,CAAC,YAAY;IA6CpB,OAAO,CAAC,WAAW;IAuCnB,IAAI;CAgBP"} \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js index fa1e031224..4533d37de7 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js @@ -1,7 +1,7 @@ import { arrayRandom, arrayRemove, compareBy } from "@juniper-lib/collections/src/arrays"; import { debounce } from "@juniper-lib/events/src/debounce"; import { Tau } from "@juniper-lib/tslib/dist/math"; -import { ForceDirectedNode, copy, length, scale, sub, zero } from "./ForceDirectedNode"; +import { ForceDirectedNode, add, copy, length, scale, sub, zero } from "./ForceDirectedNode"; function distinct(arr) { return Array.from(new Set(arr)); } @@ -106,11 +106,25 @@ export class ForceDirectedGraph { this.attract = 1; this.repel = 1; this.centeringGravity = .1; + this.mid = [0, 0]; this.boundsCache = new Map(); this.render = this._render.bind(this); this.container.classList.add("force-directed-graph"); this.container.addEventListener("wheel", evt => { + this.setMouse(evt); + copy(this.mousePoint, delta); + sub(delta, this.displayCenter, delta); + scale(this.scale, delta, delta); + const start = Array.from(delta); this.scale -= 0.001 * evt.deltaY; + this.setMouse(evt); + copy(this.mousePoint, delta); + sub(delta, this.displayCenter, delta); + scale(this.scale, delta, delta); + const end = Array.from(delta); + sub(end, start, delta); + scale(1 / this.scale, delta, delta); + add(this.displayCenter, delta, this.displayCenter); }); this.container.addEventListener("mousedown", evt => { this.setMouse(evt); @@ -176,6 +190,9 @@ export class ForceDirectedGraph { this.content.style.transform = `scale(${this.scale})`; this.connectorsCanvas.width = this.w * devicePixelRatio * this.scale; this.connectorsCanvas.height = this.h * devicePixelRatio * this.scale; + this.mid[0] = this.w; + this.mid[1] = this.h; + scale(0.5, this.mid, this.mid); }); const resizer = new ResizeObserver((evts) => { for (const evt of evts) { @@ -201,6 +218,59 @@ export class ForceDirectedGraph { this._running = false; } } + showCycles(show, strict) { + if (show) { + const wasVisitedBy = new Map(); + for (const node of this.graph.values()) { + wasVisitedBy.set(node, new Set()); + } + for (const node of this.graph.values()) { + const visited = new Set(); + ; + const notVisited = (node) => !visited.has(node); + const queue = [...node.connections]; + if (!strict && node.reverseConnections.length > 0) { + queue.push(...node.reverseConnections); + } + while (queue.length > 0) { + const here = queue.shift(); + if (!visited.has(here)) { + visited.add(here); + wasVisitedBy.get(here).add(node); + const next = here.connections.filter(notVisited); + if (!strict) { + const reverse = here.reverseConnections.filter(notVisited); + if (reverse.length > 0) { + next.push(...reverse); + } + } + if (next.length > 0) { + queue.push(...next); + } + } + } + } + for (const node of this.graph.values()) { + const visitors = wasVisitedBy.get(node); + if (visitors.has(node)) { + for (const n of visitors) { + n.element.classList.add("cycled"); + } + } + } + for (const node of this.graph.values()) { + if (!node.element.classList.contains("cycled")) { + node.hidden = true; + } + } + } + else { + for (const node of this.graph.values()) { + node.element.classList.remove("cycled"); + node.hidden = false; + } + } + } get values() { return this.data; } @@ -220,18 +290,23 @@ export class ForceDirectedGraph { this.graph.set(value, node); this.elementToNode.set(node.element, node); this.content.append(node.element); - node.computeBounds(this.boundsCache); + node.computeBounds(1 / this.scale, this.boundsCache); } } this.reset(); } } } - connect(connections) { + connect(connections, mode = "directed") { for (const [fromValue, toValue] of connections) { const fromNode = this.graph.get(fromValue); const toNode = this.graph.get(toValue); - fromNode.connectTo(toNode); + if (mode === "directed" || mode === "undirected") { + fromNode.connectTo(toNode); + } + if (mode === "reverse-directed" || mode === "undirected") { + toNode.connectTo(fromNode); + } } this.updateDepths(); } @@ -424,9 +499,9 @@ export class ForceDirectedGraph { const c5 = 2; const k = c0 * Math.sqrt(c1 * area / this.displayCount); // Running this twice prevents oscillations from becoming visible. - for (let i = 0; i < 2; ++i) { - this.applyForces((connected, len) => connected ? c2 * Math.pow(len, c3) / k : 0, (_, len) => c4 * Math.pow(k, c5) / len); - } + //for (let i = 0; i < 2; ++i) { + this.applyForces((connected, len) => connected ? c2 * Math.pow(len, c3) / k : 0, (_, len) => c4 * Math.pow(k, c5) / len); + //} } } //# sourceMappingURL=ForceDirectedGraph.js.map \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js.map b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js.map index e8d21864cc..8cb1a2aefb 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js.map +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedGraph.js.map @@ -1 +1 @@ -{"version":3,"file":"ForceDirectedGraph.js","sourceRoot":"","sources":["../../src/ForceDirectedGraph/ForceDirectedGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,OAAO,EAAE,GAAG,EAAE,MAAM,8BAA8B,CAAC;AACnD,OA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IAAI,CAAC,WAAW,CACZ,CAAC,SAAS,EAAE,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9D,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;QAC5C,GAAG;IACP,CAAC;CACJ"} \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts index cfbd59478b..d1d3348ce2 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts @@ -36,6 +36,7 @@ export declare class ForceDirectedNode extends GraphNode { private _pinned; bounds: IFullBounds; depth: number; + hidden: boolean; get pinned(): boolean; set pinned(v: boolean); get moving(): boolean; @@ -43,10 +44,11 @@ export declare class ForceDirectedNode extends GraphNode { constructor(value: T, elementClass: string, content: string | HTMLElement); setContent(content: string | HTMLElement): void; setMouseOffset(mousePoint: Vec2): void; - computeBounds(boundsCache: BoundsCache): void; + computeBounds(scale: number, boundsCache: BoundsCache): void; updatePosition(cx: number, cy: number, maxDepth: number): void; moveTo(mousePoint: Vec2): void; resetForce(): void; + private isVisible; canDrawArrow(maxDepth: number): boolean; gravitate(gravity: number): void; attractRepel(n2: ForceDirectedNode, attract: number, attractFunc: (connected: boolean, len: number) => number, repel: number, repelFunc: (connected: boolean, len: number) => number, getWeightMod: (connected: boolean, dist: number, a: T, b: T) => number): void; diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts.map b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts.map index 4f457bd4d7..40f105582d 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts.map +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"ForceDirectedNode.d.ts","sourceRoot":"","sources":["../../src/ForceDirectedGraph/ForceDirectedNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACpC,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACnD,wBAAgB,MAAM,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,CAAA;AACzC,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AAarD,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,QAG9C;AAED,wBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,QAG9C;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,QAE3B;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,QAGlD;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,QAGtC;AAGD,UAAU,OAAO;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ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AAM,CAAC,CAAC,SAAA,EAGX;IAED,IAAI,MAAM,YAET;IAED,IAAI,MAAM,CAAC,CAAC,SAAA,EAEX;gBAEW,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW;IAuBzE,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAKxC,cAAc,CAAC,UAAU,EAAE,IAAI;IAI/B,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW;IAarD,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAYvD,MAAM,CAAC,UAAU,EAAE,IAAI;IAIvB,UAAU;IAIV,OAAO,CAAC,SAAS;IAMjB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAKvC,SAAS,CAAC,OAAO,EAAE,MAAM;IAWzB,YAAY,CACR,EAAE,EAAE,iBAAiB,CAAC,CAAC,CAAC,EACxB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,EACzE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,EACrE,YAAY,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM;IAqB1E,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAaxC"} \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js index 2d6af7da02..9f2c739464 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js @@ -29,7 +29,7 @@ export function copy(a, out) { out[1] = a[1]; } const delta = [0, 0]; -function elementComputeBounds(element, cache) { +function elementComputeBounds(scale, element, cache) { if (cache && cache.has(element)) { return cache.get(element); } @@ -38,22 +38,22 @@ function elementComputeBounds(element, cache) { if (boundingRect.width * boundingRect.height === 0 || styles.display === "none") { return null; } - const sMarginTop = parseFloat(styles.marginTop); - const sMarginRight = parseFloat(styles.marginRight); - const sMarginBottom = parseFloat(styles.marginBottom); - const sMarginLeft = parseFloat(styles.marginLeft); - const sPaddingTop = parseFloat(styles.paddingTop); - const sPaddingRight = parseFloat(styles.paddingRight); - const sPaddingBottom = parseFloat(styles.paddingBottom); - const sPaddingLeft = parseFloat(styles.paddingLeft); - const sBorderTop = parseFloat(styles.borderTopWidth); - const sBorderRight = parseFloat(styles.borderRightWidth); - const sBorderBottom = parseFloat(styles.borderBottomWidth); - const sBorderLeft = parseFloat(styles.borderLeftWidth); - const borderLeft = boundingRect.x; - const borderTop = boundingRect.y; - const borderWidth = boundingRect.width; - const borderHeight = boundingRect.height; + const sMarginTop = parseFloat(styles.marginTop) * scale; + const sMarginRight = parseFloat(styles.marginRight) * scale; + const sMarginBottom = parseFloat(styles.marginBottom) * scale; + const sMarginLeft = parseFloat(styles.marginLeft) * scale; + const sPaddingTop = parseFloat(styles.paddingTop) * scale; + const sPaddingRight = parseFloat(styles.paddingRight) * scale; + const sPaddingBottom = parseFloat(styles.paddingBottom) * scale; + const sPaddingLeft = parseFloat(styles.paddingLeft) * scale; + const sBorderTop = parseFloat(styles.borderTopWidth) * scale; + const sBorderRight = parseFloat(styles.borderRightWidth) * scale; + const sBorderBottom = parseFloat(styles.borderBottomWidth) * scale; + const sBorderLeft = parseFloat(styles.borderLeftWidth) * scale; + const borderLeft = boundingRect.x * scale; + const borderTop = boundingRect.y * scale; + const borderWidth = boundingRect.width * scale; + const borderHeight = boundingRect.height * scale; const borderRight = borderLeft + borderWidth; const borderBottom = borderTop + borderHeight; const marginLeft = borderLeft - sMarginLeft; @@ -140,6 +140,7 @@ export class ForceDirectedNode extends GraphNode { this._pinned = false; this.bounds = null; this.depth = -1; + this.hidden = false; this.pinner = document.createElement("button"); this.pinner.type = "button"; this.pinner.innerHTML = unpinned; @@ -162,8 +163,8 @@ export class ForceDirectedNode extends GraphNode { setMouseOffset(mousePoint) { sub(mousePoint, this.position, this.mouseOffset); } - computeBounds(boundsCache) { - this.bounds = elementComputeBounds(this.element, boundsCache); + computeBounds(scale, boundsCache) { + this.bounds = elementComputeBounds(scale, this.element, boundsCache); if (this.bounds) { const b = this.bounds.padding; this.hw = b.width / 2; @@ -176,9 +177,8 @@ export class ForceDirectedNode extends GraphNode { } updatePosition(cx, cy, maxDepth) { const { position, element } = this; - element.style.display = maxDepth < 0 || this.depth <= maxDepth ? "" : "none"; + element.style.display = this.isVisible(maxDepth) ? "" : "none"; if (this.canDrawArrow(maxDepth)) { - element.style.display = ""; element.style.left = `${position[0] - this.hw + cx}px`; element.style.top = `${position[1] - this.hh + cy}px`; element.style.opacity = maxDepth < 0 || this.depth < maxDepth @@ -192,11 +192,15 @@ export class ForceDirectedNode extends GraphNode { resetForce() { zero(this.dynamicForce); } - canDrawArrow(maxDepth) { - return this.bounds + isVisible(maxDepth) { + return !this.hidden && (maxDepth < 0 || this.depth <= maxDepth); } + canDrawArrow(maxDepth) { + return this.bounds + && this.isVisible(maxDepth); + } gravitate(gravity) { // Get displacement from center scale(-1, this.position, delta); diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js.map b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js.map index f1e1a79d6d..984ad0a743 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js.map +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/dist/ForceDirectedGraph/ForceDirectedNode.js.map @@ -1 +1 @@ -{"version":3,"file":"ForceDirectedNode.js","sourceRoot":"","sources":["../../src/ForceDirectedGraph/ForceDirectedNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE,MAAM,UAAU,MAAM,CAAC,MAAqB,EAAE,CAAU;IACpD,IAAI,CAAS,CAAC;IACd,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC5B,CAAC,GAAG,MAAM,CAAC;KACd;SACI;QACD,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAA;KAClB;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO,EAAE,GAAS;IAC3C,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO,EAAE,GAAS;IAC3C,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,CAAO;IACxB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,KAAK,C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EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;YAClC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;SACpD;IACL,CAAC;IAED,KAAK,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;QACjC,qBAAqB;QACrB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,GAAG,GAAG,CAAC,EAAE;YACT,yCAAyC;YACzC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;YACjC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAE/C,kBAAkB;YAClB,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxD;IACL,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"ForceDirectedNode.js","sourceRoot":"","sources":["../../src/ForceDirectedGraph/ForceDirectedNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAMpE,MAAM,UAAU,MAAM,CAAC,MAAqB,EAAE,CAAU;IACpD,IAAI,CAAS,CAAC;IACd,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC5B,CAAC,GAAG,MAAM,CAAC;KACd;SACI;QACD,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAA;KAClB;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAO,EAAE,CAAO,EAAE,GAAS;IA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AM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,IAAI,GAAG,GAAG,CAAC,EAAE;YACT,yCAAyC;YACzC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;YACjC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;YAE/C,kBAAkB;YAClB,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxD;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedGraph.ts b/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedGraph.ts index d9b290cb3d..09808dc9ab 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedGraph.ts +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedGraph.ts @@ -1,7 +1,7 @@ import { arrayRandom, arrayRemove, compareBy } from "@juniper-lib/collections/src/arrays"; import { debounce } from "@juniper-lib/events/src/debounce"; import { Tau } from "@juniper-lib/tslib/dist/math"; -import { ForceDirectedNode, IFullBounds, Vec2, Vec2WithLen, copy, length, scale, sub, zero } from "./ForceDirectedNode"; +import { ForceDirectedNode, IFullBounds, Vec2, Vec2WithLen, add, copy, length, scale, sub, zero } from "./ForceDirectedNode"; function distinct(arr: T[]) { @@ -10,6 +10,8 @@ function distinct(arr: T[]) { const delta: Vec2 = [0, 0]; +type GraphMode = "directed" | "reverse-directed" | "undirected"; + function findIntersection(sx: number, sy: number, ex: number, ey: number, bounds: IFullBounds): Vec2WithLen { const dx = ex - sx; const dy = ey - sy; @@ -133,6 +135,8 @@ export class ForceDirectedGraph { this.resize(); } + private mid: Vec2 = [0, 0]; + constructor( private readonly container: HTMLElement, private readonly getWeightMod: (connected: boolean, dist: number, a: T, b: T) => number, @@ -143,7 +147,24 @@ export class ForceDirectedGraph { this.container.classList.add("force-directed-graph"); this.container.addEventListener("wheel", evt => { + this.setMouse(evt); + copy(this.mousePoint, delta); + sub(delta, this.displayCenter, delta); + scale(this.scale, delta, delta); + const start = Array.from(delta) as Vec2; + this.scale -= 0.001 * evt.deltaY; + + this.setMouse(evt); + copy(this.mousePoint, delta); + sub(delta, this.displayCenter, delta); + scale(this.scale, delta, delta); + const end = Array.from(delta) as Vec2; + + sub(end, start, delta); + scale(1 / this.scale, delta, delta); + + add(this.displayCenter, delta, this.displayCenter); }); this.container.addEventListener("mousedown", evt => { @@ -220,6 +241,9 @@ export class ForceDirectedGraph { this.content.style.transform = `scale(${this.scale})`; this.connectorsCanvas.width = this.w * devicePixelRatio * this.scale; this.connectorsCanvas.height = this.h * devicePixelRatio * this.scale; + this.mid[0] = this.w; + this.mid[1] = this.h; + scale(0.5, this.mid, this.mid); }); const resizer = new ResizeObserver((evts) => { @@ -252,6 +276,63 @@ export class ForceDirectedGraph { } } + showCycles(show: boolean, strict: boolean) { + if (show) { + const wasVisitedBy = new Map, Set>>(); + for (const node of this.graph.values()) { + wasVisitedBy.set(node, new Set()); + } + + for (const node of this.graph.values()) { + const visited = new Set>();; + const notVisited = (node: ForceDirectedNode) => !visited.has(node); + const queue = [...node.connections]; + if (!strict && node.reverseConnections.length > 0) { + queue.push(...node.reverseConnections); + } + while (queue.length > 0) { + const here = queue.shift(); + if (!visited.has(here)) { + visited.add(here); + wasVisitedBy.get(here).add(node); + const next = here.connections.filter(notVisited); + if (!strict) { + const reverse = here.reverseConnections.filter(notVisited); + if (reverse.length > 0) { + next.push(...reverse); + } + } + + if (next.length > 0) { + queue.push(...next); + } + } + } + } + + for (const node of this.graph.values()) { + const visitors = wasVisitedBy.get(node); + if (visitors.has(node)) { + for (const n of visitors) { + n.element.classList.add("cycled"); + } + } + } + + for (const node of this.graph.values()) { + if (!node.element.classList.contains("cycled")) { + node.hidden = true; + } + } + } + else { + for (const node of this.graph.values()) { + node.element.classList.remove("cycled"); + node.hidden = false; + } + } + } + get values() { return this.data; } @@ -279,7 +360,7 @@ export class ForceDirectedGraph { this.graph.set(value, node); this.elementToNode.set(node.element, node); this.content.append(node.element); - node.computeBounds(this.boundsCache); + node.computeBounds(1 / this.scale, this.boundsCache); } } @@ -288,11 +369,18 @@ export class ForceDirectedGraph { } } - connect(connections: [T, T][]) { + connect(connections: [T, T][], mode: GraphMode = "directed") { for (const [fromValue, toValue] of connections) { const fromNode = this.graph.get(fromValue); const toNode = this.graph.get(toValue); - fromNode.connectTo(toNode); + + if (mode === "directed" || mode === "undirected") { + fromNode.connectTo(toNode); + } + + if (mode === "reverse-directed" || mode === "undirected") { + toNode.connectTo(fromNode); + } } @@ -521,10 +609,10 @@ export class ForceDirectedGraph { const c5 = 2; const k = c0 * Math.sqrt(c1 * area / this.displayCount); // Running this twice prevents oscillations from becoming visible. - for (let i = 0; i < 2; ++i) { - this.applyForces( - (connected, len) => connected ? c2 * Math.pow(len, c3) / k : 0, - (_, len) => c4 * Math.pow(k, c5) / len); - } + //for (let i = 0; i < 2; ++i) { + this.applyForces( + (connected, len) => connected ? c2 * Math.pow(len, c3) / k : 0, + (_, len) => c4 * Math.pow(k, c5) / len); + //} } } diff --git a/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedNode.ts b/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedNode.ts index 245874cb88..c8c42d3ae7 100644 --- a/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedNode.ts +++ b/src/Juniper.TypeScript/@juniper-lib/widgets/src/ForceDirectedGraph/ForceDirectedNode.ts @@ -60,7 +60,7 @@ export interface IFullBounds { type BoundsCache = Map; -function elementComputeBounds(element: Element, cache?: BoundsCache): IFullBounds { +function elementComputeBounds(scale: number, element: Element, cache?: BoundsCache): IFullBounds { if (cache && cache.has(element)) { return cache.get(element); } @@ -71,23 +71,23 @@ function elementComputeBounds(element: Element, cache?: BoundsCache): IFullBound return null; } - const sMarginTop = parseFloat(styles.marginTop); - const sMarginRight = parseFloat(styles.marginRight); - const sMarginBottom = parseFloat(styles.marginBottom); - const sMarginLeft = parseFloat(styles.marginLeft); - const sPaddingTop = parseFloat(styles.paddingTop); - const sPaddingRight = parseFloat(styles.paddingRight); - const sPaddingBottom = parseFloat(styles.paddingBottom); - const sPaddingLeft = parseFloat(styles.paddingLeft); - const sBorderTop = parseFloat(styles.borderTopWidth); - const sBorderRight = parseFloat(styles.borderRightWidth); - const sBorderBottom = parseFloat(styles.borderBottomWidth); - const sBorderLeft = parseFloat(styles.borderLeftWidth); - - const borderLeft = boundingRect.x; - const borderTop = boundingRect.y; - const borderWidth = boundingRect.width; - const borderHeight = boundingRect.height; + const sMarginTop = parseFloat(styles.marginTop) * scale; + const sMarginRight = parseFloat(styles.marginRight) * scale; + const sMarginBottom = parseFloat(styles.marginBottom) * scale; + const sMarginLeft = parseFloat(styles.marginLeft) * scale; + const sPaddingTop = parseFloat(styles.paddingTop) * scale; + const sPaddingRight = parseFloat(styles.paddingRight) * scale; + const sPaddingBottom = parseFloat(styles.paddingBottom) * scale; + const sPaddingLeft = parseFloat(styles.paddingLeft) * scale; + const sBorderTop = parseFloat(styles.borderTopWidth) * scale; + const sBorderRight = parseFloat(styles.borderRightWidth) * scale; + const sBorderBottom = parseFloat(styles.borderBottomWidth) * scale; + const sBorderLeft = parseFloat(styles.borderLeftWidth) * scale; + + const borderLeft = boundingRect.x * scale; + const borderTop = boundingRect.y * scale; + const borderWidth = boundingRect.width * scale; + const borderHeight = boundingRect.height * scale; const borderRight = borderLeft + borderWidth; const borderBottom = borderTop + borderHeight; @@ -174,6 +174,7 @@ export class ForceDirectedNode extends GraphNode { public bounds: IFullBounds = null; public depth = -1; + public hidden = false; get pinned() { return this._pinned; @@ -224,8 +225,8 @@ export class ForceDirectedNode extends GraphNode { sub(mousePoint, this.position, this.mouseOffset); } - computeBounds(boundsCache: BoundsCache) { - this.bounds = elementComputeBounds(this.element, boundsCache); + computeBounds(scale: number, boundsCache: BoundsCache) { + this.bounds = elementComputeBounds(scale, this.element, boundsCache); if (this.bounds) { const b = this.bounds.padding; this.hw = b.width / 2; @@ -239,9 +240,8 @@ export class ForceDirectedNode extends GraphNode { updatePosition(cx: number, cy: number, maxDepth: number) { const { position, element } = this; - element.style.display = maxDepth < 0 || this.depth <= maxDepth ? "" : "none"; + element.style.display = this.isVisible(maxDepth) ? "" : "none"; if (this.canDrawArrow(maxDepth)) { - element.style.display = ""; element.style.left = `${position[0] - this.hw + cx}px`; element.style.top = `${position[1] - this.hh + cy}px`; element.style.opacity = maxDepth < 0 || this.depth < maxDepth @@ -258,12 +258,17 @@ export class ForceDirectedNode extends GraphNode { zero(this.dynamicForce); } - canDrawArrow(maxDepth: number): boolean { - return this.bounds + private isVisible(maxDepth: number) { + return !this.hidden && (maxDepth < 0 || this.depth <= maxDepth); } + canDrawArrow(maxDepth: number): boolean { + return this.bounds + && this.isVisible(maxDepth); + } + gravitate(gravity: number) { // Get displacement from center scale(-1, this.position, delta); diff --git a/src/Juniper.Root/Units/Acceleration/FeetPerSecondSquared.cs b/src/Juniper.Units/Acceleration/FeetPerSecondSquared.cs similarity index 100% rename from src/Juniper.Root/Units/Acceleration/FeetPerSecondSquared.cs rename to src/Juniper.Units/Acceleration/FeetPerSecondSquared.cs diff --git a/src/Juniper.Root/Units/Acceleration/MetersPerSecondSquared.cs b/src/Juniper.Units/Acceleration/MetersPerSecondSquared.cs similarity index 100% rename from src/Juniper.Root/Units/Acceleration/MetersPerSecondSquared.cs rename to src/Juniper.Units/Acceleration/MetersPerSecondSquared.cs diff --git a/src/Juniper.Root/Units/Angles/Angle.cs b/src/Juniper.Units/Angles/Angle.cs similarity index 100% rename from src/Juniper.Root/Units/Angles/Angle.cs rename to src/Juniper.Units/Angles/Angle.cs diff --git a/src/Juniper.Root/Units/Angles/Degrees.cs b/src/Juniper.Units/Angles/Degrees.cs similarity index 100% rename from src/Juniper.Root/Units/Angles/Degrees.cs rename to src/Juniper.Units/Angles/Degrees.cs diff --git a/src/Juniper.Root/Units/Angles/Gradians.cs b/src/Juniper.Units/Angles/Gradians.cs similarity index 100% rename from src/Juniper.Root/Units/Angles/Gradians.cs rename to src/Juniper.Units/Angles/Gradians.cs diff --git a/src/Juniper.Root/Units/Angles/Radians.cs b/src/Juniper.Units/Angles/Radians.cs similarity index 100% rename from src/Juniper.Root/Units/Angles/Radians.cs rename to src/Juniper.Units/Angles/Radians.cs diff --git a/src/Juniper.Root/Units/Area/Acres.cs b/src/Juniper.Units/Area/Acres.cs similarity index 100% rename from src/Juniper.Root/Units/Area/Acres.cs rename to src/Juniper.Units/Area/Acres.cs diff --git a/src/Juniper.Root/Units/Area/SquareCentimeters.cs b/src/Juniper.Units/Area/SquareCentimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareCentimeters.cs rename to src/Juniper.Units/Area/SquareCentimeters.cs diff --git a/src/Juniper.Root/Units/Area/SquareFeet.cs b/src/Juniper.Units/Area/SquareFeet.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareFeet.cs rename to src/Juniper.Units/Area/SquareFeet.cs diff --git a/src/Juniper.Root/Units/Area/SquareInches.cs b/src/Juniper.Units/Area/SquareInches.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareInches.cs rename to src/Juniper.Units/Area/SquareInches.cs diff --git a/src/Juniper.Root/Units/Area/SquareKilometers.cs b/src/Juniper.Units/Area/SquareKilometers.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareKilometers.cs rename to src/Juniper.Units/Area/SquareKilometers.cs diff --git a/src/Juniper.Root/Units/Area/SquareMeters.cs b/src/Juniper.Units/Area/SquareMeters.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareMeters.cs rename to src/Juniper.Units/Area/SquareMeters.cs diff --git a/src/Juniper.Root/Units/Area/SquareMicrometers.cs b/src/Juniper.Units/Area/SquareMicrometers.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareMicrometers.cs rename to src/Juniper.Units/Area/SquareMicrometers.cs diff --git a/src/Juniper.Root/Units/Area/SquareMiles.cs b/src/Juniper.Units/Area/SquareMiles.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareMiles.cs rename to src/Juniper.Units/Area/SquareMiles.cs diff --git a/src/Juniper.Root/Units/Area/SquareMillimeters.cs b/src/Juniper.Units/Area/SquareMillimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareMillimeters.cs rename to src/Juniper.Units/Area/SquareMillimeters.cs diff --git a/src/Juniper.Root/Units/Area/SquareRods.cs b/src/Juniper.Units/Area/SquareRods.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareRods.cs rename to src/Juniper.Units/Area/SquareRods.cs diff --git a/src/Juniper.Root/Units/Area/SquareYards.cs b/src/Juniper.Units/Area/SquareYards.cs similarity index 100% rename from src/Juniper.Root/Units/Area/SquareYards.cs rename to src/Juniper.Units/Area/SquareYards.cs diff --git a/src/Juniper.Root/Units/Bandwidth/BitsPerSecond.cs b/src/Juniper.Units/Bandwidth/BitsPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/BitsPerSecond.cs rename to src/Juniper.Units/Bandwidth/BitsPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/BytesPerSecond.cs b/src/Juniper.Units/Bandwidth/BytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/BytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/BytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/ExabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/ExabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/ExabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/ExabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/ExbibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/ExbibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/ExbibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/ExbibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/GibibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/GibibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/GibibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/GibibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/GigabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/GigabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/GigabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/GigabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/KibibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/KibibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/KibibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/KibibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/KilobytesPerSecond.cs b/src/Juniper.Units/Bandwidth/KilobytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/KilobytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/KilobytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/MegabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/MegabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/MegabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/MegabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/MibibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/MibibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/MibibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/MibibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/PebibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/PebibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/PebibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/PebibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/PetabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/PetabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/PetabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/PetabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/TebibytePerSecond.cs b/src/Juniper.Units/Bandwidth/TebibytePerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/TebibytePerSecond.cs rename to src/Juniper.Units/Bandwidth/TebibytePerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/TerabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/TerabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/TerabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/TerabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/YobibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/YobibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/YobibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/YobibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/YotabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/YotabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/YotabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/YotabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/ZebibytesPerSecond.cs b/src/Juniper.Units/Bandwidth/ZebibytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/ZebibytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/ZebibytesPerSecond.cs diff --git a/src/Juniper.Root/Units/Bandwidth/ZettabytesPerSecond.cs b/src/Juniper.Units/Bandwidth/ZettabytesPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Bandwidth/ZettabytesPerSecond.cs rename to src/Juniper.Units/Bandwidth/ZettabytesPerSecond.cs diff --git a/src/Juniper.Root/Units/CartesianAxis.cs b/src/Juniper.Units/CartesianAxis.cs similarity index 100% rename from src/Juniper.Root/Units/CartesianAxis.cs rename to src/Juniper.Units/CartesianAxis.cs diff --git a/src/Juniper.Root/Units/CartesianAxisFlags.cs b/src/Juniper.Units/CartesianAxisFlags.cs similarity index 100% rename from src/Juniper.Root/Units/CartesianAxisFlags.cs rename to src/Juniper.Units/CartesianAxisFlags.cs diff --git a/src/Juniper.Root/Units/Category.cs b/src/Juniper.Units/Category.cs similarity index 100% rename from src/Juniper.Root/Units/Category.cs rename to src/Juniper.Units/Category.cs diff --git a/src/Juniper.Root/Color3.cs b/src/Juniper.Units/Color3.cs similarity index 100% rename from src/Juniper.Root/Color3.cs rename to src/Juniper.Units/Color3.cs diff --git a/src/Juniper.Root/ColorSpace.cs b/src/Juniper.Units/ColorSpace.cs similarity index 100% rename from src/Juniper.Root/ColorSpace.cs rename to src/Juniper.Units/ColorSpace.cs diff --git a/src/Juniper.Root/Units/Converter.cs b/src/Juniper.Units/Converter.cs similarity index 99% rename from src/Juniper.Root/Units/Converter.cs rename to src/Juniper.Units/Converter.cs index 6f15c5ce13..90137db5c3 100644 --- a/src/Juniper.Root/Units/Converter.cs +++ b/src/Juniper.Units/Converter.cs @@ -2400,7 +2400,7 @@ public static Vector4 Convert(this Vector4 value, UnitOfMeasure fromUnit, System /// public static string Abbreviate(this UnitOfMeasure unit) { - return Abbreviations.TryGetValue(unit, out string? value) + return Abbreviations.TryGetValue(unit, out var value) ? value! : string.Empty; } diff --git a/src/Juniper.Root/Units/FileSize.cs b/src/Juniper.Units/FileSize.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize.cs rename to src/Juniper.Units/FileSize.cs diff --git a/src/Juniper.Root/Units/FileSize/Bits.cs b/src/Juniper.Units/FileSize/Bits.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Bits.cs rename to src/Juniper.Units/FileSize/Bits.cs diff --git a/src/Juniper.Root/Units/FileSize/Bytes.cs b/src/Juniper.Units/FileSize/Bytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Bytes.cs rename to src/Juniper.Units/FileSize/Bytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Exabytes.cs b/src/Juniper.Units/FileSize/Exabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Exabytes.cs rename to src/Juniper.Units/FileSize/Exabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Exbibytes.cs b/src/Juniper.Units/FileSize/Exbibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Exbibytes.cs rename to src/Juniper.Units/FileSize/Exbibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Gibibytes.cs b/src/Juniper.Units/FileSize/Gibibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Gibibytes.cs rename to src/Juniper.Units/FileSize/Gibibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Gigabytes.cs b/src/Juniper.Units/FileSize/Gigabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Gigabytes.cs rename to src/Juniper.Units/FileSize/Gigabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Kibibytes.cs b/src/Juniper.Units/FileSize/Kibibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Kibibytes.cs rename to src/Juniper.Units/FileSize/Kibibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Kilobytes.cs b/src/Juniper.Units/FileSize/Kilobytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Kilobytes.cs rename to src/Juniper.Units/FileSize/Kilobytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Megabytes.cs b/src/Juniper.Units/FileSize/Megabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Megabytes.cs rename to src/Juniper.Units/FileSize/Megabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Mibibytes.cs b/src/Juniper.Units/FileSize/Mibibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Mibibytes.cs rename to src/Juniper.Units/FileSize/Mibibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Pebibytes.cs b/src/Juniper.Units/FileSize/Pebibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Pebibytes.cs rename to src/Juniper.Units/FileSize/Pebibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Petabytes.cs b/src/Juniper.Units/FileSize/Petabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Petabytes.cs rename to src/Juniper.Units/FileSize/Petabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Tebibytes.cs b/src/Juniper.Units/FileSize/Tebibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Tebibytes.cs rename to src/Juniper.Units/FileSize/Tebibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Terabytes.cs b/src/Juniper.Units/FileSize/Terabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Terabytes.cs rename to src/Juniper.Units/FileSize/Terabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Yobibytes.cs b/src/Juniper.Units/FileSize/Yobibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Yobibytes.cs rename to src/Juniper.Units/FileSize/Yobibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Yotabytes.cs b/src/Juniper.Units/FileSize/Yotabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Yotabytes.cs rename to src/Juniper.Units/FileSize/Yotabytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Zebibytes.cs b/src/Juniper.Units/FileSize/Zebibytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Zebibytes.cs rename to src/Juniper.Units/FileSize/Zebibytes.cs diff --git a/src/Juniper.Root/Units/FileSize/Zettabytes.cs b/src/Juniper.Units/FileSize/Zettabytes.cs similarity index 100% rename from src/Juniper.Root/Units/FileSize/Zettabytes.cs rename to src/Juniper.Units/FileSize/Zettabytes.cs diff --git a/src/Juniper.Root/Units/Frequency/Hertz.cs b/src/Juniper.Units/Frequency/Hertz.cs similarity index 100% rename from src/Juniper.Root/Units/Frequency/Hertz.cs rename to src/Juniper.Units/Frequency/Hertz.cs diff --git a/src/Juniper.Units/IDictionaryExt.cs b/src/Juniper.Units/IDictionaryExt.cs new file mode 100644 index 0000000000..6241955fa3 --- /dev/null +++ b/src/Juniper.Units/IDictionaryExt.cs @@ -0,0 +1,31 @@ +#nullable enable + +using System.Net; + +using Juniper; + +namespace System.Collections.Generic; + +/// +/// Extension methods for System.Collections.Generic.Dictionary{TKey, TValue} +/// +public static class IDictionaryExt +{ + public static bool TryGetSize(this IDictionary dict, string key, out Size? v) + { + if (dict is null) + { + throw new ArgumentNullException(nameof(dict)); + } + + if (!dict.ContainsKey(key)) + { + v = null; + return false; + } + else + { + return Size.TryParse(dict[key], out v); + } + } +} \ No newline at end of file diff --git a/src/Juniper.Units/Juniper.Units.csproj b/src/Juniper.Units/Juniper.Units.csproj new file mode 100644 index 0000000000..0bf9277be2 --- /dev/null +++ b/src/Juniper.Units/Juniper.Units.csproj @@ -0,0 +1,37 @@ + + + + Juniper.Units + Juniper.Units + SeanMcBeth.Juniper.Units + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + diff --git a/src/Juniper.Root/Units/Length/Centimeters.cs b/src/Juniper.Units/Length/Centimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Centimeters.cs rename to src/Juniper.Units/Length/Centimeters.cs diff --git a/src/Juniper.Root/Units/Length/Feet.cs b/src/Juniper.Units/Length/Feet.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Feet.cs rename to src/Juniper.Units/Length/Feet.cs diff --git a/src/Juniper.Root/Units/Length/Furlongs.cs b/src/Juniper.Units/Length/Furlongs.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Furlongs.cs rename to src/Juniper.Units/Length/Furlongs.cs diff --git a/src/Juniper.Root/Units/Length/Inches.cs b/src/Juniper.Units/Length/Inches.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Inches.cs rename to src/Juniper.Units/Length/Inches.cs diff --git a/src/Juniper.Root/Units/Length/Kilometers.cs b/src/Juniper.Units/Length/Kilometers.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Kilometers.cs rename to src/Juniper.Units/Length/Kilometers.cs diff --git a/src/Juniper.Root/Units/Length/Meters.cs b/src/Juniper.Units/Length/Meters.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Meters.cs rename to src/Juniper.Units/Length/Meters.cs diff --git a/src/Juniper.Root/Units/Length/Micrometers.cs b/src/Juniper.Units/Length/Micrometers.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Micrometers.cs rename to src/Juniper.Units/Length/Micrometers.cs diff --git a/src/Juniper.Root/Units/Length/Miles.cs b/src/Juniper.Units/Length/Miles.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Miles.cs rename to src/Juniper.Units/Length/Miles.cs diff --git a/src/Juniper.Root/Units/Length/Millimeters.cs b/src/Juniper.Units/Length/Millimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Millimeters.cs rename to src/Juniper.Units/Length/Millimeters.cs diff --git a/src/Juniper.Root/Units/Length/Rods.cs b/src/Juniper.Units/Length/Rods.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Rods.cs rename to src/Juniper.Units/Length/Rods.cs diff --git a/src/Juniper.Root/Units/Length/Yards.cs b/src/Juniper.Units/Length/Yards.cs similarity index 100% rename from src/Juniper.Root/Units/Length/Yards.cs rename to src/Juniper.Units/Length/Yards.cs diff --git a/src/Juniper.Root/Units/Level.cs b/src/Juniper.Units/Level.cs similarity index 100% rename from src/Juniper.Root/Units/Level.cs rename to src/Juniper.Units/Level.cs diff --git a/src/Juniper.Root/Units/Light/Brightness.cs b/src/Juniper.Units/Light/Brightness.cs similarity index 100% rename from src/Juniper.Root/Units/Light/Brightness.cs rename to src/Juniper.Units/Light/Brightness.cs diff --git a/src/Juniper.Root/Units/Light/Lumens.cs b/src/Juniper.Units/Light/Lumens.cs similarity index 100% rename from src/Juniper.Root/Units/Light/Lumens.cs rename to src/Juniper.Units/Light/Lumens.cs diff --git a/src/Juniper.Root/Units/Light/Nits.cs b/src/Juniper.Units/Light/Nits.cs similarity index 100% rename from src/Juniper.Root/Units/Light/Nits.cs rename to src/Juniper.Units/Light/Nits.cs diff --git a/src/Juniper.Root/Units/Mass/Grams.cs b/src/Juniper.Units/Mass/Grams.cs similarity index 100% rename from src/Juniper.Root/Units/Mass/Grams.cs rename to src/Juniper.Units/Mass/Grams.cs diff --git a/src/Juniper.Root/Units/Mass/Kilograms.cs b/src/Juniper.Units/Mass/Kilograms.cs similarity index 100% rename from src/Juniper.Root/Units/Mass/Kilograms.cs rename to src/Juniper.Units/Mass/Kilograms.cs diff --git a/src/Juniper.Root/Units/Mass/Ounces.cs b/src/Juniper.Units/Mass/Ounces.cs similarity index 100% rename from src/Juniper.Root/Units/Mass/Ounces.cs rename to src/Juniper.Units/Mass/Ounces.cs diff --git a/src/Juniper.Root/Units/Mass/Pounds.cs b/src/Juniper.Units/Mass/Pounds.cs similarity index 100% rename from src/Juniper.Root/Units/Mass/Pounds.cs rename to src/Juniper.Units/Mass/Pounds.cs diff --git a/src/Juniper.Root/Units/Mass/Tons.cs b/src/Juniper.Units/Mass/Tons.cs similarity index 100% rename from src/Juniper.Root/Units/Mass/Tons.cs rename to src/Juniper.Units/Mass/Tons.cs diff --git a/src/Juniper.Root/Units/Pressure/Hectopascals.cs b/src/Juniper.Units/Pressure/Hectopascals.cs similarity index 100% rename from src/Juniper.Root/Units/Pressure/Hectopascals.cs rename to src/Juniper.Units/Pressure/Hectopascals.cs diff --git a/src/Juniper.Root/Units/Pressure/Kilopascals.cs b/src/Juniper.Units/Pressure/Kilopascals.cs similarity index 100% rename from src/Juniper.Root/Units/Pressure/Kilopascals.cs rename to src/Juniper.Units/Pressure/Kilopascals.cs diff --git a/src/Juniper.Root/Units/Pressure/Millibars.cs b/src/Juniper.Units/Pressure/Millibars.cs similarity index 100% rename from src/Juniper.Root/Units/Pressure/Millibars.cs rename to src/Juniper.Units/Pressure/Millibars.cs diff --git a/src/Juniper.Root/Units/Pressure/Pascals.cs b/src/Juniper.Units/Pressure/Pascals.cs similarity index 100% rename from src/Juniper.Root/Units/Pressure/Pascals.cs rename to src/Juniper.Units/Pressure/Pascals.cs diff --git a/src/Juniper.Root/Units/Pressure/PoundsPerSquareInch.cs b/src/Juniper.Units/Pressure/PoundsPerSquareInch.cs similarity index 100% rename from src/Juniper.Root/Units/Pressure/PoundsPerSquareInch.cs rename to src/Juniper.Units/Pressure/PoundsPerSquareInch.cs diff --git a/src/Juniper.Root/Units/Proportion/Percent.cs b/src/Juniper.Units/Proportion/Percent.cs similarity index 100% rename from src/Juniper.Root/Units/Proportion/Percent.cs rename to src/Juniper.Units/Proportion/Percent.cs diff --git a/src/Juniper.Root/Units/Proportion/Proportion.cs b/src/Juniper.Units/Proportion/Proportion.cs similarity index 100% rename from src/Juniper.Root/Units/Proportion/Proportion.cs rename to src/Juniper.Units/Proportion/Proportion.cs diff --git a/src/Juniper.Root/Units/Proportion/Ratio.cs b/src/Juniper.Units/Proportion/Ratio.cs similarity index 100% rename from src/Juniper.Root/Units/Proportion/Ratio.cs rename to src/Juniper.Units/Proportion/Ratio.cs diff --git a/src/Juniper.Units/RandomExt.cs b/src/Juniper.Units/RandomExt.cs new file mode 100644 index 0000000000..87a6a4148a --- /dev/null +++ b/src/Juniper.Units/RandomExt.cs @@ -0,0 +1,19 @@ +using System.Numerics; + +namespace System; + +public static class RandomExt +{ + public static int Color(this Random rand) + { + if (rand is null) + { + throw new ArgumentNullException(nameof(rand)); + } + + var r = rand.Next(0, 256); + var g = rand.Next(0, 256); + var b = rand.Next(0, 256); + return (r << (2 * Juniper.Units.Bits.PER_BYTE)) | (g << Juniper.Units.Bits.PER_BYTE) | b; + } +} \ No newline at end of file diff --git a/src/Juniper.Root/Units/Speed/FeetPerSecond.cs b/src/Juniper.Units/Speed/FeetPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Speed/FeetPerSecond.cs rename to src/Juniper.Units/Speed/FeetPerSecond.cs diff --git a/src/Juniper.Root/Units/Speed/KilometersPerHour.cs b/src/Juniper.Units/Speed/KilometersPerHour.cs similarity index 100% rename from src/Juniper.Root/Units/Speed/KilometersPerHour.cs rename to src/Juniper.Units/Speed/KilometersPerHour.cs diff --git a/src/Juniper.Root/Units/Speed/MetersPerSecond.cs b/src/Juniper.Units/Speed/MetersPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Speed/MetersPerSecond.cs rename to src/Juniper.Units/Speed/MetersPerSecond.cs diff --git a/src/Juniper.Root/Units/Speed/MilesPerHour.cs b/src/Juniper.Units/Speed/MilesPerHour.cs similarity index 100% rename from src/Juniper.Root/Units/Speed/MilesPerHour.cs rename to src/Juniper.Units/Speed/MilesPerHour.cs diff --git a/src/Juniper.Root/Units/Speed/MillimetersPerSecond.cs b/src/Juniper.Units/Speed/MillimetersPerSecond.cs similarity index 100% rename from src/Juniper.Root/Units/Speed/MillimetersPerSecond.cs rename to src/Juniper.Units/Speed/MillimetersPerSecond.cs diff --git a/src/Juniper.Root/Units/SystemOfMeasure.cs b/src/Juniper.Units/SystemOfMeasure.cs similarity index 100% rename from src/Juniper.Root/Units/SystemOfMeasure.cs rename to src/Juniper.Units/SystemOfMeasure.cs diff --git a/src/Juniper.Root/Units/Temperature/Celsius.cs b/src/Juniper.Units/Temperature/Celsius.cs similarity index 100% rename from src/Juniper.Root/Units/Temperature/Celsius.cs rename to src/Juniper.Units/Temperature/Celsius.cs diff --git a/src/Juniper.Root/Units/Temperature/Farenheit.cs b/src/Juniper.Units/Temperature/Farenheit.cs similarity index 100% rename from src/Juniper.Root/Units/Temperature/Farenheit.cs rename to src/Juniper.Units/Temperature/Farenheit.cs diff --git a/src/Juniper.Root/Units/Temperature/Kelvin.cs b/src/Juniper.Units/Temperature/Kelvin.cs similarity index 100% rename from src/Juniper.Root/Units/Temperature/Kelvin.cs rename to src/Juniper.Units/Temperature/Kelvin.cs diff --git a/src/Juniper.Root/Units/Time/Days.cs b/src/Juniper.Units/Time/Days.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Days.cs rename to src/Juniper.Units/Time/Days.cs diff --git a/src/Juniper.Root/Units/Time/Hours.cs b/src/Juniper.Units/Time/Hours.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Hours.cs rename to src/Juniper.Units/Time/Hours.cs diff --git a/src/Juniper.Root/Units/Time/Microseconds.cs b/src/Juniper.Units/Time/Microseconds.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Microseconds.cs rename to src/Juniper.Units/Time/Microseconds.cs diff --git a/src/Juniper.Root/Units/Time/Milliseconds.cs b/src/Juniper.Units/Time/Milliseconds.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Milliseconds.cs rename to src/Juniper.Units/Time/Milliseconds.cs diff --git a/src/Juniper.Root/Units/Time/Minutes.cs b/src/Juniper.Units/Time/Minutes.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Minutes.cs rename to src/Juniper.Units/Time/Minutes.cs diff --git a/src/Juniper.Root/Units/Time/Nanoseconds.cs b/src/Juniper.Units/Time/Nanoseconds.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Nanoseconds.cs rename to src/Juniper.Units/Time/Nanoseconds.cs diff --git a/src/Juniper.Root/Units/Time/Seconds.cs b/src/Juniper.Units/Time/Seconds.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Seconds.cs rename to src/Juniper.Units/Time/Seconds.cs diff --git a/src/Juniper.Root/Units/Time/Ticks.cs b/src/Juniper.Units/Time/Ticks.cs similarity index 100% rename from src/Juniper.Root/Units/Time/Ticks.cs rename to src/Juniper.Units/Time/Ticks.cs diff --git a/src/Juniper.Root/NETFX/TimeSpanExt.cs b/src/Juniper.Units/TimeSpanExt.cs similarity index 100% rename from src/Juniper.Root/NETFX/TimeSpanExt.cs rename to src/Juniper.Units/TimeSpanExt.cs diff --git a/src/Juniper.Root/Units/Unary.cs b/src/Juniper.Units/Unary.cs similarity index 100% rename from src/Juniper.Root/Units/Unary.cs rename to src/Juniper.Units/Unary.cs diff --git a/src/Juniper.Root/Units/UnitOfMeasure.cs b/src/Juniper.Units/UnitOfMeasure.cs similarity index 100% rename from src/Juniper.Root/Units/UnitOfMeasure.cs rename to src/Juniper.Units/UnitOfMeasure.cs diff --git a/src/Juniper.Root/Units/Volume/CubicCentimeters.cs b/src/Juniper.Units/Volume/CubicCentimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicCentimeters.cs rename to src/Juniper.Units/Volume/CubicCentimeters.cs diff --git a/src/Juniper.Root/Units/Volume/CubicFeet.cs b/src/Juniper.Units/Volume/CubicFeet.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicFeet.cs rename to src/Juniper.Units/Volume/CubicFeet.cs diff --git a/src/Juniper.Root/Units/Volume/CubicInches.cs b/src/Juniper.Units/Volume/CubicInches.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicInches.cs rename to src/Juniper.Units/Volume/CubicInches.cs diff --git a/src/Juniper.Root/Units/Volume/CubicKilometers.cs b/src/Juniper.Units/Volume/CubicKilometers.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicKilometers.cs rename to src/Juniper.Units/Volume/CubicKilometers.cs diff --git a/src/Juniper.Root/Units/Volume/CubicMeters.cs b/src/Juniper.Units/Volume/CubicMeters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicMeters.cs rename to src/Juniper.Units/Volume/CubicMeters.cs diff --git a/src/Juniper.Root/Units/Volume/CubicMicrometers.cs b/src/Juniper.Units/Volume/CubicMicrometers.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicMicrometers.cs rename to src/Juniper.Units/Volume/CubicMicrometers.cs diff --git a/src/Juniper.Root/Units/Volume/CubicMiles.cs b/src/Juniper.Units/Volume/CubicMiles.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicMiles.cs rename to src/Juniper.Units/Volume/CubicMiles.cs diff --git a/src/Juniper.Root/Units/Volume/CubicMillimeters.cs b/src/Juniper.Units/Volume/CubicMillimeters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/CubicMillimeters.cs rename to src/Juniper.Units/Volume/CubicMillimeters.cs diff --git a/src/Juniper.Root/Units/Volume/Cups.cs b/src/Juniper.Units/Volume/Cups.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Cups.cs rename to src/Juniper.Units/Volume/Cups.cs diff --git a/src/Juniper.Root/Units/Volume/FluidDrams.cs b/src/Juniper.Units/Volume/FluidDrams.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/FluidDrams.cs rename to src/Juniper.Units/Volume/FluidDrams.cs diff --git a/src/Juniper.Root/Units/Volume/FluidOunces.cs b/src/Juniper.Units/Volume/FluidOunces.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/FluidOunces.cs rename to src/Juniper.Units/Volume/FluidOunces.cs diff --git a/src/Juniper.Root/Units/Volume/Gallons.cs b/src/Juniper.Units/Volume/Gallons.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Gallons.cs rename to src/Juniper.Units/Volume/Gallons.cs diff --git a/src/Juniper.Root/Units/Volume/Gills.cs b/src/Juniper.Units/Volume/Gills.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Gills.cs rename to src/Juniper.Units/Volume/Gills.cs diff --git a/src/Juniper.Root/Units/Volume/Kiloliters.cs b/src/Juniper.Units/Volume/Kiloliters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Kiloliters.cs rename to src/Juniper.Units/Volume/Kiloliters.cs diff --git a/src/Juniper.Root/Units/Volume/LiquidPints.cs b/src/Juniper.Units/Volume/LiquidPints.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/LiquidPints.cs rename to src/Juniper.Units/Volume/LiquidPints.cs diff --git a/src/Juniper.Root/Units/Volume/LiquidQuarts.cs b/src/Juniper.Units/Volume/LiquidQuarts.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/LiquidQuarts.cs rename to src/Juniper.Units/Volume/LiquidQuarts.cs diff --git a/src/Juniper.Root/Units/Volume/Liters.cs b/src/Juniper.Units/Volume/Liters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Liters.cs rename to src/Juniper.Units/Volume/Liters.cs diff --git a/src/Juniper.Root/Units/Volume/Milliliters.cs b/src/Juniper.Units/Volume/Milliliters.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Milliliters.cs rename to src/Juniper.Units/Volume/Milliliters.cs diff --git a/src/Juniper.Root/Units/Volume/Minims.cs b/src/Juniper.Units/Volume/Minims.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Minims.cs rename to src/Juniper.Units/Volume/Minims.cs diff --git a/src/Juniper.Root/Units/Volume/Tablespoons.cs b/src/Juniper.Units/Volume/Tablespoons.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Tablespoons.cs rename to src/Juniper.Units/Volume/Tablespoons.cs diff --git a/src/Juniper.Root/Units/Volume/Teaspoons.cs b/src/Juniper.Units/Volume/Teaspoons.cs similarity index 100% rename from src/Juniper.Root/Units/Volume/Teaspoons.cs rename to src/Juniper.Units/Volume/Teaspoons.cs diff --git a/src/Juniper.Root/World/Climate/IWeatherAPI.cs b/src/Juniper.World/Climate/IWeatherAPI.cs similarity index 100% rename from src/Juniper.Root/World/Climate/IWeatherAPI.cs rename to src/Juniper.World/Climate/IWeatherAPI.cs diff --git a/src/Juniper.Root/World/Climate/IWeatherReport.cs b/src/Juniper.World/Climate/IWeatherReport.cs similarity index 100% rename from src/Juniper.Root/World/Climate/IWeatherReport.cs rename to src/Juniper.World/Climate/IWeatherReport.cs diff --git a/src/Juniper.Root/World/GIS/Datum.cs b/src/Juniper.World/GIS/Datum.cs similarity index 100% rename from src/Juniper.Root/World/GIS/Datum.cs rename to src/Juniper.World/GIS/Datum.cs diff --git a/src/Juniper.Root/World/GIS/EquitorialSpherical.cs b/src/Juniper.World/GIS/EquitorialSpherical.cs similarity index 100% rename from src/Juniper.Root/World/GIS/EquitorialSpherical.cs rename to src/Juniper.World/GIS/EquitorialSpherical.cs diff --git a/src/Juniper.Root/World/GIS/EquitorialSphericalPosition.cs b/src/Juniper.World/GIS/EquitorialSphericalPosition.cs similarity index 100% rename from src/Juniper.Root/World/GIS/EquitorialSphericalPosition.cs rename to src/Juniper.World/GIS/EquitorialSphericalPosition.cs diff --git a/src/Juniper.Root/World/GIS/GeocentricEclipticSpherical.cs b/src/Juniper.World/GIS/GeocentricEclipticSpherical.cs similarity index 100% rename from src/Juniper.Root/World/GIS/GeocentricEclipticSpherical.cs rename to src/Juniper.World/GIS/GeocentricEclipticSpherical.cs diff --git a/src/Juniper.Root/World/GIS/GeocentricEclipticSphericalPosition.cs b/src/Juniper.World/GIS/GeocentricEclipticSphericalPosition.cs similarity index 100% rename from src/Juniper.Root/World/GIS/GeocentricEclipticSphericalPosition.cs rename to src/Juniper.World/GIS/GeocentricEclipticSphericalPosition.cs diff --git a/src/Juniper.Root/World/GIS/GlobeHemisphere.cs b/src/Juniper.World/GIS/GlobeHemisphere.cs similarity index 100% rename from src/Juniper.Root/World/GIS/GlobeHemisphere.cs rename to src/Juniper.World/GIS/GlobeHemisphere.cs diff --git a/src/Juniper.Root/World/GIS/HorizontalSphericalPosition.cs b/src/Juniper.World/GIS/HorizontalSphericalPosition.cs similarity index 100% rename from src/Juniper.Root/World/GIS/HorizontalSphericalPosition.cs rename to src/Juniper.World/GIS/HorizontalSphericalPosition.cs diff --git a/src/Juniper.Root/World/GIS/LatLng.cs b/src/Juniper.World/GIS/LatLng.cs similarity index 100% rename from src/Juniper.Root/World/GIS/LatLng.cs rename to src/Juniper.World/GIS/LatLng.cs diff --git a/src/Juniper.Root/World/GIS/LatLngPoint.cs b/src/Juniper.World/GIS/LatLngPoint.cs similarity index 100% rename from src/Juniper.Root/World/GIS/LatLngPoint.cs rename to src/Juniper.World/GIS/LatLngPoint.cs diff --git a/src/Juniper.Root/World/GIS/LatLngPointEventArgs.cs b/src/Juniper.World/GIS/LatLngPointEventArgs.cs similarity index 100% rename from src/Juniper.Root/World/GIS/LatLngPointEventArgs.cs rename to src/Juniper.World/GIS/LatLngPointEventArgs.cs diff --git a/src/Juniper.Root/World/GIS/UTM.cs b/src/Juniper.World/GIS/UTM.cs similarity index 100% rename from src/Juniper.Root/World/GIS/UTM.cs rename to src/Juniper.World/GIS/UTM.cs diff --git a/src/Juniper.Root/World/GIS/UTMPoint.cs b/src/Juniper.World/GIS/UTMPoint.cs similarity index 100% rename from src/Juniper.Root/World/GIS/UTMPoint.cs rename to src/Juniper.World/GIS/UTMPoint.cs diff --git a/src/Juniper.World/IDictionaryExt.cs b/src/Juniper.World/IDictionaryExt.cs new file mode 100644 index 0000000000..0f7d586ca8 --- /dev/null +++ b/src/Juniper.World/IDictionaryExt.cs @@ -0,0 +1,29 @@ +using Juniper.World.GIS; + +namespace System.Collections.Generic; + +/// +/// Extension methods for System.Collections.Generic.Dictionary{TKey, TValue} +/// +public static class IDictionaryExt +{ + + + public static bool TryGetLatLng(this IDictionary dict, string key, out LatLngPoint? v) + { + if (dict is null) + { + throw new ArgumentNullException(nameof(dict)); + } + + if (!dict.ContainsKey(key)) + { + v = null; + return false; + } + else + { + return LatLngPoint.TryParse(dict[key], out v); + } + } +} \ No newline at end of file diff --git a/src/Juniper.World/Juniper.World.csproj b/src/Juniper.World/Juniper.World.csproj new file mode 100644 index 0000000000..961e9aebe9 --- /dev/null +++ b/src/Juniper.World/Juniper.World.csproj @@ -0,0 +1,38 @@ + + + + Juniper.World + Juniper.World + SeanMcBeth.Juniper.World + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + + diff --git a/src/Juniper.World/NETFX/Numerics/MathExt.cs b/src/Juniper.World/NETFX/Numerics/MathExt.cs new file mode 100644 index 0000000000..895f072bc8 --- /dev/null +++ b/src/Juniper.World/NETFX/Numerics/MathExt.cs @@ -0,0 +1,119 @@ +using Juniper.Units; +using Juniper.World.GIS; + +namespace System.Numerics; + +public static class MathExt +{ + /// + /// Convert a Vector3 with a given UTM Zone to a + /// + /// The utm. + /// Value. + /// Donated zone. + public static UTMPoint ToUTM(this Vector3 v, int donatedZone, GlobeHemisphere hemisphere) + { + return new UTMPoint(v.X, v.Z, v.Y, donatedZone, hemisphere); + } + + /// + /// Convert a Vector3 with a given UTM Zone to a + /// + /// The utm. + /// Value. + /// Donated zone. + public static Vector3 ToSystemVector3(this UTMPoint v) + { + if (v is null) + { + throw new ArgumentNullException(nameof(v)); + } + + return new Vector3( + (float)v.Easting, + (float)v.Altitude, + (float)v.Northing); + } + + /// + /// Convert this UTMPoint to a Unity Vector3, projected to the screen using the provided matrix. + /// + /// + /// + /// + public static Vector3 ToScreen(this UTMPoint v, Matrix4x4 toScreen) + { + if (v is null) + { + throw new ArgumentNullException(nameof(v)); + } + + return Vector3.Transform(v.ToSystemVector3(), toScreen); + } + + /// + /// Converts this LatLngPoint to a UTM point that is stored as a Unity Vector3 object. + /// + /// + /// + public static Vector3 ToVector3(this LatLngPoint value) + { + return value.ToUTM().ToSystemVector3(); + } + + /// + /// Converts this LatLngPoint to an intermediate value roughly corresponding to feet that + /// maintains perpendicular and parallel line relationships. The spherical model of the Earth + /// that this function uses ruins it for distance calculations. + /// + /// + [Obsolete("This should really only ever be used when trying to match visuals to Google Maps.")] + public static Vector3 SphericalMercator(this LatLngPoint value) + { + if (value is null) + { + throw new ArgumentNullException(nameof(value)); + } + + var lat = Degrees.Radians(value.Lat); + var lng = Degrees.Radians(value.Lng); + var x = DatumWGS_84.equatorialRadius * lng; + var y = DatumWGS_84.equatorialRadius * Math.Log(Math.Tan((0.25 * Math.PI) + (0.5 * lat))); + return new Vector3( + (float)x, + (float)y, + (float)value.Alt); + } + + /// + /// Converts an AltitudeAzimuth to Unity's standard rotation construct. + /// + public static Quaternion ToQuaternion(this HorizontalSphericalPosition p) + { + if (p is null) + { + throw new ArgumentNullException(nameof(p)); + } + + return Quaternion.CreateFromYawPitchRoll( + (float)p.AzimuthDegrees, + (float)p.AltitudeDegrees, + 0); + } + + /// + /// Converts an AltitudeAzimuth to Unity's standard Euler rotation construct. + /// + public static Vector3 ToEuler(this HorizontalSphericalPosition p) + { + if (p is null) + { + throw new ArgumentNullException(nameof(p)); + } + + return new Vector3( + (float)p.AltitudeDegrees, + (float)p.AzimuthDegrees, + 0); + } +} diff --git a/src/Juniper.Root/World/People.cs b/src/Juniper.World/People.cs similarity index 100% rename from src/Juniper.Root/World/People.cs rename to src/Juniper.World/People.cs diff --git a/src/Juniper.Xml/Juniper.Xml.csproj b/src/Juniper.Xml/Juniper.Xml.csproj new file mode 100644 index 0000000000..c9ff161713 --- /dev/null +++ b/src/Juniper.Xml/Juniper.Xml.csproj @@ -0,0 +1,37 @@ + + + + Juniper.Xml + Juniper.Xml + SeanMcBeth.Juniper.Xml + Library + net7.0 + Sean T. McBeth + Copyright © Sean T. McBeth 2019 + False + General purpose code + https://github.com/capnmidnight/Juniper + logo_juniper.min.png + https://github.com/capnmidnight/Juniper + LICENSE.md + enable + AnyCPU;x64 + enable + + + + portable + + + + none + + + + + + + + + + diff --git a/src/Juniper.Root/SsmlDocument.cs b/src/Juniper.Xml/SsmlDocument.cs similarity index 98% rename from src/Juniper.Root/SsmlDocument.cs rename to src/Juniper.Xml/SsmlDocument.cs index 81cf877dd3..3da610504c 100644 --- a/src/Juniper.Root/SsmlDocument.cs +++ b/src/Juniper.Xml/SsmlDocument.cs @@ -1,6 +1,6 @@ using System.Xml.Linq; -namespace Juniper; +namespace Juniper.Xml; public class SsmlDocument { diff --git a/src/Juniper.Root/Xml/XmlSpreadsheet2003.cs b/src/Juniper.Xml/XmlSpreadsheet2003.cs similarity index 100% rename from src/Juniper.Root/Xml/XmlSpreadsheet2003.cs rename to src/Juniper.Xml/XmlSpreadsheet2003.cs