private static CodeDomVisitor[] GetVisitors(ServiceContractGenerator generator, CommandProcessorOptions options) { ArrayOfXElementTypeHelper arrayOfXElementTypeHelper = new ArrayOfXElementTypeHelper((generator.Options & ServiceContractGenerationOptions.InternalTypes) == ServiceContractGenerationOptions.InternalTypes, generator.TargetCompileUnit); CodeDomVisitor[] visitors = new CodeDomVisitor[] { new CodeNamespaceUniqueTypeFixer(), new AttributeFixer(generator), new ConstructorFixer(), // Visitors to remove sync methods if !options.Sync new MakeOldAsyncMethodsPrivate(), new RemoveExtensibleDataObjectImpl(), new XmlDomAttributeFixer(), new SpecialIXmlSerializableRemapper(arrayOfXElementTypeHelper), new EnsureAdditionalAssemblyReference(), new CreateCallbackImpl((generator.Options & ServiceContractGenerationOptions.TaskBasedAsynchronousMethod) == ServiceContractGenerationOptions.TaskBasedAsynchronousMethod, generator), new AddAsyncOpenClose(), // this one need to run after CreateCallbakImpl which provide name of VerifyCallbackEvents method }; if (options.Sync != true) { visitors = AddSyncVisitors(visitors); } return(visitors); }
public SpecialIXmlSerializableRemapper(ArrayOfXElementTypeHelper arrayOfXElementTypeHelper) : base(null, ArrayOfXElementTypeHelper.ArrayOfXElementRef.BaseType) { _arrayOfXElementTypeHelper = arrayOfXElementTypeHelper; }