Show / Hide Table of Contents

Class TemplateObjectVisitor<TContext>

An object visitor

Inheritance
Object
TemplateObjectVisitor<TContext>
Implements
ITemplateObjectVisitor<TContext>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Firefly.CloudFormationParser.TemplateObjects.Traversal
Assembly: Firefly.CloudFormationParser.dll
Syntax
public abstract class TemplateObjectVisitor<TContext> : ITemplateObjectVisitor<TContext> where TContext : ITemplateObjectVisitorContext<TContext>
Type Parameters
Name Description
TContext

The type of the context.

Constructors

| Improve this Doc View Source

TemplateObjectVisitor(ITemplate)

Initializes a new instance of the TemplateObjectVisitor<TContext> class.

Declaration
protected TemplateObjectVisitor(ITemplate template)
Parameters
Type Name Description
ITemplate template

The parsed CloudFormation template.

Properties

| Improve this Doc View Source

Path

Gets the current path within the object graph.

Declaration
public PropertyPath Path { get; }
Property Value
Type Description
PropertyPath

The path.

| Improve this Doc View Source

Template

Gets a reference to the current parsed template.

This is needed when visiting child objects of a IBranchableIntrinsic such that the appropriate sub-properties of the intrinsic are visited according to the prevailing conditions.

Declaration
public ITemplate Template { get; }
Property Value
Type Description
ITemplate

The template.

Methods

| Improve this Doc View Source

DoAccept(Object, TContext)

Dispatches the Accept calls added as extension methods to the types of objects encountered in the deserialized YAML object graph.

Declaration
public void DoAccept(object objectInGraph, TContext context)
Parameters
Type Name Description
Object objectInGraph

The object.

TContext context

The context.

| Improve this Doc View Source

Visit(IIntrinsic, TContext)

Visits the specified intrinsic and dispatches to visit handler for each distinct subclass of IIntrinsic.

Declaration
protected virtual void Visit(IIntrinsic intrinsic, TContext context)
Parameters
Type Name Description
IIntrinsic intrinsic

The intrinsic.

TContext context

The context.

| Improve this Doc View Source

Visit(Boolean, TContext)

Visits the specified boolean value.

Declaration
protected virtual void Visit(bool booleanValue, TContext context)
Parameters
Type Name Description
Boolean booleanValue

if set to true [boolean value].

TContext context

The context.

| Improve this Doc View Source

Visit(Double, TContext)

Visits the specified double value.

Declaration
protected virtual void Visit(double doubleValue, TContext context)
Parameters
Type Name Description
Double doubleValue

The double value.

TContext context

The context.

| Improve this Doc View Source

Visit(Int32, TContext)

Visits the specified integer value.

Declaration
protected virtual void Visit(int integerValue, TContext context)
Parameters
Type Name Description
Int32 integerValue

The integer value.

TContext context

The context.

| Improve this Doc View Source

Visit(String, TContext)

Visits the specified string value.

Declaration
protected virtual void Visit(string stringValue, TContext context)
Parameters
Type Name Description
String stringValue

The string value.

TContext context

The context.

| Improve this Doc View Source

Visit<TKey>(IDictionary<TKey, Object>, TContext)

Visits the specified dictionary.

Declaration
protected virtual void Visit<TKey>(IDictionary<TKey, object> dict, TContext context)
Parameters
Type Name Description
IDictionary<TKey, Object> dict

The dictionary.

TContext context

The context.

Type Parameters
Name Description
TKey

The type of the key. This should be either string or object(string).

| Improve this Doc View Source

Visit<TItem>(IList<TItem>, TContext)

Visits the specified list.

Declaration
protected virtual void Visit<TItem>(IList<TItem> list, TContext context)
Parameters
Type Name Description
IList<TItem> list

The list.

TContext context

The context.

Type Parameters
Name Description
TItem

The type of the list item. This should be dictionary, list, intrinsic or any acceptable value type for CloudFormation.

| Improve this Doc View Source

Visit<TKey>(KeyValuePair<TKey, Object>, TContext)

Visits the specified property, i.e. KeyValuePair<TKey,TValue> of a dictionary object.

Declaration
protected virtual void Visit<TKey>(KeyValuePair<TKey, object> property, TContext context)
Parameters
Type Name Description
KeyValuePair<TKey, Object> property

The property.

TContext context

The context.

Type Parameters
Name Description
TKey

The type of the key. This should be either string or object(string).

| Improve this Doc View Source

VisitAbstractArrayIntrinsic(AbstractArrayIntrinsic, TContext)

Visits any derivative of AbstractArrayIntrinsic. Each item in the Items array of the intrinsic is visited.

Declaration
protected virtual void VisitAbstractArrayIntrinsic(AbstractArrayIntrinsic intrinsic, TContext context)
Parameters
Type Name Description
AbstractArrayIntrinsic intrinsic

The intrinsic.

TContext context

The context.

| Improve this Doc View Source

VisitAbstractScalarIntrinsic(AbstractScalarIntrinsic, TContext)

Visits any derivative of AbstractScalarIntrinsic.

Declaration
protected virtual void VisitAbstractScalarIntrinsic(AbstractScalarIntrinsic intrinsic, TContext context)
Parameters
Type Name Description
AbstractScalarIntrinsic intrinsic

The intrinsic.

TContext context

The context.

| Improve this Doc View Source

VisitBranchableIntrinsic(IBranchableIntrinsic, TContext)

Visits any derivatives of IBranchableIntrinsic, i.e. !If and !Select where only one branch of the intrinsic should be walked base don prevailing conditions.

Whilst both of these intrinsic functions are also inherited from AbstractScalarIntrinsic, this visitor takes precedence for these functions.

Declaration
protected virtual void VisitBranchableIntrinsic(IBranchableIntrinsic intrinsic, TContext context)
Parameters
Type Name Description
IBranchableIntrinsic intrinsic

The intrinsic.

TContext context

The context.

| Improve this Doc View Source

VisitSubIntrinsic(SubIntrinsic, TContext)

Visits !Sub intrinsic which is somewhat a special case, having both implicit and possibly additional explicit references as a dictionary. Each of these are visited.

Declaration
protected virtual void VisitSubIntrinsic(SubIntrinsic intrinsic, TContext context)
Parameters
Type Name Description
SubIntrinsic intrinsic

The intrinsic.

TContext context

The context.

Implements

ITemplateObjectVisitor<TContext>

See Also

ITemplateObjectVisitor<TContext>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX