<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace RemoteDeployment.Contracts
{
    [DataContract]
    [KnownType("GetKnownTypes")]
    public abstract class DeploymentAction
    {
        private static Type[] GetKnownTypes()
        {
            var type = typeof(DeploymentAction);
            var assembly = type.Assembly;
            return assembly.GetTypes().Where(_ => _.IsSubclassOf(type)).ToArray();
        }
    }
}
<file_sep>﻿using System.Runtime.Serialization;

namespace RemoteDeployment.Contracts
{
    [DataContract]
    public enum PackageType
    {
        [EnumMember]
        Executable,

        [EnumMember]
        Msi,

        [EnumMember]
        PowershellScript,

        [EnumMember]
        BatchScript,

        [EnumMember]
        SqlScript
    }
}<file_sep>﻿using System.Runtime.Serialization;

namespace RemoteDeployment.Contracts
{
    [DataContract]
    public class DeploymentConfiguration
    {
        [DataMember]
        public PackageType PackageType { get; set; }
    }
}