Thinktecture.Tools.Web.Services.CodeGeneration.ClientServiceGenerator.TweakServiceContractGenerator C# (CSharp) Method

TweakServiceContractGenerator() private method

private TweakServiceContractGenerator ( System.ServiceModel.Description.ServiceContractGenerator scg ) : void
scg System.ServiceModel.Description.ServiceContractGenerator
return void
        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);
        }