public string Compile(CompilationParams compilationParams) { var template = new SharpTLDefaultTemplate(new TemplateVars { Schema = this, Namespace = compilationParams.Namespace, MethodsInterfaceName = compilationParams.MethodsInterfaceName }); return(template.TransformText()); }
public static string Compile(TLSchemaSourceType sourceType, string schemaText, CompilationParams compilationParams) { switch (sourceType) { case TLSchemaSourceType.TL: return CompileFromTL(schemaText, compilationParams); case TLSchemaSourceType.JSON: return CompileFromJson(schemaText, compilationParams); default: throw new ArgumentOutOfRangeException("sourceType"); } }
public string Compile(CompilationParams compilationParams) { var template = new SharpTLDefaultTemplate(new TemplateVars { Schema = this, Namespace = compilationParams.Namespace, MethodsInterfaceName = compilationParams.MethodsInterfaceName }); return template.TransformText(); }
public static string CompileFromJson(string json, CompilationParams compilationParams) { TLSchema schema = FromJson(json); return(schema.Compile(compilationParams)); }
public static string CompileFromTL(string tlSchemaText, CompilationParams compilationParams) { TLSchema schema = FromTL(tlSchemaText); return schema.Compile(compilationParams); }
public static string CompileFromJson(string json, CompilationParams compilationParams) { TLSchema schema = FromJson(json); return schema.Compile(compilationParams); }
public static string CompileFromTL(string tlSchemaText, CompilationParams compilationParams) { TLSchema schema = FromTL(tlSchemaText); return(schema.Compile(compilationParams)); }
public static string Compile(TLSchemaSourceType sourceType, string schemaText, CompilationParams compilationParams) { switch (sourceType) { case TLSchemaSourceType.TL: return(CompileFromTL(schemaText, compilationParams)); case TLSchemaSourceType.JSON: return(CompileFromJson(schemaText, compilationParams)); default: throw new ArgumentOutOfRangeException("sourceType"); } }