void ReportTask(SchdType type) { var current_type = (from x in type_fields where x.Name == type.ToString() select x).Single(); action(string.Format("选择调度算法 = {0} | {1}", (Attribute.GetCustomAttribute(current_type, typeof(DescriptionAttribute)) as DescriptionAttribute).Description, current_type.Name)); StringBuilder sb = new StringBuilder(); sb.Append('-', 50); var split = sb.ToString(); action(split); tasks.ToList().ForEach(a => { sb.Clear(); task_fields.ToList().ForEach(b => { sb.AppendFormat("{0} = {1} ", b.ConvertTo <DescriptionAttribute>().Description, b.GetValue(a, null).ToString().PadRight(3)); }); action(sb.ToString()); }); action(split); }
public static IProcessSchd CreateSchdInstance(SchdType type) { return Assembly.GetExecutingAssembly().CreateInstance("SimuProcessSchd.Schd" + type.ToString()) as IProcessSchd; }
static public IProcessSchd CreateSchdInstance(SchdType type) { return(Assembly.GetExecutingAssembly().CreateInstance("SimuProcessSchd.Schd" + type.ToString()) as IProcessSchd); }