Show / Hide Table of Contents

Class AbstractIntrinsic

Abstract base class for CloudFormation intrinsics

Inheritance
Object
AbstractIntrinsic
AbstractArrayIntrinsic
AbstractScalarIntrinsic
SubIntrinsic
Implements
IIntrinsic
IEnumerable<Object>
IEnumerable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Firefly.CloudFormationParser.Intrinsics.Abstractions
Assembly: Firefly.CloudFormationParser.dll
Syntax
public abstract class AbstractIntrinsic : IIntrinsic, IEnumerable<object>, IEnumerable

Constructors

| Improve this Doc View Source

AbstractIntrinsic()

Initializes a new instance of the AbstractIntrinsic class.

Declaration
protected AbstractIntrinsic()
| Improve this Doc View Source

AbstractIntrinsic(Object)

Initializes a new instance of the AbstractIntrinsic class.

Declaration
protected AbstractIntrinsic(object value)
Parameters
Type Name Description
Object value

The value.

| Improve this Doc View Source

AbstractIntrinsic(Object, Boolean)

Initializes a new instance of the AbstractIntrinsic class.

Declaration
protected AbstractIntrinsic(object value, bool useLongForm)
Parameters
Type Name Description
Object value

The value.

Boolean useLongForm

If set to true, emit long form of intrinsic when serializing.

Properties

| Improve this Doc View Source

ExtraData

Gets or sets the extra data.

Declaration
public object ExtraData { get; set; }
Property Value
Type Description
Object

The extra data that may be stored against an intrinsic instance by client applications.

| Improve this Doc View Source

LongName

Gets the long name of the intrinsic.

Declaration
public abstract string LongName { get; }
Property Value
Type Description
String

The long name.

| Improve this Doc View Source

TagName

Gets the YAML tag name.

Declaration
public abstract string TagName { get; }
Property Value
Type Description
String

The name of the tag.

| Improve this Doc View Source

Type

Gets the intrinsic type for this intrinsic.

Declaration
public abstract IntrinsicType Type { get; }
Property Value
Type Description
IntrinsicType

The type.

| Improve this Doc View Source

UseLongForm

Gets a value indicating whether to use the long form when serializing.

Declaration
public bool UseLongForm { get; }
Property Value
Type Description
Boolean

true if long form should be used; otherwise, false.

Methods

| Improve this Doc View Source

Evaluate(ITemplate)

Evaluates the result of the intrinsic function.

Declaration
public abstract object Evaluate(ITemplate template)
Parameters
Type Name Description
ITemplate template

Reference to the template being processed

Returns
Type Description
Object

The result.

| Improve this Doc View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<object> GetEnumerator()
Returns
Type Description
IEnumerator<Object>

An enumerator that can be used to iterate through the collection.

| Improve this Doc View Source

GetReferencedObjects(ITemplate)

Gets a list of referenced resources and/or parameters in this expression

Declaration
public abstract IEnumerable<string> GetReferencedObjects(ITemplate template)
Parameters
Type Name Description
ITemplate template

Reference to the template being processed

Returns
Type Description
IEnumerable<String>

List of references

| Improve this Doc View Source

SetValue(IEnumerable<Object>)

Sets the values for the intrinsic.

This is a list of objects, whose length depends on the number of properties (usually list elements) supported by the intrinsic. Each element depending on the intrinsic, may be a scalar value, another intrinsic or another list of items e.g. for !Join or !Select

Declaration
protected abstract void SetValue(IEnumerable<object> values)
Parameters
Type Name Description
IEnumerable<Object> values

Values to assign to the intrinsic

| Improve this Doc View Source

SetValue(Object)

Sets the values for the intrinsic.

This is a single scalar or intrinsic object or a list of objects. This is a convenience method which wraps a scalar and then calls SetValue(IEnumerable<Object>)

Declaration
protected void SetValue(object value)
Parameters
Type Name Description
Object value

Value to assign to the intrinsic

| Improve this Doc View Source

UnpackIntrinsic(Object)

Unpack an intrinsic from a long form dictionary entry e.g. { "Fn::Sub", SubIntrinsic }

Declaration
protected object UnpackIntrinsic(object value)
Parameters
Type Name Description
Object value

The value to unpack.

Returns
Type Description
Object

If value is a long form intrinsic, then the intrinsic else the original object.

| Improve this Doc View Source

ValidateValues(Int32, Int32, IList<Object>)

Performs some validation on the number of values being set on this intrinsic.

Declaration
protected void ValidateValues(int minValues, int maxValues, IList<object> values)
Parameters
Type Name Description
Int32 minValues

The minimum values.

Int32 maxValues

The maximum values.

IList<Object> values

The values.

Exceptions
Type Condition
ArgumentException

Number of values being assigned is outside the min and max constraints,

| Improve this Doc View Source

WriteYaml(IEmitter, IValueSerializer)

Writes this intrinsic to a YAML emitter.

Declaration
public void WriteYaml(IEmitter emitter, IValueSerializer nestedValueSerializer)
Parameters
Type Name Description
YamlDotNet.Core.IEmitter emitter

The emitter.

YamlDotNet.Serialization.IValueSerializer nestedValueSerializer

An YamlDotNet.Serialization.IValueSerializer with which to write nested objects such as dictionaries.

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
IEnumerator

An IEnumerator object that can be used to iterate through the collection.

Implements

IIntrinsic
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

See Also

IIntrinsic
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX