public ObjectIdentifier()

in Source/Tx.Network/Snmp/ObjectIdentifier.cs [100:138]


        public ObjectIdentifier(string oids)
        {
            if(string.IsNullOrWhiteSpace(oids))
            {
                throw new ArgumentNullException("oids");
            }

            var oidArray = new uint[25];
            int count = 0;
            uint val = 0;
            for (int i = 0; i < oids.Length; i++)
            {
                if (oids[i] != '.')
                {
                    uint currentVal = oids[i] - 48u;
                    if (currentVal > 9)
                    {
                        throw new InvalidCastException("Input not an ObjectIdentifier string");
                    }

                    val = (val * 10) + currentVal;
                }
                else
                {
                    if (oidArray.Length <= count)
                    {
                        Array.Resize(ref oidArray, oidArray.Length * 2);
                    }

                    oidArray[count++] = val;
                    val = 0;
                }
            }

            Array.Resize(ref oidArray, count + 1);
            oidArray[count] = val;

            this.Oids = new ReadOnlyCollection<uint>(oidArray);
        }