private SimDeviceAuthenticationResponse CreateSimDeviceAuthenticationResponse(SimDeviceAuthenticationStateDone simDeviceAuthenticationStateDone, SimDevice simDevice, List <string> canLogonUsers)
        {
            var simDeviceAuthenticationResponse = new SimDeviceAuthenticationResponse
            {
                AuthId                = simDeviceAuthenticationStateDone.Id.ToString(),
                CanLogonUsers         = canLogonUsers,
                AssignDeviceIpAddress = simDevice.Nw2IpAddressPool
            };
            // AdDevice がある場合 AdDeviceSettingOfflineWindowsSignIn を設置します 逆にない場合 設置しない
            AdDevice adDevice = _authenticationRepository.GetAdDevice(simDevice.Device.Id);

            if (adDevice != null && adDevice.AdDeviceSettingOfflineWindowsSignIn != null)
            {
                simDeviceAuthenticationResponse.SimDeviceConfigureDictionary
                    = new Dictionary <string, string>
                    {
                    {
                        "windows_signIn_cache_days",
                        adDevice.AdDeviceSettingOfflineWindowsSignIn.WindowsSignInListCacheDays.ToString()
                    }
                    };
            }
            return(simDeviceAuthenticationResponse);
        }
Esempio n. 2
0
 public void TearDown()
 {
     executionLog   = null;
     processManager = null;
     simulator      = null;
 }
        private SimDeviceAuthenticationStateDone CreateSimDeviceAuthenticationStateDone(SimDevice simDevice)
        {
            string startTime = _configuration.GetSection("Auth:ExpireHour").Value;
            var    simDeviceAuthenticationStateDone = simDevice.SimDeviceAuthenticationStateDone;

            if (simDeviceAuthenticationStateDone == null)
            {
                simDeviceAuthenticationStateDone = new SimDeviceAuthenticationStateDone
                {
                    SimDevice = simDevice,
                    TimeLimit = DateTime.Now.AddHours(double.Parse(startTime))
                };
                _authenticationRepository.Create(simDeviceAuthenticationStateDone);
            }
            else
            {
                simDeviceAuthenticationStateDone.TimeLimit =
                    DateTime.Now.AddHours(double.Parse(startTime));
                _authenticationRepository.Update(simDeviceAuthenticationStateDone);
            }
            return(simDeviceAuthenticationStateDone);
        }
Esempio n. 4
0
    Rect GetSafeArea()
    {
        Rect safeArea = Screen.safeArea;

        Sim = GetSim();
        if (Application.isEditor && Sim != SimDevice.None)
        {
            Rect nsa = new Rect(0, 0, Screen.width, Screen.height);

            switch (Sim)
            {
            case SimDevice.iPhoneX:
                if (Screen.height > Screen.width)      // Portrait
                {
                    nsa = NSA_iPhoneX[0];
                }
                else      // Landscape
                {
                    nsa = NSA_iPhoneX[1];
                }
                break;

            case SimDevice.iPhoneXsMax:
                if (Screen.height > Screen.width)      // Portrait
                {
                    nsa = NSA_iPhoneXsMax[0];
                }
                else      // Landscape
                {
                    nsa = NSA_iPhoneXsMax[1];
                }
                break;

            case SimDevice.Pixel3XL_LSL:
                if (Screen.height > Screen.width)      // Portrait
                {
                    nsa = NSA_Pixel3XL_LSL[0];
                }
                else      // Landscape
                {
                    nsa = NSA_Pixel3XL_LSL[1];
                }
                break;

            case SimDevice.Pixel3XL_LSR:
                if (Screen.height > Screen.width)      // Portrait
                {
                    nsa = NSA_Pixel3XL_LSR[0];
                }
                else      // Landscape
                {
                    nsa = NSA_Pixel3XL_LSR[1];
                }
                break;

            default:
                break;
            }

            safeArea = new Rect(Screen.width * nsa.x, Screen.height * nsa.y, Screen.width * nsa.width, Screen.height * nsa.height);
        }

        return(safeArea);
    }