PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5.
The service will be hosted on a Web server. You add the following code fragment to the .svc file.

<% @ServiceHost factory="ExamServicefactory" Service="ExamService" %>

You need to create the instances of the services by using the custom ExamServicefactory class.
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
public class ExamServicefactory : ServiceHost
{
protected override void ApplyConfiguration()
{
// Implementation code comes here.
}
}

B.
public class ExamServicefactory : ServiceHostBase
{
protected override void ApplyConfiguration()
{
// Implementation code comes here.
}
}

C.
public class ExamServicefactory : ServiceHostFactory
{
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
// Implementation code comes here.
}
}

D.
public class ExamServicefactory : ServiceHost
{
public ExamServicefactory (Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses)
{
// Implementation code comes here.
}
}


Leave a Reply