You are creating a remote database management application by using Microsoft Windows Forms and Microsoft .NET Framework 3.5
You use the Windows Communication Foundation model to create the application.
You write the following code segment.
(Line numbers are included for reference only.)
01 public class QueryAnalyzerService : IQueryAnalyzerService, IDisposable
02 {
03
04 public void Open(){ }
05 public void ExecuteSql(string sql){ }
06 public void Close(){ }
07 public void Dispose(){ }
06 }
You need to ensure that each time a client application calls the Open() method, a new service instance is created.
Which code segment should you insert at line 03?
A.
[OperationBehavior(TransactionScopeRequired=true)]
B.
[OperationBehavior(AutoDisposeParameters=true)]
C.
[OperationBehavior(ReleaseInstanceMode=ReleaseInstanceMode.None)]
D.
[OperationBehavior(ReleaseInstanceMode=ReleaseInstanceMode.BeforeCall)]