Bugslayer: 10 days into EA14

My first 10 days into EA14 have passed by and I am discovering some issues ranging from nuisances to real distractors … So here is my list of bugs and SO questions. I will update the list as I receive updates from Sparx or other sources. CaseId 18058962 – confirmed Package Validation in Enterprise Architect […]

Extracting RTF Documents from XMI Files with PowerShell

XMI Base64 Encoded ZIP

Enterprise Architect allows you to create custom document templates to be used in your reports. Internally EA uses the oldie-goldie RTF document format for these templates. When exporting these templates via Export Reference Data they are included as base64 encoded zipped RTF documents which in turn are again base64 encoded. For the untrained eye it […]

[NoBrainer] Automating Sparx Enterprise Architect with PowerShell

Enterprise Architect Class Diagram

It has been some time since I have last posted something on our blog, so I will start with something easy: today I made the switch from Sparx Enterprise Architect v13.5 to v14.0. And yes, it really paid off since I now can actually decipher all those small connector icons on my Surface Book 2 […]

[NoBrainer] Adding meaningful error messages when using Contract.Result in C#

CodeContract error message

We at d-fens use Microsoft Code Contracts every day. And certainly with every great tool there are some things that might benefit from some improvement – and code contracts are no exception. There is one particular annoying thing in that the error message for Contract.Result exceptions strips the generic parameters from it. This in essence […]

Transient Error Handling with automatic Retries in C#

Inspired by Transient Fault Handling we created a quick helper class to faciliate the automatic retry of various operation that may fail in today’s interconnected environments. Large parts of our Appclusive framework deal with fetching from and pushing information to various backend systems. As they all can (and eventuall will) fail we needed a flexible […]

Creating SignalR Hub Classes on the fly

Recently I wanted to create SignalR hubs for client notification based on a list of internal queues. As SignalR is creating Hubs based on their type names I had to find an approach for dynamically defining classes based on the given queue list. In this blog post I show a way on how to do […]

Getting Instance by Type Name in StructureMap

Ever since we are using StructureMap we are also using this as a cheap replacement for Managed Extensibility Framework (MEF), as it allows us to scan arbitrary assembly paths for additional types to inject. As we are also dealing with configuration sections where we specify which plugins or types we want to use in a […]

Calling ResumeBookmark inside a TrackingParticipant returns NotFound

While creating a process with Windows Workflow Foundation we wanted to communicate between a workflow activity and the workflow application. For this we decided to use Bookmarks and a TrackingParticipant. The idea was that the Activity should create a bookmark to be consumed by a TrackingParticipant which would process something and then pass control back […]

[NoBrainer] Cascading Lambda Expression in C#

While Converting ODataQueryOptions into LINQ Expressions I needed to cascade different Lambda Expressions via AND and OR. In this post I describe a way on how to easily combine them via a boxing class with operator overriding. The Problem Cascading lambda expressions should be as easy as using a + or && operator: A boxing […]

[NoBrainer] Strongly typed caching with System.Runtime.Caching.MemoryCache

Caching with C# has become easy since the MemoryCache component is included in the .NET framework. While this implementation provides only limited functionality it is actually quite easy to make it strongly typed and support for constructing unique cache keys per cache group. In this post I will show you how this can be done […]