コード例 #1
0
ファイル: Event.cs プロジェクト: Tokenize/evl-daemon-core
 public Event(Command command, string data, DateTime timestamp, Command.PriorityLevel priority)
 {
     Command   = command;
     Data      = data;
     Timestamp = timestamp;
     Priority  = priority;
 }
コード例 #2
0
        public SmsNotifier(string name, Command.PriorityLevel priorityLevel, string url,
                           string sid, string authToken, string sender, string recipient)
        {
            Name          = name;
            PriorityLevel = priorityLevel;

            client = new TwilioHttpClient(url, recipient, sender, sid, authToken);
        }
コード例 #3
0
        public EmailNotifier(string name, Command.PriorityLevel priorityLevel, string apiKey,
                             string sender, string recipient)
        {
            Name          = name;
            PriorityLevel = priorityLevel;
            Sender        = sender;
            Recipient     = recipient;

            this.apiKey = apiKey;
        }
コード例 #4
0
        /// <summary>
        /// Creates a new event with the given command, data and timestamp. A friendly
        /// description is generated for the event based on the given command and data.
        /// </summary>
        /// <param name="command">Command</param>
        /// <param name="data">Data sent with command</param>
        /// <param name="timestamp">Time when the event occurred</param>
        /// <returns>New event</returns>
        public Event NewEvent(Command command, string data, DateTime timestamp)
        {
            Command.PriorityLevel priority = GetPriority(command);
            Event newEvent = new Event(command, data, timestamp, priority);

            newEvent.Description = Describe(command, data);

            // TODO: Set zone & partition names (if applicable)

            return(newEvent);
        }
コード例 #5
0
 public ConsoleNotifier(string name, Command.PriorityLevel priorityLevel)
 {
     Name          = name;
     PriorityLevel = priorityLevel;
 }