Exemple #1
0
        private static string ActionMapper(SubTargetType actionType)
        {
            string mapValue;
            Dictionary <SubTargetType, string> actionMapper = new Dictionary <SubTargetType, string>()
            {
                { SubTargetType.action1, "actions/start" },
                { SubTargetType.action2, "actions/pause" },
                { SubTargetType.action3, "actions/cancel-send" },
                { SubTargetType.action4, "actions/start-all-emails" },
                { SubTargetType.action5, "actions/pause-all-emails" }
            };

            return(actionMapper.TryGetValue(actionType, out mapValue) ? mapValue : actionType.ToString());
        }
Exemple #2
0
        public static string Map(SubTargetType subType)
        {
            string subTypeValue = subType.ToString();

            if (subTypeValue == SubTargetType.not_applicable.ToString())
            {
                return("");
            }
            else
            {
                string map = subTypeValue.Replace("_", "-");
                return(map);
            }
        }
        private static string ActionMapper(SubTargetType actionType)
        {
            string mapValue;
            Dictionary<SubTargetType, string> actionMapper = new Dictionary<SubTargetType, string>()
            {
                {SubTargetType.action1, "actions/start"},
                {SubTargetType.action2, "actions/pause"},
                {SubTargetType.action3, "actions/cancel-send"},
                {SubTargetType.action4, "actions/start-all-emails"},
                {SubTargetType.action5, "actions/pause-all-emails"}
            };

            return actionMapper.TryGetValue(actionType, out mapValue) ? mapValue : actionType.ToString(); 
        }
Exemple #4
0
        private static string ActionMapper(SubTargetType actionType)
        {
            string mapValue;
            Dictionary <SubTargetType, string> actionMapper = new Dictionary <SubTargetType, string>
            {
                { SubTargetType.actionStart, "actions/start" },
                { SubTargetType.actionPause, "actions/pause" },
                { SubTargetType.actionCancelSend, "actions/cancel-send" },
                { SubTargetType.actionStartAllEmails, "actions/start-all-emails" },
                { SubTargetType.actionPauseAllEmails, "actions/pause-all-emails" },
                { SubTargetType.actionSend, "actions/send" },
                { SubTargetType.actionTest, "actions/test" }
            };

            return(actionMapper.TryGetValue(actionType, out mapValue) ? mapValue : actionType.ToString());
        }