题目内容

You are developing a Windows Communication Foundation (WCF) service.One of the service operations contains the following code.private static int counter = 0;[OperationContract]public void IncrementCount(){ counter++;}You need to set a service behavior that prevents two or more threads from incrementing the counter variable at the same time. Which code segment should you use to set the service behavior?()

A. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
B. [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Single)]
C. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Multiple)]
D. [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Reentrant)]

查看答案
更多问题

在转动设备中轴为刚性轴。()

A. 正确
B. 错误

压缩机排气温度高的原因是()

A. 冷却水量大
B. 润滑油温度高
C. 冷却器冷却能力下降
D. 排气量小

国家最高科学技术奖

交互捻钢丝绳是指()的钢丝绳。

A. 股与绳的捻制方向相同
B. 股与绳的捻制方向相反
C. 相邻两股的捻制方向相反

答案查题题库