Wednesday, August 29, 2012

WPF Properties

Any dependency property can be an inherited property, simply by specifying a flag in the metadata provided when registering that property with the dependency property system of WPF. 
http://msdn.microsoft.com/en-us/magazine/cc700358.aspx

Thursday, August 23, 2012

Identifying Workflow Instance

Match the ows_WorkflowInstanceID value from the Xml tab of Task item in SharePoint Manager 2007 with the WorkflowInstanceID query string variable of the Doc lib item's particular workflow status (Wrkstat.aspx) page.

Some tips on accessing object model: http://web.archive.org/web/20090403083734/http://mossytips.blogspot.com/2008/08/how-to-get-workflow-instance-of-task.html
and Shelton's "Part 4 - Custom Workflow Forms (TaskEdit Form).pdf p. 14.

Saturday, August 11, 2012

Asynchronous Silverlight

Silverlight 2 web services still have thread affinity with the UI thread, it's just now there is some behind the scenes processing taking place. When a web service call is made, it is placed in a queue to be actioned by the UI thread. ...  Once the call completes the ...Completed handler is invoked on the same thread that the ...Async call was made. 
This is with regard to the proxy generated by the WCF service reference wizard.
http://www.codeproject.com/Articles/31018/Synchronous-Web-Service-Calls-with-Silverlight-Dis

Thursday, August 9, 2012

Working around GetListItemsAsync

First to step through References.cs comment out [System.Diagnostics.DebuggerStepThroughAttribute()] of ListsSoapClient. Tried making OnBeginGetListItems public and calling from custom class.cs without success. See this for possible workaround.
I could just chain call backs but IMO that is code smell (i.e. a leaky abstraction) because it "violate[s] implementation visibility by requiring consumers to know that they shouldn't expect to receive a return value [...]".

Wednesday, August 8, 2012

Asynchronous Events

(ProTip: If I initialize the event to an empty delegate{}, I don’t have to null-check the event before raising it.)  
http://www.headspring.com/blog/developer-deep-dive/using-waithandles-to-test-asynchronous-events/

Versioning Scheme


Consider a version format of X.Y.Z (Major.Minor.Patch). Bug fixes not affecting the API increment the patch version, backwards compatible API additions/changes increment the minor version, and backwards incompatible API changes increment the major version.
http://semver.org/

Synchronous completion

If the synchronous completion of the call is detected in the AsyncCallback delegate, it is probable that the thread that initiated the asynchronous operation is the current thread.
http://msdn.microsoft.com/en-us/library/system.iasyncresult.completedsynchronously.aspx