예제 #1
0
        public async Task <UpdateResult> Update(ServiceManagerEntity serviceManager)
        {
            var update = new UpdateDefinitionBuilder <ServiceManagerEntity>()
                         .Set(x => x.RunningServices, serviceManager.RunningServices)
                         .Set(x => x.UpdatedBy, serviceManager.UpdatedBy)
                         .Set(x => x.LastUpdated, DateTime.Now);

            return(await _erviceManagersCollection.UpdateOneAsync(x => x.Id == serviceManager.Id, update));
        }
예제 #2
0
 public async Task Create(ServiceManagerEntity serviceManager)
 {
     serviceManager.Created = DateTime.Now;
     serviceManager.Deleted = false;
     await _erviceManagersCollection.InsertOneAsync(serviceManager);
 }
예제 #3
0
 public async Task Restart([FromBody] ServiceManagerEntity entity)
 {
     await _serviceManager.RestartService(entity);
 }
예제 #4
0
 public Task RestartService(ServiceManagerEntity managerEntity)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 public async Task Stop([FromBody] ServiceManagerEntity entity)
 {
     await _serviceManager.StopService(entity);
 }