コード例 #1
0
 public static void SetAtomTo(IAtomCollection collection, Atom value)
 {
     for (var i = 0; i < collection.Count; i++)
     {
         if (value.Name == collection[i].Name)
         {
             collection[i] = value;
             return;
         }
     }
     collection.Add(value);
 }
コード例 #2
0
 public static void AddHostPort(this IAtomCollection collection, int value)
 {
     collection.Add(new Atom(Atom.PCP_HOST_PORT, (ushort)value));
 }
コード例 #3
0
 public static void AddHostIP(this IAtomCollection collection, IPAddress value)
 {
     collection.Add(new Atom(Atom.PCP_HOST_IP, value));
 }
コード例 #4
0
 public static void SetAtomTo(IAtomCollection collection, Atom value)
 {
     for (var i = 0; i < collection.Count; i++) {
     if (value.Name == collection[i].Name) {
       collection[i] = value;
       return;
     }
       }
       collection.Add(value);
 }