Snippet Type(s): Expansion
Abstract (from author):
The snippet automates generating a simple WCF (Indigo) contract and the matching implementing service. The service uses the best practices for transaction context, transaction voting, and instance management.
Description (from snippet):
Code snippet for best-practices WCF service
Code Block:
1 [ServiceContract]
2 interface $Contract$
3 {
4 [TransactionFlow(TransactionFlowOption.Allowed)]
5 [OperationContract]
6 $ReturnedType$ $OperationName$();
7 }
8 $end$
9
10 class $ServiceName$ : $Contract$
11 {
12 [OperationBehavior(TransactionScopeRequired = true)]
13 public $ReturnedType$ $OperationName$()
14 {
15 }
16 }
Download Now!
Download the snippet file by clicking the download button below. You may customize the snippet shortcut prior to downloading below.