Exemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="program">Program</param>
 /// <param name="namespaceNode">NamespaceDeclaration</param>
 /// <param name="isMonitor">Is a monitor</param>
 /// <param name="modSet">Modifier set</param>
 internal MachineDeclaration(IPSharpProgram program, NamespaceDeclaration namespaceNode,
                             bool isMonitor, ModifierSet modSet)
     : base(program)
 {
     this.Namespace              = namespaceNode;
     this.IsMonitor              = isMonitor;
     this.AccessModifier         = modSet.AccessModifier;
     this.InheritanceModifier    = modSet.InheritanceModifier;
     this.IsPartial              = modSet.IsPartial;
     this.BaseNameTokens         = new List <Token>();
     this.EventDeclarations      = new EventDeclarations();
     this.FieldDeclarations      = new List <FieldDeclaration>();
     this.StateDeclarations      = new List <StateDeclaration>();
     this.StateGroupDeclarations = new List <StateGroupDeclaration>();
     this.MethodDeclarations     = new List <MethodDeclaration>();
     this.RewrittenMethods       = new HashSet <QualifiedMethod>();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="program">Program</param>
 /// <param name="machineNode">MachineDeclarationNode</param>
 /// <param name="groupNode">StateGroupDeclaration</param>
 /// <param name="modSet">Modifier set</param>
 internal StateDeclaration(IPSharpProgram program, MachineDeclaration machineNode,
                           StateGroupDeclaration groupNode, ModifierSet modSet)
     : base(program)
 {
     this.Machine                       = machineNode;
     this.Group                         = groupNode;
     this.AccessModifier                = modSet.AccessModifier;
     this.IsStart                       = modSet.IsStart;
     this.IsHot                         = modSet.IsHot;
     this.IsCold                        = modSet.IsCold;
     this.GotoStateTransitions          = new Dictionary <Token, List <Token> >();
     this.PushStateTransitions          = new Dictionary <Token, List <Token> >();
     this.ActionBindings                = new Dictionary <Token, Token>();
     this.TransitionsOnExitActions      = new Dictionary <Token, AnonymousActionHandler>();
     this.ActionHandlers                = new Dictionary <Token, AnonymousActionHandler>();
     this.DeferredEvents                = new HashSet <Token>();
     this.IgnoredEvents                 = new HashSet <Token>();
     this.ResolvedEventIdentifierTokens = new Dictionary <Token, Tuple <List <Token>, int> >();
     this.RewrittenMethods              = new HashSet <QualifiedMethod>();
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="program">Program</param>
 /// <param name="machineNode">MachineDeclarationNode</param>
 /// <param name="groupNode">StateGroupDeclaration</param>
 /// <param name="modSet">Modifier set</param>
 internal StateDeclaration(IPSharpProgram program, MachineDeclaration machineNode,
                           StateGroupDeclaration groupNode, ModifierSet modSet)
     : base(program)
 {
     this.Machine                       = machineNode;
     this.Group                         = groupNode;
     this.AccessModifier                = modSet.AccessModifier;
     this.IsStart                       = modSet.IsStart;
     this.IsHot                         = modSet.IsHot;
     this.IsCold                        = modSet.IsCold;
     this.IsAbstract                    = modSet.InheritanceModifier == InheritanceModifier.Abstract;
     this.GotoStateTransitions          = new Dictionary <Token, List <Token> >();
     this.PushStateTransitions          = new Dictionary <Token, List <Token> >();
     this.ActionBindings                = new Dictionary <Token, Token>();
     this.TransitionsOnExitActions      = new Dictionary <Token, AnonymousActionHandler>();
     this.ActionHandlers                = new Dictionary <Token, AnonymousActionHandler>();
     this.DeferredEvents                = new HashSet <Token>();
     this.IgnoredEvents                 = new HashSet <Token>();
     this.ResolvedEventIdentifierTokens = new Dictionary <Token, Tuple <List <Token>, int> >();
     this.RewrittenMethods              = new HashSet <QualifiedMethod>();
     this.isNameofSupported             = base.Program.GetProject().CompilationContext.Configuration.IsRewriteCSharpVersion(6, 0);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventDeclaration"/> class.
 /// </summary>
 internal EventDeclaration(IPSharpProgram program, MachineDeclaration machineNode, ModifierSet modSet)
     : base(program)
 {
     this.Machine            = machineNode;
     this.AccessModifier     = modSet.AccessModifier;
     this.GenericType        = new List <Token>();
     this.PayloadTypes       = new List <Token>();
     this.PayloadIdentifiers = new List <Token>();
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="program">Program</param>
 /// <param name="machineNode">MachineDeclarationNode</param>
 /// <param name="modSet">Modifier set</param>
 internal FieldDeclaration(IPSharpProgram program, MachineDeclaration machineNode, ModifierSet modSet)
     : base(program)
 {
     this.Machine        = machineNode;
     this.AccessModifier = modSet.AccessModifier;
 }