Esempio n. 1
0
        private void SetAllowOnlySecureRpcCalls(AllowOnlySecureRpcCallsStatus value)
        {
            object objValue = null;

            if (value == AllowOnlySecureRpcCallsStatus.Unknown)
            {
                return;
            }

            switch (value)
            {
            case AllowOnlySecureRpcCallsStatus.On:
            {
                objValue = 1;
                break;
            }

            case AllowOnlySecureRpcCallsStatus.Off:
            {
                objValue = 0;
                break;
            }
            }

            if (objValue == null)
            {
                return;
            }

            WriteRegistryKeyValue(Consts.AllowOnlySecureRpcCallsKeyPath, Consts.AllowOnlySecureRpcCallsValueName, objValue);
            _needRestart = true;
        }
Esempio n. 2
0
        private AllowOnlySecureRpcCallsStatus GetAllowOnlySecureRpcCalls()
        {
            AllowOnlySecureRpcCallsStatus result = AllowOnlySecureRpcCallsStatus.Unknown;
            object keyValue = ReadRegistryKeyValue(Consts.AllowOnlySecureRpcCallsKeyPath, Consts.AllowOnlySecureRpcCallsValueName);

            if (keyValue != null)
            {
                switch (keyValue.ToString())
                {
                case "0":
                {
                    result = AllowOnlySecureRpcCallsStatus.Off;
                    break;
                }

                case "1":
                {
                    result = AllowOnlySecureRpcCallsStatus.On;
                    break;
                }
                }
            }
            return(result);
        }