Click or drag to resize
weroSoft AG, Software
ForStatement Class
The documentation is integral part of the weroSoft product documentation. This part is intended to be used by developers only.
Implements the HPL 'for' statement.
Inheritance Hierarchy

Namespace:  WeroSoft.Workflow.Statements
Assembly:  WeroSoft.Workflow.Core.Library (in WeroSoft.Workflow.Core.Library.dll) Version: 3.0 Pre-Release
Syntax
C#
public sealed class ForStatement : IterationStatement, 
	IVariableProviderStatement
Remarks

The for statement executes a statement or a block of statements while a specified Boolean expression evaluates to true. At any point within the for statement block, you can break out of the loop by using the break statement, or step to the next iteration in the loop by using the continue statement.You can also exit a for loop by the return, or throw statements.

The for statement in HPL defines the following HPL properties:
  • Name: The name of the loop. This name can be used for getting the effective value of loop executions.
  • VariableTypeName: The type used for in-line definition of the loop variable.
  • VariableName: The name of the in-line defined loop variable.
  • Initializer: The initiation expression of the loop variable.
  • Condition: The condition expression used for controlling the loop.
  • Iterator: The iteration expression used for controlling the loop.
Examples

This code sample shows HPL code:

The code below shows a fully qualified for statement with in-line defined variable.
// Full featured for loop.
trace(TraceLevel.Info, "Start Demo")
for (int counter = 0; counter < 100; counter++)
   trace(TraceLevel.Info, forDemo)
   if (counter % 10 == 0)
      counter += 10
trace(TraceLevel.Info, "End of Demo")

The ForStatement type exposes the following members.

Constructors
  NameDescription
Public methodForStatement
Initializes a new instance of the ForStatement class
Top
Properties
  NameDescription
Public propertyCondition
Gets or sets the condition expression of the for statement.
Public propertyExecutionState
Gets a value indicating the execution state of the statement.
(Inherited from Statement.)
Public propertyId
Gets or sets the identifier of the statement.
(Inherited from Statement.)
Public propertyIndentation
Gets the indentation of this particular statement within a expression tree.
(Inherited from Statement.)
Public propertyInitializer
Gets or sets the initializer expression of the for statement.
Public propertyIsContinuing
Gets a value indicating whether the loop shall continue looping.
(Inherited from IterationStatement.)
Public propertyIsDeactivated
Gets or sets a value indicating whether the statement is deactivated from hierarchy or not.
(Inherited from Statement.)
Public propertyIsDeactivating
Gets or sets a value indicating whether the statement is deactivated and is deactivating its sub-ordinary statements or not.
(Inherited from Statement.)
Public propertyIsExecutionClone
Gets a value indicating whether this statement is an execution clone.
(Inherited from Statement.)
Public propertyIsFirstAchievement
Gets a value indicating whether the first looping
(Inherited from IterationStatement.)
Public propertyIsStatementDeactivated
Gets a value indicating whether the statement is deactivated or not.
(Inherited from Statement.)
Public propertyItem
Gets the statement property.
(Inherited from Statement.)
Public propertyIterationCount
Gets the iteration count of the iteration statement.
(Inherited from IterationStatement.)
Public propertyIterator
Gets or sets the iterator expression of the for statement.
Public propertyMetaInfo
Gets the meta information of the statement.
(Inherited from Statement.)
Public propertyModificationState
Gets a value indicating whether any property of the statement has been modified.
(Inherited from Statement.)
Public propertyName
Gets or sets the name of the iteration statement.
(Inherited from IterationStatement.)
Public propertyParent
Gets the parent of the statement.
(Inherited from Statement.)
Public propertyPathName
Gets the path name.
(Inherited from Statement.)
Public propertyProgrammingName
Gets the programming name of the statement.
(Inherited from Statement.)
Public propertyStatementLine
Gets the string representing the statement in the code.
(Inherited from Statement.)
Public propertyStatements
Gets the child statements within the HPL syntax tree.
(Inherited from StructureStatement.)
Public propertyTypeFullName
Gets the type name with the name space.
(Inherited from Statement.)
Public propertyTypeName
Gets the type name of the statement without its name space.
(Inherited from Statement.)
Public propertyVariableName
Gets or sets the name of the variable used for iteration control.
Public propertyVariableTypeName
Gets or sets the type of the variable used for iteration control.
Top
Methods
  NameDescription
Public methodAborted
Default implementation of the event handler Aborted.
(Inherited from Statement.)
Public methodAnalyzed
Default implementation of the event handler Analyzed.
(Inherited from Statement.)
Public methodAnalyzing (Overrides IterationStatementAnalyzing(Object, StatementAnalysisEventArgs).)
Public methodApplyRestoreInfo
Applies the restore information from the restore point to this command.
(Inherited from IterationStatement.)
Public methodChanged
Default implementation of the event handler Changed.
(Inherited from Statement.)
Public methodCleanupAnalysis
Cleanup of the analysis.
(Inherited from IterationStatement.)
Public methodCreated
Default implementation of the event handler Created.
(Inherited from Statement.)
Public methodCreateStatementLine
Creates the statement line.
Public methodCreating
Default implementation of the event handler Creating.
(Inherited from Statement.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodError
Default implementation of the event handler Error.
(Inherited from Statement.)
Public methodExecute
Implements the execution of the statement.
(Overrides IterationStatementExecute(Object, StatementExecutionEventArgs).)
Public methodExecuted
Default implementation of the event handler Executed.
(Inherited from Statement.)
Public methodExecuting (Overrides StatementExecuting(Object, StatementExecutionEventArgs).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetProperties
Gets a read only collection of cloned properties of the statement.
(Inherited from Statement.)
Public methodGetStatementLine
Gets the signature representing the statement in the code.
(Inherited from Statement.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVariable
Gets the variable if one is defined.
Public methodLoaded
Default implementation of the event handler Loaded.
(Inherited from Statement.)
Public methodMigrate
Default implementation of the event handler Migrate.
(Inherited from Statement.)
Public methodRegisterRestoreInfo
Registers the restore information from this command to the restore point.
(Inherited from IterationStatement.)
Public methodSaved
Default implementation of the event handler Saved.
(Inherited from Statement.)
Public methodSaving
Default implementation of the event handler Saving.
(Inherited from Statement.)
Public methodToString
Returns the statement standard layout.
(Inherited from Statement.)
Top
Fields
  NameDescription
Public fieldStatic memberConditionProperty
Gets the name of the property 'Condition' as a string.
Public fieldStatic memberInitializerProperty
Gets the name of the property 'Initializer' as a string.
Public fieldStatic memberIteratorProperty
Gets the name of the property 'Iterator' as a string.
Public fieldStatic memberVariableNameProperty
Gets the name of the property 'VariableName' as a string.
Public fieldStatic memberVariableTypeNameProperty
Gets the name of the property 'VariableTypeName' as a string.
Top
Extension Methods
  NameDescription
Public Extension MethodClone(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodCloneT(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodConvert (Defined by DataConverterExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String)Overloaded.
Creates a data entry into a string builder according to the giving parameters.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry for a data element.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry into a string builder.
(Defined by TraceExtensions.)
Public Extension MethodDynamicCast
Dynamically casts a reference to another type.
(Defined by TypeManagerHelper.)
Public Extension MethodExtractSystemParametersFromTrigger
Extracts the system parameters from a collection of trigger parameter and transform them to a dictionary using string keys and string values.
(Defined by TriggerExtensions.)
Public Extension MethodGetFieldValue(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetFieldValueT(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValue(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValueT(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodInject(Type, Object)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInject(Type, Object, Boolean)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInjectField
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Type, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInvoke(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodInvokeTResult(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodSetFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetPropertyValue
Sets the data object on a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetReadOnlyFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodTryInjectProperty
Tries to Inject a value to a property within a data object.
(Defined by DataInjection.)
Top
See Also