コード例 #1
0
        public static Dictionary <string, object> GenerateCreateRequest(Type type, EntryPoint entryPoint, Subject subject, CommonEnums body, CommonEnums title, From from)
        {
            var request = new Dictionary <string, object>();

            TypeMapperValue[type](request);
            EntryPointMapperValue[entryPoint](request);
            SubjectMapperValue[subject](request);
            CommonMapperValue[body.ToString()](Parameters.Body.GetEnumStringValue(), request);
            CommonMapperValue[title.ToString()](Parameters.Title.GetEnumStringValue(), request);
            FromMapperValue[from](request);
            return(request);
        }
コード例 #2
0
        public static Dictionary <string, object> BuildCreateTemplateWithProcessRequest(PrivateApiResponse <List <OptionSearchResponse> > optionPhaseProcess, PrivateApiResponse <List <OptionSearchResponse> > optionEndReason, PhaseType phaseType, CommonEnums phaseMemo, EndFlag endFlag, EndReason endReason)
        {
            var request = new Dictionary <string, object>(DefaultCreateRequest);
            var phases  = new Dictionary <string, object>
            {
                [Phase.Resource.GetEnumStringValue()]  = ResourceId.Process,
                [Phase.Phase.GetEnumStringValue()]     = optionPhaseProcess.Result.First()?.Children?.LastOrDefault()?.Alias,
                [Phase.PhaseDate.GetEnumStringValue()] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"),
            };

            PhaseTypeMapperValue[phaseType](phases);
            CommonMapperValue[phaseMemo.ToString()](Phase.PhaseMemo.GetEnumStringValue(), phases);
            EndFlagMapperValue[endFlag](phases);
            EndReasonMapperValue[endReason](new List <string> {
                optionEndReason.Result.First().Alias, optionEndReason.Result.Last().Alias
            }, phases);
            request[Parameters.Phase.GetEnumStringValue()] = phases;
            return(request);
        }
コード例 #3
0
        public static Dictionary <string, object> BuildCreateTemplateWithoutProcessRequest(ResourceId resource, PhaseType phaseType, CommonEnums phaseMemo)
        {
            var request = new Dictionary <string, object>(DefaultCreateRequest);

            var optionHandler  = new OptionManager();
            var responseOption = optionHandler.SearchOption("type", BulkHelpers.PhaseTypes[resource].ToString());

            var phases = new Dictionary <string, object>
            {
                [Phase.Resource.GetEnumStringValue()]  = (int)resource,
                [Phase.Phase.GetEnumStringValue()]     = responseOption.Result.First()?.Children?.LastOrDefault()?.Alias,
                [Phase.PhaseDate.GetEnumStringValue()] = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"),
            };

            PhaseTypeMapperValue[phaseType](phases);
            CommonMapperValue[phaseMemo.ToString()](Phase.PhaseMemo.GetEnumStringValue(), phases);
            request[Parameters.Phase.GetEnumStringValue()] = phases;
            return(request);
        }