Struct serde_generate::csharp::CodeGenerator
source · pub struct CodeGenerator<'a> { /* private fields */ }
Expand description
Main configuration object for code-generation in C#.
Implementations§
source§impl<'a> CodeGenerator<'a>
impl<'a> CodeGenerator<'a>
sourcepub fn new(config: &'a CodeGeneratorConfig) -> Self
pub fn new(config: &'a CodeGeneratorConfig) -> Self
Create a C# code generator for the given config.
sourcepub fn write_source_files(
&self,
install_dir: PathBuf,
registry: &Registry
) -> Result<PathBuf>
pub fn write_source_files( &self, install_dir: PathBuf, registry: &Registry ) -> Result<PathBuf>
Output class definitions for registry
in separate source files.
Source files will be created in a subdirectory of install_dir
corresponding to the given
package name (if any, otherwise install_dir
itself).