internal SystemUnicastIPAddressInformation(IpAdapterInfo ipAdapterInfo, IPExtendedAddress address) { this.innerInfo = new SystemIPAddressInformation(address.address); DateTime time = new DateTime(0x7b2, 1, 1); time = time.AddSeconds((double) ipAdapterInfo.leaseExpires); TimeSpan span = (TimeSpan) (time - DateTime.UtcNow); this.dhcpLeaseLifetime = (long) span.TotalSeconds; this.ipv4Mask = address.mask; }
internal SystemUnicastIPAddressInformation(IpAdapterInfo ipAdapterInfo, IPExtendedAddress address) { this.innerInfo = new SystemIPAddressInformation(address.address); DateTime time = new DateTime(0x7b2, 1, 1); time = time.AddSeconds((double)ipAdapterInfo.leaseExpires); TimeSpan span = (TimeSpan)(time - DateTime.UtcNow); this.dhcpLeaseLifetime = (long)span.TotalSeconds; this.ipv4Mask = address.mask; }