Oskar Gewalli's blog articles

0
comment
on 1/26/2020 8:42 AM
Problems How do you create an instance of a given readonly class? How do you get a new instance but with given fields with different values? Writing readonly record classes 2007 Around 2007 I wrestled with writing immutable classes in C#. One of the key painpoints was that the constructor parameters for a class representing a database row for a specific table ended up with around 68 parameters. Note that we already had code generation of SQL Reader row deserialization based on SQL information tab[...]
>> Read the full article
.
0
comment
on 1/26/2020 8:42 AM
Problems How do you create an instance of a given readonly class? How do you get a new instance but with given fields with different values? Writing readonly record classes 2007 Around 2007 I wrestled with writing immutable classes in c#. One of the key painpoints was that the constructor parameters for a class representing a database row for a specific table ended up with around 68 parameters. Note that we already had code generation of SQL Reader row deserialization based on SQL information tab[...]
>> Read the full article
.
0
comment
on 12/28/2019 9:29 AM
After writing the previous posts about getting some of the infrastructure working for non Windows systems, I’ve seen better ways of getting it to work. Instead of using a netfx.props file, you can use a Directory.Build.props with platform specific configuration as seen in for instance FSharp.Compiler.Service: <Project> <!-- mono --> <PropertyGroup Condition="'$(OS)' == 'Unix'"> <MonoRoot Condition="'$(MonoRoot)' == '' and $([MSBuild]::IsOsPlatform('Linux'))">/usr</MonoRoot> <MonoRoot Conditio[...]
>> Read the full article
.
0
comment
on 12/28/2019 9:29 AM
After writing the previous posts about getting some of the infrastructure working for non Windows systems, I’ve seen better ways of getting it to work. Instead of using a netfx.props file, you can use a Directory.Build.props with platform specific configuration as seen in for instance FSharp.Compiler.Service: <Project> <!-- mono --> <PropertyGroup Condition="'$(OS)' == 'Unix'"> <MonoRoot Condition="'$(MonoRoot)' == '' and $([MSBuild]::IsOsPlatform('Linux'))">/usr</MonoRoot> <MonoRoot Conditio[...]
>> Read the full article
.
0
comment
on 12/28/2019 1:13 AM
Command handlers are services If we start from the command redux post by Ayende. In actual shopping scenarios we need to deal with not a clear script of actions that can be executed in a sequential manner. Instead we have a unidirectional wizard-style flow where the customer is redirected from the shopping site to payment provider and back. Let us ignore these complexities and look at the following: var placeOrderCommand = new CompositeCommand( new RegisterOrderCommand(), new ReserveStockComman[...]
>> Read the full article
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper