Пример #1
0
            public SuccessfulOutcome Decode(BitArrayInputStream input)
            {
                SuccessfulOutcome outcome = new SuccessfulOutcome();

                outcome.InitDefaults();
                input.skipUnreadedBits();
                outcome.procedureCode = input.ReadBits(8);
                const int num4 = 2;

                outcome.criticality = (Criticality)input.ReadBits(num4);
                input.skipUnreadedBits();
                int nBits = 0;

                while (true)
                {
                    switch (input.ReadBit())
                    {
                    case 0:
                        nBits += input.ReadBits(7);
                        goto Label_00CF;

                    case 1:
                        switch (input.ReadBit())
                        {
                        case 0:
                            nBits += input.ReadBits(14);
                            goto Label_00CF;

                        case 1:
                            input.ReadBits(2);
                            nBits += input.ReadBits(4) * 0x400;
                            break;
                        }
                        break;
                    }
                }
Label_00CF:
                long num3 = input.Position;

                try
                {
                    outcome.value = X2AP_ELEMENTARY_PROCEDURE.Switcher(outcome.procedureCode, "SuccessfulOutcome", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    outcome.value  = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return(outcome);
            }
Пример #2
0
            public SuccessfulOutcome Decode(BitArrayInputStream input)
            {
                SuccessfulOutcome outcome = new SuccessfulOutcome();
                outcome.InitDefaults();
                input.skipUnreadedBits();
                outcome.procedureCode = input.readBits(8);
                const int num4 = 2;
                outcome.criticality = (Criticality)input.readBits(num4);
                input.skipUnreadedBits();
                int nBits = 0;
                while (true)
                {
                    switch (input.readBit())
                    {
                        case 0:
                            nBits += input.readBits(7);
                            goto Label_00CF;

                        case 1:
                            switch (input.readBit())
                            {
                                case 0:
                                    nBits += input.readBits(14);
                                    goto Label_00CF;

                                case 1:
                                    input.readBits(2);
                                    nBits += input.readBits(4) * 0x400;
                                    break;
                            }
                            break;
                    }
                }
                Label_00CF:
                long num3 = input.Position;
                try
                {
                    outcome.value = X2AP_ELEMENTARY_PROCEDURE.Switcher(outcome.procedureCode, "SuccessfulOutcome", input);
                    input.skipUnreadedBits();
                }
                catch (Exception)
                {
                    input.skipUnreadedBits();
                    input.Position = num3;
                    outcome.value = input.readOctetString(nBits);
                }
                if (input.Position != (num3 + nBits))
                {
                    input.Position = num3 + nBits;
                }
                return outcome;
            }