Beispiel #1
0
 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());
 }
Beispiel #2
0
 /// <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;
 }
Beispiel #3
0
        // 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;
        }
Beispiel #4
0
 public ExtentTable(int value, ImportanceType type)
 {
     Value      = value;
     Importance = type;
 }
Beispiel #5
0
 public Task <List <Reason> > GetReasonsAsync(ReasonType reasonType, ImportanceType importanceType)
 {
     return(_reasonAccessor.GetReasonsAsync(reasonType, importanceType));
 }