70-513 · Question #301
A Windows Communication Foundation (WCF) solution uses the following contract. <ServiceContract(SessionMode:=SessionMode Allowed)s Public Interface lMyService…
The correct answer is A. Change the ServiceContract attribute of the lMyService 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:=SessionMode Allowed)s Public Interface lMyService <OperationContract(lsTerminating:sFalse)s Sub Initialize () <OperationContract(lslnitiating:sFalse)>s Sub DoSomething() <OperationContract(lsterminating:=True)> Sub Terminate () End Interface You need to change this interface so that:
"Initialize is allowed to be called at any time before Terminate is called. "DoSomething is allowed to be called only after Initialize is called, and not allowed to be called after Terminate is called. "Terminate will be allowed 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 lMyService interface to the following.
- BChange the ServiceContract attribute of the lMyService 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
(27 responses)- A78% (21)
- B7% (2)
- C15% (4)
Community Discussion
No community discussion yet for this question.