Exemplo n.º 1
0
        public IManager(ServiceCtx context)
        {
            // TODO: Load nsd settings through the savedata 0x80000000000000B0 (nsdsave:/).

            if (!NxSettings.Settings.TryGetValue("nsd!test_mode", out object testMode))
            {
                // return ResultCode.InvalidSettingsValue;
            }

            if (!NxSettings.Settings.TryGetValue("nsd!environment_identifier", out object environmentIdentifier))
            {
                // return ResultCode.InvalidSettingsValue;
            }

            _nsdSettings = new NsdSettings
            {
                Initialized = true,
                TestMode    = (bool)testMode,
                Environment = (string)environmentIdentifier
            };

            _fqdnResolver = new FqdnResolver(_nsdSettings);

            _isInitialized = true;
        }
Exemplo n.º 2
0
        public IManager(ServiceCtx context)
        {
            // TODO: Load nsd settings through the savedata 0x80000000000000B0 (nsdsave:/).

            NxSettings.Settings.TryGetValue("nsd!test_mode", out object testMode);

            _nsdSettings = new NsdSettings
            {
                Initialized = true,
                TestMode    = (bool)testMode
            };

            _fqdnResolver = new FqdnResolver(_nsdSettings);

            _isInitialized = true;
        }
Exemplo n.º 3
0
        static IManager()
        {
            // TODO: Load nsd settings through the savedata 0x80000000000000B0 (nsdsave:/).

            if (!NxSettings.Settings.TryGetValue("nsd!test_mode", out object testMode))
            {
                // return ResultCode.InvalidSettingsValue;
            }

            if (!NxSettings.Settings.TryGetValue("nsd!environment_identifier", out object environmentIdentifier))
            {
                // return ResultCode.InvalidSettingsValue;
            }

            NsdSettings = new NsdSettings
            {
                Initialized = true,
                TestMode    = (bool)testMode,
                Environment = (string)environmentIdentifier
            };
        }