示例#1
0
        private void expand(int by)
        {
            var na = new KeyPaireV[values.Length + by + 8];

            Array.Copy(values, 0, na, 0, values.Length);
            values = na;
        }
示例#2
0
        private void expand()
        {
            var na = new KeyPaireV[values.Length + 8 * values.Length / 6];

            Array.Copy(values, 0, na, 0, values.Length);
            values = na;
        }
示例#3
0
 public void Add(KeyPaireV v)
 {
     if (index >= values.Length)
     {
         expand();
     }
     values[++index] = v;
 }
示例#4
0
 internal void Init(List <Field> fields)
 {
     if (fields.Count > values.Length)
     {
         expand(fields.Count - values.Length);
     }
     foreach (var f in fields)
     {
         values[++index] = new KeyPaireV(f.Name, Void.Value);
     }
 }