コード例 #1
0
ファイル: DhcpServer.cs プロジェクト: yanzj/DhcpServerApi
        internal DhcpServer(DHCP_IP_ADDRESS ipAddress, string name)
        {
            this.ipAddress = ipAddress;
            this.name      = name;

            this.version         = new Lazy <Tuple <int, int> >(GetVersion);
            this.config          = new Lazy <DhcpServerConfiguration>(() => DhcpServerConfiguration.GetConfiguration(this));
            this.specificStrings = new Lazy <Tuple <string, string> >(GetSpecificStrings);
            this.auditLog        = new Lazy <DhcpServerAuditLog>(() => DhcpServerAuditLog.GetParams(this));
            this.dnsSettings     = new Lazy <DhcpServerDnsSettings>(() => DhcpServerDnsSettings.GetGlobalDnsSettings(this));
        }
コード例 #2
0
        internal DhcpServerScope(DhcpServer Server, DHCP_IP_ADDRESS SubnetAddress)
        {
            this.Server  = Server;
            this.address = SubnetAddress;

            this.info             = new Lazy <DHCP_SUBNET_INFO>(GetInfo);
            this.timeDelayOffer   = new Lazy <TimeSpan>(GetTimeDelayOffer);
            this.ipRange          = new Lazy <DhcpServerIpRange>(GetIpRange);
            this.excludedIpRanges = new Lazy <List <DhcpServerIpRange> >(GetExcludedIpRanges);
            this.leaseDuration    = new Lazy <TimeSpan>(GetLeaseDuration);
            this.dnsSettings      = new Lazy <DhcpServerDnsSettings>(() => DhcpServerDnsSettings.GetScopeDnsSettings(this));
        }