Add initial schedule request handlers (#638)

This commit is contained in:
Karl Burtram
2018-06-18 10:18:23 -07:00
committed by GitHub
parent d2cc376b87
commit 29fb715ad5
10 changed files with 555 additions and 279 deletions

View File

@@ -0,0 +1,68 @@
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System;
using System.Collections.Generic;
using Microsoft.SqlTools.ServiceLayer.Agent;
namespace Microsoft.SqlTools.ServiceLayer.Agent.Contracts
{
[Flags]
public enum FrequencyTypes
{
Unknown = 0,
OneTime = 1,
Daily = 4,
Weekly = 8,
Monthly = 16,
MonthlyRelative = 32,
AutoStart = 64,
OnIdle = 128
}
[Flags]
public enum FrequencySubDayTypes
{
Unknown = 0,
Once = 1,
Second = 2,
Minute = 4,
Hour = 8
}
[Flags]
public enum FrequencyRelativeIntervals
{
First = 1,
Second = 2,
Third = 4,
Fourth = 8,
Last = 16
}
/// <summary>
/// a class for storing various properties of agent schedules
/// </summary>
public class AgentScheduleInfo
{
public int ID { get; set; }
public string Name { get; set; }
public string JobName { get; set; }
public bool IsEnabled { get; set; }
public FrequencyTypes FrequencyTypes { get; set; }
public FrequencySubDayTypes FrequencySubDayTypes { get; set; }
public int FrequencySubDayInterval { get; set; }
public FrequencyRelativeIntervals FrequencyRelativeIntervals { get; set; }
public int FrequencyRecurrenceFactor { get; set; }
public int FrequencyInterval { get; set; }
public DateTime DateCreated { get; set; }
public TimeSpan ActiveStartTimeOfDay { get; set; }
public DateTime ActiveStartDate { get; set; }
public TimeSpan ActiveEndTimeOfDay { get; set; }
public int JobCount { get; set; }
public DateTime ActiveEndDate { get; set; }
public Guid ScheduleUid { get; set; }
}
}