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.
You find that the service starts even though the endpoints have not been Configured correctly.
You need to create a custom service behavior that throws an exception if the list of endpoints that are Configured is not complete.
Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
class CustomBehavior:IServiceBehavior
{
public void Validate(ServiceDescription description, ServiceHostBase serviceHostBase)
{
MvValidationMethod();
// validates list of endpoints.
}
}

B.
class CustomBehavior:IEndpointBehavior
{
public void Validate(ServiceEndpoint endpoint)
{
MvValidationMethod();
// validates list of endpoints.
}
}

C.
class CustomBehavior:IContractBehavior
{
public void Validate(ContractDescription contractDescription, ServiceEndpoint endpoint)
{
MvValidationMethod();
// validates list of endpoints.
}
}

D.
class CustomBehavior:IOperationBehavior
{
public void Validate(OperationDescription operationDescription)
{
MvValidationMethod();
// validates list of endpoints.
}
}


Leave a Reply