private void Initialize(DirectiveConfig config) { if (config == null) { throw new ArgumentNullException(nameof(config)); } if (string.IsNullOrEmpty(config.Name)) { throw new ArgumentException( "A directive name must not be null or empty.", nameof(config)); } SyntaxNode = config.SyntaxNode; Name = config.Name; Description = config.Description; Locations = config.Locations.ToImmutableList();; Arguments = config.Arguments.ToImmutableDictionary(t => t.Name); }
internal Directive(DirectiveConfig config) { Initialize(config); }