private (ContractDescription Description, Type ContractType) GenerateContract(Type serviceType) { var className = ContractDescription.GetContractClassName(serviceType); var contractType = ProxyAssembly.DefaultModule.GetType(className, false, false); ContractDescription description; if (contractType == null) { description = CreateDescription(serviceType, Logger); contractType = new EmitContractBuilder(description).Build(ProxyAssembly.DefaultModule); } else { description = CreateDescription(serviceType, null); } return(description, contractType); }