Ejemplo n.º 1
0
        internal static string GenerateCode(string[] DocXsds, string DocTypeName, string DocRev, params string[] AdditionalRootNames)
        {
            string cSharpNameSpace = RuntimeTypeNamer.CalcCSharpNamespace(DocTypeName, DocRev, AdditionalRootNames);
            string myclasses_cs    = new Xsd().ImportSchemasAsClasses(
                DocXsds,
                cSharpNameSpace,
                CodeGenerationOptions.GenerateOrder | CodeGenerationOptions.GenerateProperties,
                new StringCollection());

            return(CustomizeXsdToCSharpOutput(DocTypeName, myclasses_cs));
        }
Ejemplo n.º 2
0
 /// <summary>
 ///     Utilizes .Net API that drives XSD.EXE to auto-gen cSharp code that is further modified to suite this solution &
 ///     finally runtime compiled to yield another BaseDoc. Unix guys might think of this as a SED script.
 /// </summary>
 /// <param name="DocXsd"></param>
 /// <param name="DocTypeName"></param>
 /// <param name="DocRev"></param>
 /// <param name="cSharpNameSpace"></param>
 /// <returns></returns>
 internal static Assembly MakeBaseDocAssembly(string[] DocXsds, string DocTypeName, string DocRev, params string[] AdditionalRootNames)
 {
     return(CompileCSharpCode(() =>
                              GenerateCode(DocXsds, DocTypeName, DocRev, AdditionalRootNames),
                              RuntimeTypeNamer.CalcCSharpNamespace(DocTypeName, DocRev, AdditionalRootNames)));
 }