/// <summary>To get all known T2G systems.</summary> private void InitializeSystemList() { try { LogManager.WriteLog(TraceType.INFO, "Getting system list...", "PIS.Ground.Core.T2G.LocalDataStorage.GetSystemList", null, EventIdEnum.GroundCore); using (PIS.Ground.Core.T2G.WebServices.Identification.IdentificationPortTypeClient objIdentification = new IdentificationPortTypeClient()) { systemList lSystemStructList = objIdentification.enumSystems(_sessionData.SessionId); List <SystemInfo> lSystemList; if (T2GDataConverter.BuildSystemList(lSystemStructList, out lSystemList)) { // Construct the current system list from the returned data UpdateSystemList(lSystemList); } SubscribeToMessageNotifications(); SubscribeToServiceNotifications(); } } catch (Exception ex) { LogManager.WriteLog(TraceType.ERROR, ex.Message, "PIS.Ground.Core.T2G.T2GClient.GetSystemList", ex, EventIdEnum.GroundCore); } }
/// <summary> /// Implements the enumSessions of T2G-Identification service. /// </summary> /// <param name="request">The request input.</param> /// <returns>The list of know systems.</returns> public enumSystemsOutput enumSystems(enumSystemsInput request) { if (!IsSessionValid(request.Body.sessionId)) { throw FaultExceptionFactory.CreateInvalidSessionIdentifierFault(); } systemList systemList = new systemList(); lock (_systemInfoLock) { systemList.Capacity = _systems.Count; systemList.AddRange(_systems.Values); } enumSystemsOutput result = new enumSystemsOutput(); result.Body = new enumSystemsOutputBody(systemList); return(result); }