コード例 #1
0
        public static GetRuleResponse Unmarshall(UnmarshallerContext _ctx)
        {
            GetRuleResponse getRuleResponse = new GetRuleResponse();

            getRuleResponse.HttpResponse = _ctx.HttpResponse;
            getRuleResponse.RequestId    = _ctx.StringValue("GetRule.RequestId");
            getRuleResponse.Success      = _ctx.BooleanValue("GetRule.Success");
            getRuleResponse.Code         = _ctx.StringValue("GetRule.Code");
            getRuleResponse.Message      = _ctx.StringValue("GetRule.Message");

            GetRuleResponse.GetRule_Data data = new GetRuleResponse.GetRule_Data();

            List <GetRuleResponse.GetRule_Data.GetRule_RuleInfo> data_rules = new List <GetRuleResponse.GetRule_Data.GetRule_RuleInfo>();

            for (int i = 0; i < _ctx.Length("GetRule.Data.Rules.Length"); i++)
            {
                GetRuleResponse.GetRule_Data.GetRule_RuleInfo ruleInfo = new GetRuleResponse.GetRule_Data.GetRule_RuleInfo();
                ruleInfo.Rid             = _ctx.StringValue("GetRule.Data.Rules[" + i + "].Rid");
                ruleInfo.RuleLambda      = _ctx.StringValue("GetRule.Data.Rules[" + i + "].RuleLambda");
                ruleInfo.Name            = _ctx.StringValue("GetRule.Data.Rules[" + i + "].Name");
                ruleInfo.Type            = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].Type");
                ruleInfo.Status          = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].Status");
                ruleInfo.IsDelete        = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].IsDelete");
                ruleInfo.StartTime       = _ctx.StringValue("GetRule.Data.Rules[" + i + "].StartTime");
                ruleInfo.EndTime         = _ctx.StringValue("GetRule.Data.Rules[" + i + "].EndTime");
                ruleInfo.Weight          = _ctx.StringValue("GetRule.Data.Rules[" + i + "].Weight");
                ruleInfo.IsOnline        = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].IsOnline");
                ruleInfo.CreateEmpid     = _ctx.StringValue("GetRule.Data.Rules[" + i + "].CreateEmpid");
                ruleInfo.CreateTime      = _ctx.StringValue("GetRule.Data.Rules[" + i + "].CreateTime");
                ruleInfo.LastUpdateTime  = _ctx.StringValue("GetRule.Data.Rules[" + i + "].LastUpdateTime");
                ruleInfo.LastUpdateEmpid = _ctx.StringValue("GetRule.Data.Rules[" + i + "].LastUpdateEmpid");
                ruleInfo.Comments        = _ctx.StringValue("GetRule.Data.Rules[" + i + "].Comments");
                ruleInfo.AutoReview      = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].AutoReview");
                ruleInfo.RuleScoreType   = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].RuleScoreType");
                ruleInfo.ScoreName       = _ctx.StringValue("GetRule.Data.Rules[" + i + "].ScoreName");
                ruleInfo.ScoreSubName    = _ctx.StringValue("GetRule.Data.Rules[" + i + "].ScoreSubName");
                ruleInfo.ScoreId         = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].ScoreId");
                ruleInfo.ScoreSubId      = _ctx.IntegerValue("GetRule.Data.Rules[" + i + "].ScoreSubId");

                List <string> ruleInfo_businessCategoryNameList = new List <string>();
                for (int j = 0; j < _ctx.Length("GetRule.Data.Rules[" + i + "].BusinessCategoryNameList.Length"); j++)
                {
                    ruleInfo_businessCategoryNameList.Add(_ctx.StringValue("GetRule.Data.Rules[" + i + "].BusinessCategoryNameList[" + j + "]"));
                }
                ruleInfo.BusinessCategoryNameList = ruleInfo_businessCategoryNameList;

                data_rules.Add(ruleInfo);
            }
            data.Rules           = data_rules;
            getRuleResponse.Data = data;

            return(getRuleResponse);
        }
コード例 #2
0
        public static GetRuleResponse Unmarshall(UnmarshallerContext _ctx)
        {
            GetRuleResponse getRuleResponse = new GetRuleResponse();

            getRuleResponse.HttpResponse = _ctx.HttpResponse;
            getRuleResponse.Code         = _ctx.StringValue("GetRule.Code");
            getRuleResponse.Message      = _ctx.StringValue("GetRule.Message");
            getRuleResponse.RequestId    = _ctx.StringValue("GetRule.RequestId");

            GetRuleResponse.GetRule_Data data = new GetRuleResponse.GetRule_Data();
            data.Content         = _ctx.StringValue("GetRule.Data.Content");
            data.CreatedAt       = _ctx.StringValue("GetRule.Data.CreatedAt");
            data.Id              = _ctx.StringValue("GetRule.Data.Id");
            data.Name            = _ctx.StringValue("GetRule.Data.Name");
            getRuleResponse.Data = data;

            return(getRuleResponse);
        }