Final Review - Tutorial Questions Flashcards
(22 cards)
Which .NET attribute is used to decorate a WCF service contract definition? That is, the entire contract, not the individual methods/properties of the contract.
ServiceContract
What instance mode causes nothing to be displayed or no change to be visible?
PerCall
What instance mode allows the client to see its own changes but not those of any other instance?
PerSession
What instance mode allows all clients to have access to the changes made by other instances?
Single
What is it absolutely necessary to adjust in the service configuration to maintain a working application when switching to a different binding?
The endpoint address
Why apply the ServiceBehavior attribute to a class?
To customize the instancing behavior of the class
Which WCF uses PerCall instancing as its default instancing mode?
BasicHttpBinding
What is the default instancing mode of NetTcpBinding and NetNamedPipeBinding?
PerSession
What is the PerCall instancing mode of all three bindings?
PerCall
What is the PerSession instancing mode of BasicHttpBinding?
PerCall
What is the PerSession instancing mode of NetTcpBinding and NetNamedPipeBinding?
PerSession
What is the Single instancing mode of all three bindings?
Single
The following line appears in connectToMessageBoard() in the client’s MainWindow class:
DuplexChannelFactory<IMessageBoard> channel = new DuplexChannelFactory<IMessageBoard>(this, "MessagingService");</IMessageBoard></IMessageBoard>
What is the significance of the argument “this” in the above call?
It’s the client object that implements the callback method
Which type of contract is NOT ever implemented by a WCF service?
A callback contract
What is the purpose of the WCF callbacks implemented in Tutorial 6?
To allow the service to update all clients in real time with changes to the MessageBoard service object
What modification can be made to a WCF service as the final fix to prevent a deadlock that causes an application to become unresponsive or freeze?
The argument IsOneWay = true can be added to the [OperationContract] attributes of void methods in the main Interface and callback interface
Once client callbacks are implemented, where can you expect to find the following code:
IUserCallback cb = OperationContect.Current.GetCallbackChannel<IUserCallback>();</IUserCallback>
In the service’s main class (MessageBoard)
When defining a service contract, which protocol buffer keyword is used to declare (i.e. prototype) a method call on a service?
rpc
When creating a service contract, which main protocol buffer keyword is used to layout the structure of either the input passed into or the output returned from a method call on the service?
message
What is the reason for editing a service’s properties associated with a .proto file before implementing the service?
To make sure Visual Studio generates a C# stub class when building the project to implement the service with
What Visual Studio project template was used to create the service in Tutorial 7?
ASP.NET Core gRPC Service
What were protocol buffers used for in Tutorial 7?
Defining the service contract or interface