Exemplo n.º 1
0
        // InputData object /////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Insert an InputData object
        /// </summary>
        /// <param name="item"></param>
        public async Task<InputData> AddInputDataAsync(InputData item)
        {
            item.Id = MongoDB.Bson.ObjectId.GenerateNewId().ToString();
            await inputdata.InsertOneAsync(item);
            return item;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Updates an InputData object specified by an Id
 /// </summary>
 /// <param name="item">
 /// <Description>A SHA-1 string id</Description>
 /// </param>
 public async Task<long> UpdateInputDataAsync(InputData item)
 {
     var filter = Builders<InputData>.Filter.Eq("Id", item.Id);
     var update = Builders<InputData>.Update
         .Set("Months", item.Months)
         .Set("Pattern", item.Pattern)
         .Set("DateDecrement", item.DateDecrement);
     Task<UpdateResult> updateResult = inputdata.UpdateOneAsync(filter, update);
     await updateResult;
     long matchedCount = updateResult.Result.MatchedCount;
     return matchedCount;
 }
 public FTPClientRunner(DateSet dateset, InputData inputdata, string testId)
 {
     DateSet = dateset;
     InputData = inputdata;
     TestId = testId;
 }