public Task <List <Reason> > GetReasonsAsync(ReasonType reasonType, ImportanceType importanceType) { // in some cases it makes sense to async await but in cases like these the overhead of 'async' // is not worth it and it makes more sense to just return the Task and the calling method here would probably // already have the async await overhead and EF would handle that gracefully return(_reasonContext.Reasons.Where(x => x.ImportanceType == importanceType && x.ReasonType == reasonType).ToListAsync()); }
/// <summary> /// The task constructor for initializing a new task /// </summary> /// <param name="name">the name of the task></param> /// <param name="description">the description of the task</param> /// <param name="dueDate">the due date of the task</param> /// <param name="progressType">the progress status </param> /// <param name="importanceType">the importance level of the task</param> /// <param name="users">the list of users associated to the task</param> public Tasks(String name, String description, DateTime dueDate, ProgressType progressStatus, ImportanceType importanceLevel, List<User> users) { this._name = name; this._description = description; this._taskDueDate = dueDate; this._progressStatus = progressStatus; this._importanceLevel = importanceLevel; }
// Get the importance of a feature. public unsafe double[] GetFeatureImportance(int numIteration, ImportanceType importanceType) { // Get the number of features int cnt = this.NumFeatures; double[] res = new double[cnt]; fixed (double* ptr = res) PInvokeException.Check(PInvoke.BoosterFeatureImportance(Handle, numIteration, (int)importanceType, ptr), nameof(PInvoke.BoosterFeatureImportance)); return res; }
public ExtentTable(int value, ImportanceType type) { Value = value; Importance = type; }
public Task <List <Reason> > GetReasonsAsync(ReasonType reasonType, ImportanceType importanceType) { return(_reasonAccessor.GetReasonsAsync(reasonType, importanceType)); }