Sovran.NET 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Sovran.NET --version 1.0.0
NuGet\Install-Package Sovran.NET -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sovran.NET" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sovran.NET --version 1.0.0
#r "nuget: Sovran.NET, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sovran.NET as a Cake Addin
#addin nuget:?package=Sovran.NET&version=1.0.0

// Install Sovran.NET as a Cake Tool
#tool nuget:?package=Sovran.NET&version=1.0.0

// add badges and stuff here

Sovran.NET

Small, Efficient, Easy. State Management for Kotlin.

Sovran's goal is to be minimal, efficient, easy to implement and to make debugging state changes effortless.

While it is a rather opinionated library, we hope that you'll find said opinions to be with good reason. While it is somewhat similar to things like Redux and Flux there are some natural differences when applied to Kotlin.

We don't like large state structures

Large state structures just aren't terribly useful. Subscribers typically only care about a small subset of the data contained within. We have opted to allow multiple state structures to be supplied and work in unison. This has the benefit of subscribers to be given just the parts of the state that they are interested in. It's highly recommended that state structures only contain properties that relate to one another in some obvious way.

By using data classes to define state objects, we benefit from the natural copy mechanism within Kotlin to make sure no direct access to state is given to subscribers.

We don't like artificial constraints

We've been very careful to not dictate how you write your code. If you want one state structure to subscribe to another unrelated state, we assume you have a good reason. If you want a single giant state structure, while it's not our first choice of solutions, you can do that if you need to. If you need to be unconventional, do it. Everything has a time and place.

Types should be explicit, but inferred where possible

You'll notice that when using Sovran, it's actually the subscription input that defines the type of state that a given closure is intended to work against. This allows us to avoid having developers supply the type twice.

Example:

store.subscribe(subscriber = this, stateClazz = MyState::class) { state ->
    // MyState was updated, react to it in some way.
    print(state)
}

In the example above, MyState is defining the generic type needed by the subscribe call.

We want it to be very debuggable

It is very common for bugs to occur in code. This library is architected such that most anywhere within the library as well as your own code, the stack trace shows the exact point a state change was initiated and all points in between.

Getting Started

// TODO

Contributing

License

MIT License

Copyright (c) 2021 Segment

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Sovran.NET:

Package Downloads
Segment.Analytics.CSharp

The hassle-free way to add analytics to your C# app.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 18,135 9/19/2023
1.3.0 1,845 8/11/2023
1.2.0 751 7/26/2023
1.1.0 13,405 3/7/2023
1.0.0 5,462 9/9/2022