Question:
You need to ensure that, for each exception, the central logging system logs the name of the method that caused the exception.
Which code segment should you insert at line AS12 in the ApplicationServices.vb file?
B
C
D
You need to ensure that, for each exception, the central logging system logs the name of the method that caused the exception.
Which code segment should you insert at line AS12 in the ApplicationServices.vb file?
The order-processing service must save submitted orders in a format that persists all properties on the Order object.
You need to serialize Order objects.
Which code segment should you insert at line OR22 in the OrderRepository.vb file?
You need to use the performance counters to ensure that the performance metrics are updated as required.
Which code segment should you use as the body of the LogOrderFinished function in the ApplicationServices.vb file? (Each correct answer presents a complete solution. Choose two.)
You are testing a newly developed method named PersistToDB. This method accepts a parameter of type EventLogEntry. This method does not return a value.
You need to create a code segment that helps you to test the method. The code segment must read entries from the application log of local computers and then pass the entries on to the PersistToDB method. The code block must pass only events of type Error or Warning from the source MySource to the PersistToDB method.
Which code segment should you use?
You are developing a custom event handler to automatically print all open documents. The event
handler helps specify the number of copies to be printed. You need to develop a custom event arguments class to pass as a parameter to the event handler. Which code segment should you use?
You write a class named Employee that includes the following code segment.
public class Employee {
string employeeId, employeeName, jobTitleName;
public string GetName() { return employeeName; }
public string GetTitle() { return jobTitleName; }
You need to expose this class to COM in a type library. The COM interface must also facilitate forward-compatibility across new versions of the Employee class.
You need to choose a method for generating the COM interface.
What should you do?
You develop a service application named FileService. You deploy the service application to multiple servers on your network.
You implement the following code segment. (Line numbers are included for reference only.)
01 public void StartService(string serverName){
02 ServiceController crtl = new
03 ServiceController("FileService");
04 if (crtl.Status == ServiceControllerStatus.Stopped){
05 }
06 }
You need to develop a routine that will start FileService if it stops. The routine must start FileService on the server identified by the serverName input parameter.
Which two lines of code should you add to the code segment? (Each correct answer presents part of the solution. Choose two.)