//public static Section GetAndStartContext(string name) //{ // Section section = new Section(); // section.Name = name; // section.StartContext(); // return section; //} //public static Section GetAndStartTime(string name) //{ // Section section = new Section(); // section.Name = name; // section.StartTime(); // return section; //} public static Section GetAndStartContextAndTime(string name) { Section section = new Section(); section.Name = name; section.StartContext(); section.StartTime(); return(section); }
public static Section GetAndStartMergedContextAndTime(string name) { Section section = null; if (mContext != null) { section = mContext.Children.FirstOrDefault(item => item.Name == name); if (section != null) { section.mTimeStarted = TimeManager.SystemCurrentTime - section.Time; section.mStarted = true; section.StartContext(); // no need to do this, we do it above by manually setting the time started and whether it's started //section.StartTime(); } else //(section == null) { section = GetAndStartContextAndTime(name); } } return(section); }
//public static Section GetAndStartContext(string name) //{ // Section section = new Section(); // section.Name = name; // section.StartContext(); // return section; //} //public static Section GetAndStartTime(string name) //{ // Section section = new Section(); // section.Name = name; // section.StartTime(); // return section; //} public static Section GetAndStartContextAndTime(string name) { Section section = new Section(); section.Name = name; section.StartContext(); section.StartTime(); return section; }