//--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (EventSourceToken != null)
     {
         EventSourceToken = visitor(item, EventSourceToken);
     }
 }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (Bucket != null)
     {
         Bucket = visitor(item, Bucket);
     }
 }
Example #3
0
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (TopicName != null)
     {
         TopicName = visitor(item, TopicName);
     }
 }
Example #4
0
 //--- Constructors ---
 public VariableItem(
     AModuleItem parent,
     string name,
     string description,
     string type,
     IList <string> scope,
     object reference
     ) : base(parent, name, description, type, scope, reference)
 {
 }
Example #5
0
 //--- Constructors ---
 public PackageItem(
     AModuleItem parent,
     string name,
     string description,
     IList <string> scope,
     IList <KeyValuePair <string, string> > files
     ) : base(parent, name, description, "String", scope, false)
 {
     Files = files ?? throw new ArgumentNullException(nameof(files));
 }
Example #6
0
 //--- Constructors ---
 public ResourceItem(
     AModuleItem parent,
     string name,
     string description,
     IList <string> scope,
     Humidifier.Resource resource,
     string resourceExportAttribute,
     IList <string> dependsOn,
     string condition,
     IList <object> pragmas
     ) : base(parent, name, description, (resource is Humidifier.CustomResource customResource) ? customResource.OriginalTypeName : resource.AWSTypeName, scope, reference: null, dependsOn, condition, pragmas)
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (EventBus != null)
     {
         EventBus = visitor(item, EventBus);
     }
     if (Pattern != null)
     {
         Pattern = visitor(item, Pattern);
     }
 }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (Queue != null)
     {
         Queue = visitor(item, Queue);
     }
     if (BatchSize != null)
     {
         BatchSize = visitor(item, BatchSize);
     }
 }
Example #9
0
 //--- Constructors ---
 public PackageItem(
     AModuleItem parent,
     string name,
     string description,
     IList <string> scope,
     string files,
     string build
     ) : base(parent, name, description, "String", scope, reference: null)
 {
     Files = files ?? throw new ArgumentNullException(nameof(files));
     Build = build;
 }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (Kinesis != null)
     {
         Kinesis = visitor(item, Kinesis);
     }
     if (BatchSize != null)
     {
         BatchSize = visitor(item, BatchSize);
     }
     if (StartingPosition != null)
     {
         StartingPosition = visitor(item, StartingPosition);
     }
 }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     if (DynamoDB != null)
     {
         DynamoDB = visitor(item, DynamoDB);
     }
     if (BatchSize != null)
     {
         BatchSize = visitor(item, BatchSize);
     }
     if (StartingPosition != null)
     {
         StartingPosition = visitor(item, StartingPosition);
     }
 }
Example #12
0
 //--- Constructors ---
 public AResourceItem(
     AModuleItem parent,
     string name,
     string description,
     string type,
     IList <string> scope,
     object reference,
     IList <string> dependsOn,
     string condition,
     IList <object> pragmas
     ) : base(parent, name, description, type, scope, reference)
 {
     DependsOn = dependsOn ?? Array.Empty <string>();
     Condition = condition;
     Pragmas   = pragmas ?? Array.Empty <object>();
 }
Example #13
0
 //--- Constructors ---
 public ParameterItem(
     AModuleItem parent,
     string name,
     string section,
     string label,
     string description,
     string type,
     IList <string> scope,
     object reference,
     Humidifier.Parameter parameter,
     string import
     ) : base(parent, name, description, type, scope, reference)
 {
     Section   = section ?? "Module Settings";
     Label     = label;
     Parameter = parameter;
     Import    = import;
 }
Example #14
0
 //--- Constructors ---
 public AModuleItem(
     AModuleItem parent,
     string name,
     string description,
     string type,
     IList <string> scope,
     object reference
     )
 {
     Name     = name ?? throw new ArgumentNullException(nameof(name));;
     FullName = (parent == null)
         ? name
         : parent.FullName + "::" + name;
     Description = description;
     LogicalId   = (parent == null)
         ? name
         : parent.LogicalId + name;
     ResourceName = "@" + LogicalId;
     Reference    = reference;
     Type         = type ?? throw new ArgumentNullException(nameof(type));
     Scope        = scope ?? Array.Empty <string>();
 }
Example #15
0
        //--- Constructors ---
        public AModuleItem(
            AModuleItem parent,
            string name,
            string description,
            string type,
            IList <string> scope,
            object reference
            )
        {
            Name     = name ?? throw new ArgumentNullException(nameof(name));;
            FullName = (parent == null)
                ? name
                : parent.FullName + "::" + name;
            Description = description;

            // TODO (2018-11-29, bjorg): logical ID should be computed by module builder to disambiguate hierarchical names when name collisions occur
            LogicalId = (parent == null)
                ? name
                : parent.LogicalId + name;
            ResourceName = "@" + LogicalId;
            Reference    = reference;
            Type         = type ?? throw new ArgumentNullException(nameof(type));
            Scope        = scope ?? new string[0];
        }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
 }
 //--- Methods ---
 public override void Visit(AModuleItem item, ModuleVisitorDelegate visitor)
 {
     Expression = visitor(item, Expression);
 }
 //--- Abstract Methods ---
 public abstract void Visit(AModuleItem item, ModuleVisitorDelegate visitor);