﻿// Copyright (c) Kai Langlie. All rights reserved.
// Licensed under the Apache License, Version 2.0.

using System;
using OpenUpdate.Deployment.Common;

namespace OpenUpdate.Deployment
{
    public class ServerFilesEventArgs : EventArgs
    {
        private ServerFilesEventArgs()
        {
        }

        public ServerFilesEventArgs(ActionType type)
        {
            IsGoodResponse = true;
            Type = type;
        }

        public ServerFilesEventArgs(ActionType type, string errMsg)
        {
            IsGoodResponse = false;
            ErrorMessage = errMsg;
            Type = type;
        }

        public ServerFilesEventArgs(ActionType type, StorageFileInfo[] fileInformation)
        {
            IsGoodResponse = true;
            FileInformation = fileInformation;
            Type = type;
        }

        public bool IsGoodResponse { get; }

        public string ErrorMessage { get; }

        public StorageFileInfo[] FileInformation { get; }

        public ActionType Type { get; }
    }
}