ClassSentence
The structure representation of a sentence
Definition
Namespace:ArtOfTest.Common.Design.Extensibility
Assembly:ArtOfTest.WebAii.Design.dll
Syntax:
public sealed class Sentence
Inheritance: objectSentence
Properties
Descriptor
Gets the descriptor associated with this Sentence.
Declaration
public AutomationDescriptor Descriptor { get; }
Property Value
DisplayName
Gets the display name for this sentence.
ExtendedEditParamInfo
Exteneded EditParam info
Declaration
public DescriptorValueStore ExtendedEditParamInfo { get; }
Property Value
HasLiveDescriptor
Gets whether the descriptor associated with this sentence has a live descriptor (i.e. has its Targets[] collection initialized with live Elements)
IsExecutionContext
Get whether the sentence is build in the execution context (for instance the logical step execution). ///
IsValid
Whether all the sentence param are set.
Params
Gets the dictionary of params. The key is the parameter PropertyName.
Declaration
public IDictionary<string, SentenceParam> Params { get; }
Property Value
ParamsList
Gets the SentenceParam list of this Sentence (in correct order as per the definition)
Declaration
public IList<SentenceParam> ParamsList { get; }
Property Value
PreviewString
Get a string representation of this sentence. Ignore properties that are not set
Declaration
public string PreviewString { get; }
Property Value
The string representation
Methods
AssignDescriptor(AutomationDescriptor)
Assign a descriptor to this sentence
Declaration
public void AssignDescriptor(AutomationDescriptor descriptor)
Parameters
descriptor
CreateNew(AutomationDescriptor, bool, bool)
Given a descriptor, build a sentence from it. Will use the first sentence definition if multiple is defined.
Declaration
public static Sentence CreateNew(AutomationDescriptor descriptor, bool throwOnError, bool isExecutionContext)
Parameters
descriptor
throwOnError
isExecutionContext
Returns
GeneratePreviewList()
Generate a list of preview sentences
Declaration
public Sentence[] GeneratePreviewList()
Returns
Sentence[]
The list of preview sentences
GetSentenceDefinitions(Type)
Given a type, return any sentence definitions set on it.
Declaration
public static SentenceAttribute[] GetSentenceDefinitions(Type type)
Parameters
type
Returns
OnLoad()
Called when the UI is about to load this sentence
Declaration
public void OnLoad()
PerformVerificationValidation()
If the descritpor associated with this sentence if a VerificationDescriptor and has a live descriptor, this method will perform the validation as if the descriptor is being executed
Declaration
public string PerformVerificationValidation()
Returns
String.Empty or an error message
PersistToDescriptor()
Persist the values of this sentence to its associated descritpr
Declaration
public void PersistToDescriptor()
PopulateExtendEditInfo()
Populates any extended edit parameter info.
Declaration
public void PopulateExtendEditInfo()
PopulateParamValues()
Populate the param values of the sentence from the associated descriptor
Declaration
public void PopulateParamValues()
PopulateParamValues(DescriptorValueStore, bool)
Given a value store, populate the sentence param values
Declaration
public void PopulateParamValues(DescriptorValueStore valuesStore, bool populateMissingValuesFromDescriptor)
Parameters
valuesStore
The param values (if any) else null
populateMissingValuesFromDescriptor
When set, the function will populate the sentence values from their corresponding descriptor property values. Else will use the valueStore only.
ToString()
The sentence defintion