Example #1
0
 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");
     }
 }
Example #2
0
 public static TLSchema Build(TLSchemaSourceType sourceType, string schemaText)
 {
     switch (sourceType)
     {
         case TLSchemaSourceType.TL:
             return FromTL(schemaText);
         case TLSchemaSourceType.JSON:
             return FromJson(schemaText);
         default:
             throw new ArgumentOutOfRangeException("sourceType");
     }
 }