public override void Run() { log.Trace(this, String.Format(LoggingConstants.StartCustomStep, this.GetType().Name)); object[] realList; object rawList = (object)GetInput("List", typeof(object)); object item = (object)GetInput("Item", typeof(object)); if (rawList is object[]) { realList = (object[])rawList; } else if (rawList is string) { realList = (rawList as string).Split(";".ToCharArray()); } else throw new ArgumentException("Invalid List argument supplied. Must be an array or string."); string status = StatusConstants.Fail;; if (item != null) { foreach (object listItem in realList) { if (item.Equals(listItem)) { status = StatusConstants.Pass; break; } } } SetOutput("Status", status); log.Trace(this, String.Format(LoggingConstants.EndCustomStep, this.GetType().Name)); }
IEnumerable<string></string>
foreach
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)