The Labs \ Source Viewer \ SSCLI \ System.Runtime.Remoting.MetadataServices \ SUDSGenerator

  1. // ==++==
  2. //
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. //
  14. // ==--==
  15. //============================================================
  16. //
  17. // File: SudsWriter.cs
  18. // Purpose: Defines SUDSParser that parses a given SUDS document
  19. // and generates types defined in it.
  20. //
  21. // Date: April 01, 2000
  22. // Revised: November 15, 2000 (Wsdl)
  23. //
  24. //============================================================
  25. namespace System.Runtime.Remoting.MetadataServices
  26. {
  27.     using System;
  28.     using System.Runtime.Serialization;
  29.     using System.IO;
  30.     using System.Reflection;
  31.    
  32.     // Represents exceptions thrown by the SUDSGenerator
  33.     [Serializable()]
  34.     public class SUDSGeneratorException : Exception
  35.     {
  36.         internal SUDSGeneratorException(string msg) : base(msg)
  37.         {
  38.         }
  39.        
  40.         protected SUDSGeneratorException(SerializationInfo info, StreamingContext context) : base(info, context)
  41.         {
  42.         }
  43.     }
  44.    
  45.     // This class generates SUDS documents
  46.     internal class SUDSGenerator
  47.     {
  48.         WsdlGenerator wsdlGenerator = null;
  49.         SdlType sdlType;
  50.         // Constructor
  51.         internal SUDSGenerator(Type[] types, SdlType sdlType, TextWriter output)
  52.         {
  53.             Util.Log("SUDSGenerator.SUDSGenerator 2");
  54.             wsdlGenerator = new WsdlGenerator(types, sdlType, output);
  55.             this.sdlType = sdlType;
  56.         }
  57.        
  58.         internal SUDSGenerator(ServiceType[] serviceTypes, SdlType sdlType, TextWriter output)
  59.         {
  60.             Util.Log("SUDSGenerator.SUDSGenerator 5 ");
  61.             wsdlGenerator = new WsdlGenerator(serviceTypes, sdlType, output);
  62.             this.sdlType = sdlType;
  63.         }
  64.        
  65.        
  66.         // Generates SUDS
  67.         internal void Generate()
  68.         {
  69.             Util.Log("SUDSGenerator.Generate");
  70.             wsdlGenerator.Generate();
  71.         }
  72.     }
  73. }

Developer Fusion