BeginGetDate() 공개 메소드

public BeginGetDate ( Action getTime, System.Action failure ) : void
getTime Action
failure System.Action
리턴 void
예제 #1
0
        private void ValidateUsingNetworkTime()
        {
            if (!NetworkInterface.GetIsNetworkAvailable())
            {
                return;
            }

            var sntp = new SntpClient(TimeServers);

            sntp.BeginGetDate(time =>
            {
                if (time > ExpirationDate)
                {
                    RaiseLicenseInvalidated();
                }
            }
                              , () =>
            {
                /* ignored */
            });
        }
예제 #2
0
        private void ValidateUsingNetworkTime()
        {
            if (!NetworkInterface.GetIsNetworkAvailable())
            {
                return;
            }

            if (LicenseType == LicenseType.Business ||
                LicenseType == LicenseType.Architect ||
                LicenseType == LicenseType.Education ||
                LicenseType == LicenseType.Enterprise ||
                LicenseType == LicenseType.Trial
                )
            {
                // Many organizations have blocked NTP traffic, so this
                // check creates additional noise that is cause for
                // concern on enterprise security teams.
                // Since the traffic is already blocked,
                // this check would not produce a desired result
                // anyway.
                return;
            }

            var sntp = new SntpClient(GetTimeServers());

            sntp.BeginGetDate(time =>
            {
                if (time > ExpirationDate)
                {
                    RaiseLicenseInvalidated();
                }
            },
                              () =>
            {
                /* ignored */
            });
        }
        private void ValidateUsingNetworkTime()
        {
            if (!NetworkInterface.GetIsNetworkAvailable())
                return;

            var sntp = new SntpClient(TimeServers);
            sntp.BeginGetDate(time =>
            {
                if (time > ExpirationDate)
                    RaiseLicenseInvalidated();
            }
            , () =>
            {
                /* ignored */
            });
        }