/// <summary> Converts a <see cref="WxeVariableReference"/>'s value to its string representation. </summary> /// <param name="varRef"> /// The <see cref="WxeVariableReference"/> to be converted. The referenced value must be of assignable to the /// <see cref="WxeParameterDeclaration"/>'s <see cref="Type"/>. Must not be <see langword="null"/>. /// </param> /// <param name="callerVariables"> /// The optional list of caller variables. Used to dereference a <see cref="WxeVariableReference"/>. /// </param> /// <returns> /// A <see cref="string"/> or <see langword="null"/> if the conversion is not possible but the parameter is not /// required. /// </returns> /// <exception cref="WxeException"> Thrown if the value referenced by the <paramref name="varRef"/> could not be converted. </exception> protected string ConvertVarRefToString(WxeVariableReference varRef, NameObjectCollection callerVariables) { ArgumentUtility.CheckNotNull("varRef", varRef); if (callerVariables == null) { if (_parameter.Required) { throw new WxeException(string.Format( "Required IN parameter '{0}' is a Variable Reference but no caller variables have been provided.", _parameter.Name)); } return(null); } object value = callerVariables[_parameter.Name]; if (value is WxeVariableReference) { if (_parameter.Required) { throw new WxeException(string.Format( "Required IN parameter '{0}' is a Variable Reference but no caller variables have been provided.", _parameter.Name)); } return(null); } return(ConvertObjectToString(value)); }
public override bool Equals(object obj) { WxeVariableReference other = obj as WxeVariableReference; if (other == null) { return(false); } return(this._name == other._name); }
/// <summary> Converts a parameter's value to its string representation. </summary> /// <param name="value"> The value to be converted. Must be of assignable to the <see cref="Type"/>. </param> /// <param name="callerVariables"> /// The optional list of caller variables. Used to dereference a <see cref="WxeVariableReference"/>. /// </param> /// <returns> /// A <see cref="string"/> or <see langword="null"/> if the conversion is not possible but the parameter is not /// required. /// </returns> /// <exception cref="WxeException"> Thrown if the <paramref name="value"/> could not be converted. </exception> public string ConvertToString(object value, NameObjectCollection callerVariables) { CheckForRequiredOutParameter(); WxeVariableReference varRef = value as WxeVariableReference; if (varRef != null) { return(ConvertVarRefToString(varRef, callerVariables)); } return(ConvertObjectToString(value)); }
/// <summary> /// Calls the page using the resource directory of the assembly's type. /// </summary> public WxeResourcePageStep(Type resourceType, WxeVariableReference page) : this(resourceType.Assembly, page) { }
/// <summary> /// Calls the page using the assemby's resource directory. /// </summary> public WxeResourcePageStep(Assembly resourceAssembly, WxeVariableReference page) : base(new ResourceObjectWithVarRef(ResourcePathBuilder, resourceAssembly, page)) { }
/// <summary> /// Calls the page using the calling assemby's resource directory. /// </summary> public WxeResourcePageStep(WxeVariableReference page) : this(Assembly.GetCallingAssembly(), page) { }
/// <summary> Initializes a new instance of the <b>WxePageStep</b> type. </summary> /// <include file='..\doc\include\ExecutionEngine\WxePageStep.xml' path='WxePageStep/Ctor/param[@name="pageref"]' /> public WxePageStep(WxeVariableReference pageref) : this(new ResourceObjectWithVarRef(pageref)) { }
/// <summary> /// Calls the user controls using the assemby's resource directory. /// </summary> public WxeResourceUserControlStep(Assembly resourceAssembly, WxeVariableReference userControl) : base(new ResourceObjectWithVarRef(ResourcePathBuilder, resourceAssembly, userControl)) { }
/// <summary> /// Calls the user controls using the resource directory of the assembly's type. /// </summary> public WxeResourceUserControlStep(Type resourceType, WxeVariableReference userControl) : this(resourceType.Assembly, userControl) { }
/// <summary> /// Calls the user controls using the calling assemby's resource directory. /// </summary> public WxeResourceUserControlStep(WxeVariableReference userControl) : this(Assembly.GetCallingAssembly(), userControl) { }