Reading an MSDN tutorial on Extending Hosting Using ServiceHostFactory, there is an example of overriding a CreateServiceHost
function:
public class DerivedFactory : ServiceHostFactory
{
public override ServiceHost CreateServiceHost( Type t, Uri[] baseAddresses )
{
return new DerivedHost( t, baseAddresses )
}
}
However, when we look at the actual definition of the class, the CreateServiceHost
method is protected
:
protected virtual ServiceHost CreateServiceHost(
Type serviceType,
Uri[] baseAddresses
)
My question is, what should I override? Is MSDN example wrong?