Summary: How to create a generic reusable contract.

Note: We recently added service tutorial 8 and service tutorial 9 (also described in DSS user guide which show how to declare generic contracts, implementing generic contracts, extending generic contracts, and implementing multi-headed services. The full code is not included in Microsoft Robotics Studio (1.5) but based on the code snippets included in the documentation it should be possible to follow.

		 1. Use [DssNewService] to clone or create a new service.
	

		    [DssNewService] [-s:MyService]
	

		 2. Add your operation types and data contracts, exactly as you would to a service implementation.
	

		 3. Delete the service implementation file [(MyService.cs)]
	

		 4. Open [AssemblyInfo.cs] and change the service declaration to:
	

		    [assembly: ServiceDeclaration(DssServiceDeclaration.DataContract)] 
	

		 5. Compile
	

		 6. Your other services should implement the proxy file which is generated by step 5.
	

		    dssnewservice -i:"MyService.Y2007.M08.Proxy.dll" -s:Foo
	


See also:

AlternateContracts
Microsoft Communities