private ObservableList <Act> GetPlatformsActions(bool ShowAll = false) { ObservableList <Act> Acts = new ObservableList <Act>(); AppDomain.CurrentDomain.Load("GingerCore"); AppDomain.CurrentDomain.Load("GingerCoreCommon"); AppDomain.CurrentDomain.Load("GingerCoreNET"); var ActTypes = new List <Type>(); foreach (Assembly GC in AppDomain.CurrentDomain.GetAssemblies().Where(assembly => assembly.GetName().Name.Contains("GingerCore"))) { var types = from type in GC.GetTypes() where type.IsSubclassOf(typeof(Act)) && type != typeof(ActWithoutDriver) && type != typeof(ActImageCaptureSupport) select type; ActTypes.AddRange(types); } foreach (Type t in ActTypes) { Act a = (Act)Activator.CreateInstance(t); if (a.IsSelectableAction == false) { continue; } if (mContext.BusinessFlow.CurrentActivity == null) { return(null); } TargetApplication TA = (TargetApplication)(from x in mContext.BusinessFlow.TargetApplications where x.Name == mContext.BusinessFlow.CurrentActivity.TargetApplication select x).FirstOrDefault(); if (TA == null) { if (mContext.BusinessFlow.TargetApplications.Count == 1) { TA = (TargetApplication)mContext.BusinessFlow.TargetApplications.FirstOrDefault(); mContext.BusinessFlow.CurrentActivity.TargetApplication = TA.AppName; } else { Reporter.ToUser(eUserMsgKey.MissingActivityAppMapping); return(null); } } ApplicationPlatform AP = (from x in WorkSpace.Instance.Solution.ApplicationPlatforms where x.AppName == TA.AppName select x).FirstOrDefault(); if (AP != null) { if (a.Platforms.Contains(AP.Platform)) { //DO Act.GetSampleAct in base if ((Acts.Where(c => c.GetType() == a.GetType()).FirstOrDefault()) == null) { a.Description = a.ActionDescription; a.Active = true; a.DoNewActionSetup(); Acts.Add(a); } } } } return(Acts); }