/// <summary> /// ContextLoaderStepBuilder constructor. /// </summary> /// /// <param name='typeName'>The type name of the test step to be created by the builder.</param> /// <param name='assemblyPath'>The assembly path name of the context loader sub step to /// be created by the builder.</param> public ContextLoaderStepBuilder(string typeName, string assemblyPath) : base(typeName, assemblyPath) { ArgumentValidation.CheckForEmptyString(typeName, "typeName"); // assemblyPath - optional _contextLoaderStep = testStep as IContextLoaderStepOM; if (null == _contextLoaderStep) { throw new ArgumentException("The validation step created is invalid: IContextLoaderStepOM is not implemented"); } }
public void ExecuteContextLoader(Stream data, IContextLoaderStepOM contextLoaderStep, bool seekStream) { if (seekStream && null != data) { data.Seek(0, SeekOrigin.Begin); } _bizUnit.ExecuteContextLoader(data, contextLoaderStep, this); }
public void ExecuteContextLoader(Stream data, IContextLoaderStepOM contextLoaderStep) { ExecuteContextLoader(data, contextLoaderStep, false); }
public void ExecuteContextLoader(Stream data, XmlNode contextConfig, IContextLoaderStepOM contextLoaderStep, bool seekStream) { if (null != contextLoaderStep && null != contextConfig) { throw new ApplicationException( "Cannot execute a context loader step using both Xml configuration and the BizUnit OM"); } ExecuteContextLoader(data, contextLoaderStep, seekStream); ExecuteContextLoader(data, contextConfig, seekStream); }
public void ExecuteContextLoader(Stream data, XmlNode contextConfig, IContextLoaderStepOM contextLoaderStep) { ExecuteContextLoader(data, contextConfig, contextLoaderStep, false); }
internal void ExecuteContextLoader(Stream data, IContextLoaderStepOM contextLoaderStep, Context ctx) { if (null == contextLoaderStep) { return; } _logger.ContextLoaderStart(contextLoaderStep.GetType().ToString(), DateTime.Now); try { contextLoaderStep.ExecuteContextLoader(data, ctx); } catch (Exception ex) { _logger.ContextLoaderEnd(contextLoaderStep.GetType().ToString(), DateTime.Now, ex); throw; } _logger.ContextLoaderEnd(contextLoaderStep.GetType().ToString(), DateTime.Now, null); }