private void TweakServiceContractGenerator(ServiceContractGenerator scg)
{
// Do we have to genrate the async code?
if (options.GenerateAsyncCode)
{
scg.Options |= ServiceContractGenerationOptions.AsynchronousMethods;
}
// Are we generating the service end code?
if (options.GenerateService)
{
// Then turn off the channel interface and client class generation.
scg.Options &= ~(ServiceContractGenerationOptions.ClientClass | ServiceContractGenerationOptions.ChannelInterface);
}
// Map all XML namespaces to default CLR namespace specified for the generated code.
// This generates fully qualified type names in the method signatures.
// And that is not compatible with some of the tweaks we do to the code later
// with the decorators. Therefore switching back to namespace less code generation.
// scg.NamespaceMappings.Add("*", options.ClrNamespace);
}