static T4LexerGenerated() { foreach (var keyword in DirectiveTypes.Cast <TokenNodeType>()) { Directives[keyword.TokenRepresentation] = (T4TokenNodeType)keyword; } }
private RuleDirective CreateGroupingDirective(IElementContainer grouping, DirectiveTypes directiveType) { return(new RuleDirective { DirectiveType = directiveType, ElementGrouping = GetGroupingType(grouping), }); }
public override XamlType GetDirectiveType(string name) { XaslType dirType = null; if (!DirectiveTypes.TryGetValue(name, out dirType)) { // throw in the early versions, do something better for error path. throw new KeyNotFoundException(SR.Get(SRID.DirectiveNotFound, name, this.TargetNamespace)); } return(dirType); }
internal Schema(SchemaDefinition definition) { if (definition == null) { throw new ArgumentNullException(nameof(definition)); } Description = definition.Description; Directives = definition.Directives; Services = definition.Services; Options = definition.Options; DirectiveTypes = definition.DirectiveTypes; _types = new SchemaTypes(definition); _directiveTypes = DirectiveTypes.ToDictionary(t => t.Name); }
internal void CompleteSchema( SchemaTypesDefinition schemaTypesDefinition) { if (schemaTypesDefinition == null) { throw new ArgumentNullException(nameof(schemaTypesDefinition)); } if (_sealed) { throw new InvalidOperationException( "This schema is already sealed and cannot be mutated."); } DirectiveTypes = schemaTypesDefinition.DirectiveTypes; _types = new SchemaTypes(schemaTypesDefinition); _directiveTypes = DirectiveTypes.ToDictionary(t => t.Name); _sealed = true; }
protected Directive(DirectiveTypes type, ArgumentCollection arguments) { this.UniqueId = Guid.NewGuid().ToString(); this.Mother = null; this.Parent = null; this.UpdateBlockIds = new List <string>(); this.Type = type; this.Arguments = arguments ?? new ArgumentCollection(); this.Scheduler = new DirectiveScheduler( uniqueId => { this.Mother.Pool.GetByUniqueId(uniqueId, out IDirective directive); directive?.Render(); } ); this.Result = string.Empty; }
protected Directive(int rawStartIndex, string rawValue, DirectiveTypes directiveType, Global.ArgumentInfoCollection contentArguments) : base(rawStartIndex, rawValue, ControllerTypes.Directive, contentArguments) { this.DirectiveType = directiveType; }
public DirectiveFactory(DirectiveTypes type, string rawValue) { this.DirectiveType = type; this.RawValue = rawValue; }