public bool MoveNext()
        {
            if(index < 0 || index >= record.Count) {
                return false;
            }

            current_item = record.GetItemAt(index++);
            return current_item != null;
        }
Exemplo n.º 2
0
        public bool MoveNext()
        {
            if (index < 0 || index >= record.Count)
            {
                return(false);
            }

            current_item = record.GetItemAt(index++);
            return(current_item != null);
        }
Exemplo n.º 3
0
        public void Add(TxtRecordItem item)
        {
            if (handle == IntPtr.Zero)
            {
                throw new InvalidOperationException("This TXT Record is read only");
            }

            string key = item.Key;

            if (key[key.Length - 1] != '\0')
            {
                key += "\0";
            }

            ServiceError error = Native.TXTRecordSetValue(handle, encoding.GetBytes(key + "\0"),
                                                          (sbyte)item.ValueRaw.Length, item.ValueRaw);

            if (error != ServiceError.NoError)
            {
                throw new ServiceErrorException(error);
            }
        }
        public void Add(TxtRecordItem item)
        {
            if(handle == IntPtr.Zero) {
                throw new InvalidOperationException("This TXT Record is read only");
            }

            string key = item.Key;
            if(key[key.Length - 1] != '\0') {
                key += "\0";
            }

            ServiceError error = Native.TXTRecordSetValue(handle, encoding.GetBytes(key + "\0"),
                (sbyte)item.ValueRaw.Length, item.ValueRaw);

            if(error != ServiceError.NoError) {
                throw new ServiceErrorException(error);
            }
        }
 public void Reset()
 {
     index = 0;
     current_item = null;
 }
Exemplo n.º 6
0
 public void Add(TxtRecordItem item)
 {
     records.Add(item);
 }
Exemplo n.º 7
0
 public void Add(TxtRecordItem item)
 {
     record.Add(item);
 }
Exemplo n.º 8
0
 public void Reset()
 {
     index        = 0;
     current_item = null;
 }