单项选择题
You work as an application developer at Certkiller .com. Certkiller .com has asked you to create a multi-threaded application, which executes a critical database
backup operation on an hourly basis. You define this operation with the following code:
public void BackupDB () {
//Implementation code }
You then create a Thread object for the purpose of invoking this method.
You need to ensure that the thread is scheduled for execution before any other thread at runtime.What should you do?()
A.A
B.B
C.C
D.D
相关考题
-
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.Certkiller.comhasaskedyoutodevelopanapplicationthatmonitorsandcontrolstheactivitiesofaWindowsservice.YouneedtousetheappropriateclasstomeetCertkiller.com’srequirements.Whatshouldyoudo?()
A. Use the ServiceBase class.
B. Use the ServiceInstaller class.
C. Use the ServiceManager class.
D. Use the ServiceController class. -
单项选择题
You work as an application developer at Certkiller .com. Certkiller .com has asked you to develop an application allows administrators to control Windows services dynamically without using the Services MMC. You start by creating a class named LocalServiceController. You need to add the correct code to the LocalServiceController class to ensure that administrators are able to start local Windows services.What code should you use?()
A.A
B.B
C.C
D.D -
单项选择题
YouworkasanapplicationdeveloperatCertkiller.com.YouhavebeengiventhetaskofdevelopingaWindowsserviceapplicationthatregularlymonitorsotherWindowsservicesonthesamecomputer.ThisWindowsserviceapplicationmustalsologanyabnormalfilesystemactivity.YouhaveaddedthefollowingclasstotheWindowsserviceapplication:publicclassEnumerateService:ServiceBase{publicstaticEnumerateService(){this.ServiceName="EnumerateService";this.CanStop=true;}protectedoverridevoidOnStart(string[]args){//EnumerateallservicesandinitializetheFileSystemWatcher}protectedoverridevoidOnStop(){//StoptheFileSystemWatcherandperformcleanup}publicstaticvoidMain(){EnumerateServiceservice=newEnumerateService();}}YouthencreatetheinstallerfortheWindowsserviceapplication,andinstalltheWindowsserviceapplication.YouhaveconfiguredtheWindowsserviceStartuptypetoAutomatic,andrebootedthesystem.YouthentestthenewWindowsserviceapplication,andfindthatitisnotworking.Youneedtoensurethattheserviceisworkingproperly.Whatshouldyoudo?()
A. Override the OnBoot method instead of the OnStart method.
B. Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Service.Run ();
C. Override the OnLoad method instead of the OnStart method.
D. Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Run (service);
