-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
373 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
LocalTimeKit/DotNetThoughts.LocalTimeKit.Tests/DotNetThoughts.LocalTimeKit.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\DotNetThoughts.LocalTimeKit\DotNetThoughts.LocalTimeKit.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...imeKit/DotNetThoughts.LocalTimeKit.csproj → ...imeKit/DotNetThoughts.LocalTimeKit.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<Version>1.0.0</Version> | ||
<Version>1.0.1</Version> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Local Time Kit | ||
|
||
## LocalDateTime | ||
|
||
`LocalDateTime` is an unambiguous representation of an instance in time. | ||
Types like `DateTime` and `DateOnly` does not provide enough information to determine exactly what instance in time they represent. LocalDateTime aims to package all you need into one type. | ||
|
||
Don't worry about the word "Local" in the name. LocalDateTime is not limited to local instances in time in the normal sense. LocalDateTime consider even a UTC date to be local. Local to the utc time zone. | ||
|
||
While .Net has a lot of shady "helpful" implicit conversions between `DateTime` and `DateTimeOffset`, LocalDateTime is explicit about what it does. | ||
|
||
No time-operations, makes any sense without knowing which timezone you are operating in. Remember, daylight savings have the effect of some days lasting only 23 hours, while others last 25. | ||
LocalDateTime therefor requires you to specify a timezone when you create an instance. | ||
LocalDateTime then helps you to convert between timezones, and to calculate timezone-related specific instances of time, like beginning of year, or midnight of current day etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
# Results | ||
[Results/ReadMe.md](Results/ReadMe.md) | ||
[Results/DotNetThoughts.Results/ReadMe.md](Results/DotNetThoughts.Results/ReadMe.md) | ||
|
||
# Results.Validation | ||
[Results/DotNetThoughts.Results.Validation/ReadMe.md](Results/DotNetThoughts.Results.Validation/ReadMe.md) | ||
|
||
# Results.Json | ||
[Results/DotNetThoughts.Results.Json/ReadMe.md](Results/DotNetThoughts.Results.Json/ReadMe.md) | ||
|
||
# TimeKeeping | ||
[TimeKeeping/ReadMe.md](TimeKeeping/ReadMe.md) | ||
[TimeKeeping/DotNetThoughts.TimeKeeping/ReadMe.md](TimeKeeping/DotNetThoughts.TimeKeeping/ReadMe.md) | ||
|
||
# LocalDateTime | ||
[LocalDateTime/DotNetThoughts.LocalTimeKit/ReadMe.md](LocalDateTime/DotNetThoughts.LocalTimeKit/ReadMe.md) | ||
|
||
# UserSecrets | ||
[UserSecrets/ReadMe.md](UserSecrets/ReadMe.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Results.Json | ||
|
||
Package contains code to help serialize and deserialize Result objects to and from JSON. | ||
`JsonConverterFactoryForResultOfT` is a `JsonConverterFactory` that can create `JsonConverter` objects for any `Result<T>` object. | ||
Remember, a Result representing one or more Errors contains a list of objects implementing the `IError` interface. | ||
The actual type of an Error object is not included when serialized. This means, that when deserializing that Error again, it can't be deserialized to its original type. | ||
Instead, the Error object is deserialized to a generic `DeserializedError` object. | ||
|
||
A serialized _Successful_ `Result<T>` will look like this: | ||
```json | ||
{ | ||
"Success": true, | ||
"Value": "Some value" | ||
} | ||
``` | ||
A serialized _Successful_ `Result<Unit>` will look like this: | ||
```json | ||
{ | ||
"Success": true | ||
} | ||
``` | ||
A serialized _Error_ `Result<T>` or `Result<Unit>` will look like this: | ||
```json | ||
{ | ||
"Success": false, | ||
"Errors": [ | ||
{ | ||
"Type": "MyError", | ||
"Message": "Some error message" | ||
"Data": { | ||
"Key": "value", | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
TimeKeeping/DotNetThoughts.TimeKeeping.Tests/DotNetThoughts.TimeKeeping.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.