/// <summary>
        /// Creates a new instance of the <see cref="I3dPingersWrapper"/> class.
        /// Should be disposed.
        /// </summary>
        /// <param name="logCallback">The logging callback.</param>
        public I3dPingersWrapper(Action <I3dLogLevel, string> logCallback, I3dIpList ipList)
        {
            _logCallback = logCallback;

            int code = i3d_ping_pingers_create(out _ptr, ipList.Ptr);

            I3dErrorValidator.Validate(code);

            code = i3d_ping_pingers_set_logger(_ptr, LogCallback, _ptr);
            I3dErrorValidator.Validate(code);

            lock (Pingers)
            {
                Pingers.Add(_ptr, this);
            }
        }
示例#2
0
 /// <summary>
 /// Sets the IPv4 List of the SitesGetter on list.
 /// </summary>
 public void ipv4List(I3dIpList list)
 {
     _wrapper.ipv4List(list);
 }
        /// <summary>
        /// Gets IPv6 list for all the sites.
        /// </summary>
        public void ipv6List(I3dIpList list)
        {
            int code = i3d_ping_sites_getter_ipv6_list(_ptr, list.Ptr);

            I3dErrorValidator.Validate(code);
        }