public override IEnumerator Execute(UTContext context) { if (startOfSubtree == null) { Debug.LogError("No subtree specified."); yield break; } Dictionary <string, bool> SDK_Channel = context["SDK_Channel"] as Dictionary <string, bool>; Debug.Log("For Each: Items == " + SDK_Channel); var i = 0; if (SDK_Channel is IEnumerable) { foreach (string channelID in (IEnumerable)SDK_Channel.Keys) { i++; Debug.Log("For Each: i == " + i + " channelID==" + channelID); Debug.Log("For Each: is Build " + channelID + "?? " + SDK_Channel[channelID]); if (SDK_Channel[channelID]) { context["channelID_forBuild"] = channelID; Debug.Log("ExecutePath next step"); var enumerator = UTAutomationPlan.ExecutePath(startOfSubtree, context); do { yield return(""); }while (enumerator.MoveNext()); } } } }
public override IEnumerator Execute(UTContext context) { /*if (startOfSubtree == null) { * Debug.LogWarning("No subtree specified."); * yield break; * } * * var theItemsPropertyName = itemsPropertyName.EvaluateIn(context); * * var items = context[theItemsPropertyName]; * * var theItemPropertyName = itemPropertyName.EvaluateIn(context); * * if ( items is IEnumerable ) { * foreach(var item in (IEnumerable)items) { * context[theItemPropertyName] = item; * var enumerator = UTAutomationPlan.ExecutePath(startOfSubtree, context); * Debug.Log("222"); * do { * yield return ""; * } * while (enumerator.MoveNext()); * } * }*/ Dictionary <string, bool> SDK_Channel = new Dictionary <string, bool> (); SDK_Channel = context["Dictionary"] as Dictionary <string, bool>; foreach (var item in SDK_Channel.Keys) { Debug.Log("foreach :" + item.ToString()); string ss = SDK_Channel[item].ToString(); if (ss.Equals("True")) { var enumerator = UTAutomationPlan.ExecutePath(startOfSubtree, context); Debug.Log("foreach true:" + ss); do { yield return(""); }while (enumerator.MoveNext()); } } /*Debug.Log("000"+SDK_Channel["Android_91"]); * //UTBool android91 = context ["Android_91"] as UTBool; * string s = context ["Android_91"].ToString(); * Debug.Log("111"+s); * if(s.Equals("True")){ * Debug.Log("222"); * } * yield return "";*/ }
public override IEnumerator Execute(UTContext context) { if (startOfSubtree == null) { Debug.LogWarning("No subtree specified."); yield break; } var theItemsPropertyName = itemsPropertyName.EvaluateIn(context); if (string.IsNullOrEmpty(theItemsPropertyName)) { throw new UTFailBuildException("You need to specify the name of the property which holds the list of items.", this); } var items = context[theItemsPropertyName]; var theItemPropertyName = itemPropertyName.EvaluateIn(context); if (string.IsNullOrEmpty(theItemsPropertyName)) { throw new UTFailBuildException("You need to specify the name of the property which holds the current item.", this); } var theIndexPropertyName = indexPropertyName.EvaluateIn(context); var indexPropertySet = !string.IsNullOrEmpty(theIndexPropertyName); var index = 0; if (items is IEnumerable) { foreach (var item in (IEnumerable)items) { context[theItemPropertyName] = item; if (indexPropertySet) { context[theIndexPropertyName] = index; } var enumerator = UTAutomationPlan.ExecutePath(startOfSubtree, context); do { yield return(""); }while (enumerator.MoveNext()); index++; } } }
public override IEnumerator Execute(UTContext context) { if (startOfSubtree == null) { Debug.LogWarning("No subtree specified."); yield break; } UTFileUtils.FileSelectionMode theMode = UTFileUtils.FileSelectionMode.Files; if (selectionMode != null) // can happen when we migrate older automation plans which didn't have this setting. { theMode = selectionMode.EvaluateIn(context); } var theFilePropertyName = filePropertyName.EvaluateIn(context); if (string.IsNullOrEmpty(theFilePropertyName)) { throw new UTFailBuildException("You need to specify the property which holds the current file.", this); } var theIncludes = UTAction.EvaluateAll(includes, context); var theExcludes = UTAction.EvaluateAll(excludes, context); var files = UTFileUtils.CalculateFileset(theIncludes, theExcludes, theMode); var theIndexPropertyName = indexPropertyName.EvaluateIn(context); var indexPropertySet = !string.IsNullOrEmpty(theIndexPropertyName); var index = 0; foreach (var file in files) { context [theFilePropertyName] = file; if (indexPropertySet) { context [theIndexPropertyName] = index; } var enumerator = UTAutomationPlan.ExecutePath(startOfSubtree, context); do { yield return(""); } while (enumerator.MoveNext()); index++; } }