SmartGrid.NET is something i am involved with, independently from my current employer.
finally managed to put together a website for something i worked on a while ago. its a C# implementation of graph scheduler engine toolkit called SmartGraph.NET
NOTE: until the site comes back up the SmartGraph.NET source code can be downloaded from here.
i have started using msi installations for our project. one thing that i found useful is the orca msi tool, which seems to be part of some Microsoft Platform SDK. you cannot download it separately though, unless you go here ;-)
here's some code that shows how to implement a Explorer Shell Extension in C#. it allows you to create custom context menus in directories you want. download source code here.
references for this implementation:
- http://www.codeproject.com/shell/ShellExtGuide1.asp
- http://theserverside.net/articles/showarticle.tss?id=ShellExtensions
- http://www.codeproject.com/csharp/ratingcolumn.asp
once you build it, use 'regasm /codebase' (i try to stay clear of the GAC as much as possible) to register the assembly for COM interop, that's it!
i have just noticed that in ATL shipped with VS2003 CComBSTR ToUpper() and ToLower() ASSERT when called on an empty (not NULL) string. i have to say i don't understand why that makes sense? surely it is desireable that a conversion to upper/lower on empty string yield an empty string and not an assertion.
fortunately we use our own CComBSTR wrapper, so the fix for this is as easy as:
HRESULT ToUpper()
{
if ( ::SysStringLen(this->m_str) > 0 )
return CComBSTR::ToUpper();
return S_OK;
}
some useful code for manipulating url-type strings. uses ATL::CUrl and allows non-standard url types. examples provided show how to implement a COM url:
com:///Clsid=0002df01-0000-0000-c000-000000000046&ClsCtx=CLSCTX_INPROC_SERVER
and a PubSub url:
pubsub://localhost:1234/Queue=A.B.C
download sources here.
i decided that soa2wsdl is going to be very useful in helping me deal with web service development (see previous posting on this). i created a simple C# console app which does the transform and which can also execute the 'wsdl.exe' utility to generate C# code from WSDL.
the zipped project is here.
some of my spare time (away from my current employer) is used up developing various ideas, mainly in C# on .NET and C++.
one of the concepts that i frequently re-use is the Directed Acyclic Graph or DAG. this is a simple DAG implementation, part of smartgraph.net (soon to go on-line hopefully :-).
i never really liked WSDL, but, because of its interoperability, i use it frequently. in my current work on service oriented architecture (SOA), i stumbled onto an article on Clemens Vasters' blog. it shows how metadata attributes can be used to embelish an XML Schema. taking Clemens' hint, i created an XSL Transform which generates WSDL from 'embelished schemas'. an example of such a schema (soa-sample-getprice.xsd) is given below. download the other files:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:soa:sample:price-service"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soa="urn:soa:metadata"
xmlns:tns="urn:soa:sample:price-service"
xmlns="urn:soa:sample:price-service"
elementFormDefault="qualified"
soa:service="GetPriceService" soa:url="http://soa1.soahost.net"
><xs:complexType name="GetPriceRequestType">
<xs:sequence>
<xs:element name="SessionId" type="xs:string"/>
<xs:element name="Ric" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GetPriceResponseType">
<xs:sequence>
<xs:element name="SessionId" type="xs:string"/>
<xs:element name="Ric" type="xs:string"/>
<xs:element name="Value" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GetPriceFaultType">
<xs:sequence>
<xs:element name="SessionId" type="xs:string"/>
<xs:element name="Ric" type="xs:string"/>
<xs:element name="Reason" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="GetPriceMethodType">
<xs:all>
<xs:element name="GetPriceRequest" type="tns:GetPriceRequestType"
soa:message="GetPriceRequestMessage" soa:message-type="request"/>
<xs:element name="GetPriceResponse" type="tns:GetPriceResponseType"
soa:message="GetPriceResponseMessage" soa:message-type="response"/>
<xs:element name="GetPriceFault" type="tns:GetPriceFaultType"
soa:message="GetPriceFaultMessage" soa:message-type="fault"/>
</xs:all>
</xs:complexType>
<xs:complexType name="GetPriceInterfaceType">
<xs:all>
<xs:element name="GetPriceMethod" type="tns:GetPriceMethodType"
soa:method="GetPriceMethod"/>
</xs:all>
</xs:complexType>
<xs:element name="GetPriceInterface" type="tns:GetPriceInterfaceType"
soa:interface="GetPriceInterface"/>
</xs:schema>