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); }
public static void AddHostPort(this IAtomCollection collection, int value) { collection.Add(new Atom(Atom.PCP_HOST_PORT, (ushort)value)); }
public static void AddHostIP(this IAtomCollection collection, IPAddress value) { collection.Add(new Atom(Atom.PCP_HOST_IP, value)); }