Rory Primrose

I don't have a solution but I admire the problem

Recent Posts

Tags

Community

Email Notifications

Archives

August 2007 - Posts

Blog != RSS

I have to admit that I have an expectation that where there is a blog, there is an RSS feed. Its a shame that MSNBC haven't got this synergy for the PhotoBlog. There is however an RSS feed for The Week in Pictures which is great.

Updated WinMerge post

I have updated my WinMerge post (again). It now includes a workaround that a colleague found on the MSDN forums and my version of the C# filter file.

Posted: Aug 16 2007, 10:15 AM by Rory Primrose | with no comments
Filed under:
ActivityExecutionContext failed to serialize

An exception of type 'System.Runtime.Serialization.SerializationException' occurred in Neovolve.Framework.Workflow.DLL but was not handled in user code

Additional information: Type 'System.Workflow.ComponentModel.ActivityExecutionContext' in Assembly 'System.Workflow.ComponentModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable.

This was a bit of a curly one.

The problem was caused because one of my custom activities couldn't be serialized. The custom activity was used in a WhileActivity. Serialization is happening behind the scenes because the WhileActivity uses serialization to create clones of the activities in its loop.

Jon Flanders posted some great entries about AEC and serialization (here and here).

The moral of the story is to ensure that your custom activities can be serialized (or workarounds developed) so that Windows Workflow Foundation persistence and WhileActivities can use them.

Posted: Aug 13 2007, 02:07 PM by Rory Primrose | with no comments
Filed under: ,
Coding standards - String vs string etc

I recently posted about some coding standards I have been reviewing. There is another standard that has plagued me where my research doesn't really offer any solid guidance.

It is the old argument of:

  • string vs String
  • bool vs Boolean
  • int vs Int32
  • long vs Int64

The reason I like the String/Boolean option is because the colour coding in the IDE clearly identifies the text as a type rather than a C# keyword. That being said, I still tend to use int and long, but then revert to String and Boolean. One reason that Int32/Int64 is better would be that the meaning of int/long may change with the platform (I think this is right, someone please confirm) whereas Int32 and Int64 have static meanings.

Any thoughts?

Posted: Aug 03 2007, 11:09 AM by Rory Primrose | with 1 comment(s)
Filed under: