示例#1
0
        public SchemaPrinter(
            ISchema schema,
            SchemaPrinterOptions options = null)
        {
            _schema = schema;
            Options = options ?? new SchemaPrinterOptions();

            if (Options.CustomScalars?.Count > 0)
            {
                _scalars.AddRange(Options.CustomScalars);
            }
        }
示例#2
0
        public SchemaPrinter(
            ISchema schema,
            SchemaPrinterOptions options = null)
        {
            _schema  = schema;
            _options = options ?? new SchemaPrinterOptions();

            if (_options.CustomScalars?.Count > 0)
            {
                _scalars.Fill(_options.CustomScalars);
            }
        }
示例#3
0
 /// <summary>
 /// Creates printer with the specified options.
 /// </summary>
 /// <param name="schema">Schema to print.</param>
 /// <param name="options">Printer options.</param>
 public SchemaPrinter(ISchema schema, SchemaPrinterOptions options = null)
 {
     Schema  = schema;
     Options = options ?? new SchemaPrinterOptions();
 }