Beispiel #1
0
        private static void ActivatePartnerApi()
        {
            Configuration.Configuration configuration = ConfigurationManager.ReadConfiguration();

            EmisPartnerInterface emisInterface = new EmisPartnerInterface();

            InitialiseWithIdResult initializeResult = emisInterface.InitializeWithId(configuration.EmisWebIPAddress, configuration.EmisWebCdb, configuration.PartnerApiKey);

            emisInterface.Logon(initializeResult.LoginId, configuration.PartnerApiUserName, configuration.PartnerApiPassword);

            Log.WriteToConsoleAndLog(string.Empty);
            Log.WriteToConsoleAndLog("Partner API activation succeeded");
        }
Beispiel #2
0
        private void InitialiseApi()
        {
            InitialiseWithIdResult initialiseResult = _emisInterface.InitializeWithId(_configuration.EmisWebIPAddress, (int)_configuration.EmisWebCdb, _configuration.PartnerApiKey);

            if (_stopping)
            {
                return;
            }

            LogonResult logonResult = _emisInterface.Logon(initialiseResult.LoginId, _configuration.PartnerApiUserName, _configuration.PartnerApiPassword);

            _sessionId = logonResult.SessionId;
        }