70-513 · Question #302
A Windows Communication Foundation (WCF) solution uses the following contract. [ServiceContract(SessionMode SessionModeAllowed)] public interface IMyService { [OperaionContractQsTerminating false)…
The correct answer is A. Change the ServiceContract attribute of the IMyService interface to the following. D. Change the OperationContract attribute of the Terminate operation to the following. See the full explanation below for the reasoning.
Question
A Windows Communication Foundation (WCF) solution uses the following contract. [ServiceContract(SessionMode SessionModeAllowed)] public interface IMyService { [OperaionContractQsTerminating false) void lnitialize0; [OperaionContractQslnitiating false)] Void DoSomethingO; [OperaionContractQsTerminating true)J void TerminateO; } You need to change this interface so that:
`Initialize is allowed to be called any time before Terminate is called "DoSomething is allowed to be called only after Initialize is called, and n allowed to be called after Terminate is called "Terminate will be lowed to be called only after Initialize is called Which two actions should you perform (Each correct answer presents part of the solution. Choose two)
Options
- AChange the ServiceContract attribute of the IMyService interface to the following.
- BChange the ServiceContract attribute of the IMyService interface to the following.
- CChange the OperationContract attribute of the Initialize operation to the following.
- DChange the OperationContract attribute of the Terminate operation to the following.
How the community answered
(35 responses)- A71% (25)
- B17% (6)
- C11% (4)
Community Discussion
No community discussion yet for this question.