コード例 #1
0
        public void ParseAnyElements()
        {
            ModuleProc PROC = new ModuleProc("", "ParseAnyElements");

            try
            {
                if (this.Any == null || this.Any.Length == 0)
                {
                    return;
                }

                foreach (var item in this.Any)
                {
                    if (item.NamespaceURI == s2sHelper.NS_BS2S)
                    {
                        try
                        {
                            XElement xElm = XElement.Parse(item.OuterXml);

                            switch (item.LocalName.ToLower())
                            {
                            case "getcasino":
                            {
                                getConfigurationGetCasino o = new getConfigurationGetCasino();
                                o.casinoId     = xElm.GetAttributeValue("casinoId", s2sHelper.NS_BS2S);
                                this.getCasino = new getConfigurationGetCasino[] { o };
                            }
                            break;

                            case "getdenomination":
                            {
                                getConfigurationGetDenomination o = new getConfigurationGetDenomination();
                                o.denomId            = xElm.GetAttributeValue("denomId", s2sHelper.NS_BS2S);
                                this.getDenomination = new getConfigurationGetDenomination[] { o };
                            }
                            break;

                            case "getmanufacturer":
                            {
                                getConfigurationGetManufacturer o = new getConfigurationGetManufacturer();
                                o.manufacturerId     = xElm.GetAttributeValue("manufacturerId", s2sHelper.NS_BS2S);
                                this.getManufacturer = new getConfigurationGetManufacturer[] { o };
                            }
                            break;

                            default:
                                break;
                            }
                        }
                        catch (Exception ex)
                        {
                            Log.Exception(PROC, ex);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }
        }
コード例 #2
0
        public void ParseAnyElements()
        {
            ModuleProc PROC = new ModuleProc("", "ParseAnyElements");

            try
            {
                if (this.Any == null || this.Any.Length == 0) return;

                foreach (var item in this.Any)
                {
                    if (item.NamespaceURI == s2sHelper.NS_BS2S)
                    {
                        try
                        {
                            XElement xElm = XElement.Parse(item.OuterXml);

                            switch (item.LocalName.ToLower())
                            {
                                case "getcasino":
                                    {
                                        getConfigurationGetCasino o = new getConfigurationGetCasino();
                                        o.casinoId = xElm.GetAttributeValue("casinoId", s2sHelper.NS_BS2S);
                                        this.getCasino = new getConfigurationGetCasino[] { o };
                                    }
                                    break;

                                case "getdenomination":
                                    {
                                        getConfigurationGetDenomination o = new getConfigurationGetDenomination();
                                        o.denomId = xElm.GetAttributeValue("denomId", s2sHelper.NS_BS2S);
                                        this.getDenomination = new getConfigurationGetDenomination[] { o };
                                    }
                                    break;

                                case "getmanufacturer":
                                    {
                                        getConfigurationGetManufacturer o = new getConfigurationGetManufacturer();
                                        o.manufacturerId = xElm.GetAttributeValue("manufacturerId", s2sHelper.NS_BS2S);
                                        this.getManufacturer = new getConfigurationGetManufacturer[] { o };
                                    }
                                    break;

                                default:
                                    break;
                            }
                        }
                        catch (Exception ex)
                        {
                            Log.Exception(PROC, ex);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }
        }