Test.DhtOpTester.Test2 C# (CSharp) Méthode

Test2() public méthode

public Test2 ( int &op ) : void
op int
Résultat void
    public void Test2(ref int op) {
      Console.WriteLine("Test 2: Testing 10 puts and 10 gets with the same key.");
      RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
      byte[] key = new byte[10];
      byte[] value = new byte[value_size];
      rng.GetBytes(key);
      ArrayList al_results = new ArrayList();

      for(int i = 0; i < 10; i++) {
        value = new byte[value_size];
        rng.GetBytes(value);
        this.SerialPut(key, value, 3000, true, op++);
        al_results.Add(value);
        Console.WriteLine("Insertion done...");
        this.SerialGet(key, (byte[][]) al_results.ToArray(typeof(byte[])), op++);
      }
      Console.WriteLine("If no error messages successful up to: " + (op - 1));
    }