private void Visit(ContractDescription contractDescription)
 {
     bool flag = IsDuplex(contractDescription);
     this.contractMemberScope = new UniqueCodeIdentifierScope();
     this.callbackMemberScope = flag  new UniqueCodeIdentifierScope()  null;
     UniqueCodeNamespaceScope scope = new UniqueCodeNamespaceScope(this.parent.NamespaceManager.EnsureNamespace(contractDescription.Namespace));
     CodeTypeDeclaration codeType = this.typeFactory.CreateInterfaceType();
     CodeTypeReference reference = scope.AddUnique(codeType, contractDescription.CodeName, IContract);
     CodeTypeDeclaration declaration2 = null;
     CodeTypeReference reference2 = null;
     if (flag)
     {
         declaration2 = this.typeFactory.CreateInterfaceType();
         reference2 = scope.AddUnique(declaration2, contractDescription.CodeName + Callback, IContract);
     }
     this.context = new ServiceContractGenerationContext(this.parent, contractDescription, codeType, declaration2);
     this.context.Namespace = scope.CodeNamespace;
     this.context.TypeFactory = this.typeFactory;
     this.context.ContractTypeReference = reference;
     this.context.DuplexCallbackTypeReference = reference2;
     this.AddServiceContractAttribute(this.context);
 }