ValueOf icon indicating copy to clipboard operation
ValueOf copied to clipboard

Deal with Primitive Obsession - define ValueObjects in a single line (of C#).

Results 21 ValueOf issues
Sort by recently updated
recently updated
newest added

Code could be simplified. https://github.com/mcintyre321/ValueOf/blob/84e9e841374007da1ba1319e2cb4d00b4313d959/ValueOf/ValueOf.cs#L55 ```csharp TThis x = new TThis(); ``` Contents of constructor could be removed then: https://github.com/mcintyre321/ValueOf/blob/84e9e841374007da1ba1319e2cb4d00b4313d959/ValueOf/ValueOf.cs#L28-L40

Now that we have records in C#, what's the benefit of using this library over them? Have you considered deprecating this and redirecting potential users to use records?

Hi, I'm trying to incorporate your excellent library into my EFCore model classes, for example: ```csharp public partial class Account { public Account() { WorkerGroups = new HashSet(); } public...

I'm new to ValueObjects so forgive me if this is a bad idea, but I wanted to avoid throwing exceptions during validation for a variety of reasons and instead have...

Update the README with information on the new TryValidate and TryFrom methods. Also added some of my own thoughts on how best implement validation.

Hi! This is my second PR here in this repository. I added a [`TypeConverter`](https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.typeconverter?view=netframework-4.8) for `ValueOf` types. This is needed, if you want to serialize and deserialize types, e.g. with...

This is a feature "request", and also a question: why not a code generator ? would be intresting to write one, and could tackle down some issues like valueof always...

Currently, classes derived from ValueOf cannot have just static constructors, but also need to declare instance constructor and place it above the static one, otherwise Factory creation will fail

Perhaps a change for later when there's greater compatibility, but having the static From function in an interface is amazing! (and just what I needed)