-
2.0.0 Stable
released this
2026-08-10 06:06:49 +00:00 | 11 commits to main since this releaseShiki.Common
-
Created
BooleanResult,ErrorCodeResult, and Transportable variants ofResultandBooleanResultBooleanResult:- Simple container that may hold an exception, alongside a
BooleanResult.Successproperty which istruewhenBooleanResult.Erroris null.
- Simple container that may hold an exception, alongside a
ErrorCodeResult- Somewhat unfinished, but works okay in it's current state.
- Simple container that holds a value and an error code, alongside
HasValuewhich is true if the value is not null andErrorCodeResult.Errorisdefault). - Due to it being a struct, an
UninitializedFallbackErrorhas been added which is returned when there is no value, but the error code is successful (default), I intend on making this better in the future with Unions.
Transportables:- Similar to their non-transportable counterparts, but the exception is fixed to a
ResultExceptionDto, which holds enough exception info to be serialized, deserialized, and then thrown.
- Similar to their non-transportable counterparts, but the exception is fixed to a
-
Created
SlugandISlugFormatter- Slug is a simple read-only string container that enforces the given formatter in it's type param.
-
Created
FactoryConstructableAttribute- Automatically generates
IFactoryConstructableimplementations for constructorsFactoryConstructableAttributeis applied onto
- Automatically generates
-
Created
IdentifierNamespace- Used to define (usually constant) namespaces that can be derived from.
-
Identifier Additions- Now implements
IResultParsable, which lets youTryParseIntoResult, returning a Result containing either an exception pointing to what went wrong, or the parsedIdentifier Identifiernow generates a hash code on construction for quick hashing- Created factory methods
Identifier.DerivedFrom,Identifier.Derived,Identifier.WithNamespace,Identifier.WithPath
- Now implements
-
Created
RangeObservableCollection- Used to provide an
AddRangemethod, which is not present on a normalObservableCollection.
- Used to provide an
-
Created
PolymorphicSerializableAttribute- Allows you to mark an individual class as a Polymorphic/Derived type of the given Base class.
- An alternative to the existing
JsonDerivedTypeAttributebuilt into System.Text.Json which can only be applied to the base class.
-
Created
IResultParsable- Similar to
IParsable, but instead of returning a bool and an out var, it returns aResultwhich can contain either the value, or an exception. - Being able to provide the exception gives more info on why parsing failed, and in some cases improves the look of the call site.
- Similar to
-
Created
Dirtifier- Provides simple methods to set a value, and if the value is different, set a given bool to true.
-
Created
ICachedHashCode- Interface for implementing a cached hash code, which is useful for fast hashing on immutable objects that are kept around for a long time
-
Created
PeriodicRunnerTask- Calls a given
Taskevery tick of aPeriodicTimerusing the givenTimeSpan
- Calls a given
Breaking Changes
- Refactored
IdentifierIdentifier.FullPathis nowIdentifier.IdentifierString- Constructor now takes
IReadOnlyCollection<string>instead ofICollection<string> - Removed
Identifier.CanParseStringin favor of newIdentifier.TryParseIntoResult
- Removed Observables
- There are many other libraries that implement this better than I do, and I don't want to maintain it anymore.
- Moved
ResulttoShiki.Common.Result AssemblyExtensions.VersionStringis now nullable instead of returningstring.Empty
Shiki.ModuleManagement
- Bump Serilog version to 4.4.0
Shiki.CodeGenerator
- Created
FactoryConstructableAttributeImplGenerator- Automatically generates
IFactoryConstructableimplementations for constructorsFactoryConstructableAttributeis applied onto
- Automatically generates
- Now depends on a new
Shiki.CodeGenerator.Coreproject - Some refactoring done
Breaking Changes
- Removed
PubliclyImmutableObservableGenerator - Moved
IFactoryConstructableGeneratortoShiki.CodeGenerator.Generator.Factory
Shiki.CodeGenerator.Core
- Initial Creation
- Used for common types which may be useful to other CodeGenerators
Shiki.Tests
- Initial Creation
- Used to test library implementations
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-