private void CreateBasicCodeDomTree()
{
TweakWsdlImporter();
Collection<ContractDescription> contracts = wsdlImporter.ImportAllContracts();
Collection<Binding> bindings = wsdlImporter.ImportAllBindings();
ServiceEndpointCollection endpoints = wsdlImporter.ImportAllEndpoints();
if (wsdlImporter.Errors.Any(e => !e.IsWarning))
{
throw new ClientServiceGenerationException(wsdlImporter.Errors);
}
ServiceContractGenerator scg = new ServiceContractGenerator(compileUnit, Configuration);
TweakServiceContractGenerator(scg);
foreach (ContractDescription contract in contracts)
{
contract.Name = "I" + contract.Name.Replace("Interface", string.Empty);
scg.GenerateServiceContractType(contract);
}
foreach (Binding binding in bindings)
{
string bindingSectionName, configurationName;
scg.GenerateBinding(binding, out bindingSectionName, out configurationName);
}
foreach (ServiceEndpoint endpoint in endpoints)
{
ChannelEndpointElement channelElement;
scg.GenerateServiceEndpoint(endpoint, out channelElement);
}
}