public async Task UpdateResourceState(string resourceId, ResourceState state)
        {
            // get current resource state
            CurrentResourceState updatedState = await this.GetResourceState(resourceId);
            if (updatedState == null)
                updatedState = new CurrentResourceState(resourceId);

            // update with new state
            updatedState.State = state;

            // save update
            await UpdateResourceState(updatedState);
        }
 public async Task UpdateResourceState(CurrentResourceState newstate)
 {
     TableOperation insertOperation = TableOperation.InsertOrMerge(newstate);
     await this._StateUpdateTable.ExecuteAsync(insertOperation);
 }