Final Review - Tutorial Questions Flashcards

1
Q

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.

A

ServiceContract

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What instance mode causes nothing to be displayed or no change to be visible?

A

PerCall

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What instance mode allows the client to see its own changes but not those of any other instance?

A

PerSession

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What instance mode allows all clients to have access to the changes made by other instances?

A

Single

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is it absolutely necessary to adjust in the service configuration to maintain a working application when switching to a different binding?

A

The endpoint address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why apply the ServiceBehavior attribute to a class?

A

To customize the instancing behavior of the class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which WCF uses PerCall instancing as its default instancing mode?

A

BasicHttpBinding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the default instancing mode of NetTcpBinding and NetNamedPipeBinding?

A

PerSession

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the PerCall instancing mode of all three bindings?

A

PerCall

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the PerSession instancing mode of BasicHttpBinding?

A

PerCall

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the PerSession instancing mode of NetTcpBinding and NetNamedPipeBinding?

A

PerSession

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Single instancing mode of all three bindings?

A

Single

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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?

A

It’s the client object that implements the callback method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which type of contract is NOT ever implemented by a WCF service?

A

A callback contract

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of the WCF callbacks implemented in Tutorial 6?

A

To allow the service to update all clients in real time with changes to the MessageBoard service object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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?

A

The argument IsOneWay = true can be added to the [OperationContract] attributes of void methods in the main Interface and callback interface

17
Q

Once client callbacks are implemented, where can you expect to find the following code:

IUserCallback cb = OperationContect.Current.GetCallbackChannel<IUserCallback>();</IUserCallback>

A

In the service’s main class (MessageBoard)

18
Q

When defining a service contract, which protocol buffer keyword is used to declare (i.e. prototype) a method call on a service?

A

rpc

19
Q

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?

A

message

20
Q

What is the reason for editing a service’s properties associated with a .proto file before implementing the service?

A

To make sure Visual Studio generates a C# stub class when building the project to implement the service with

21
Q

What Visual Studio project template was used to create the service in Tutorial 7?

A

ASP.NET Core gRPC Service

22
Q

What were protocol buffers used for in Tutorial 7?

A

Defining the service contract or interface