/// <summary> /// Merges the specified configuration setttings into this instance. /// </summary> /// <param name="config">The configuration.</param> public void Merge(ISchemaResponseConfiguration config) { if (config == null) { return; } this.IndentDocument = config.IndentDocument; this.ExposeExceptions = config.ExposeExceptions; this.ExposeMetrics = config.ExposeMetrics; this.AppendServerHeader = config.AppendServerHeader; this.MessageSeverityLevel = config.MessageSeverityLevel; this.TimeStampLocalizer = config.TimeStampLocalizer; }
/// <summary> /// Initializes a new instance of the <see cref="SchemaConfiguration" /> class. /// </summary> /// <param name="declarationOptions">The declaration options to build the configuration with.</param> /// <param name="executionOptions">The execution options to build the configuration with.</param> /// <param name="responseOptions">The response options to build the configuration with.</param> /// <param name="cacheOptions">The cache options to build this configuration with.</param> public SchemaConfiguration( ISchemaDeclarationConfiguration declarationOptions = null, ISchemaExecutionConfiguration executionOptions = null, ISchemaResponseConfiguration responseOptions = null, ISchemaQueryPlanCacheConfiguration cacheOptions = null) { _declarationOptions = new SchemaDeclarationConfiguration(); _executionOptions = new SchemaExecutionConfiguration(); _responseOptions = new SchemaResponseConfiguration(); _cacheOptions = new SchemaQueryPlanCacheConfiguration(); _declarationOptions.Merge(declarationOptions); _executionOptions.Merge(executionOptions); _responseOptions.Merge(responseOptions); _cacheOptions.Merge(cacheOptions); }