Exemplo n.º 1
0
        public async Task InitStoreAsync(
            HyperConnectionSettings connection)
        {
            if (connection == null)
            {
                throw new ArgumentException(nameof(connection));
            }
            if (string.IsNullOrWhiteSpace(connection.ConnectionUri))
            {
                throw new ArgumentException(nameof(connection.ConnectionUri));
            }

            _netStore = await NetStore.ConnectAsyncThrows(connection.ConnectionUri);

            _request = OwnerComponent?.GetObjectFromQueryString <CrossModuleVisualizationRequest>("request");

            if (_request != null)
            {
                _request.MissionIds = _request.MissionDocIds?.Select(t => t.Id).ToArray();
            }

            FilterVm.TimeRangeOptions       = GetTimeRangeOptions();
            FilterVm.MissionInstanceOptions = await GetMissionInstanceOptionsAsync();

            FilterVm.SelectedMissionInstance = _request?.MissionInstanceDocIds?.FirstOrDefault().Id ?? "0";
        }
 public async Task InitStoreAsync(HyperConnectionSettings connection)
 {
     if (connection != null)
     {
         try
         {
             _netStore = await NetStore.ConnectAsyncThrows(connection.ConnectionUri);
         }
         catch (Exception ex)
         {
             Logger.Instance.Error("Cannot establish the specified connection", ex.Message);
         }
     }
 }
Exemplo n.º 3
0
        public async Task InitStoreAsync(HyperConnectionSettings connection)
        {
            if (connection == null)
            {
                throw new ArgumentException(nameof(connection));
            }
            if (string.IsNullOrWhiteSpace(connection.ConnectionUri))
            {
                throw new ArgumentException(nameof(connection.ConnectionUri));
            }

            ServerUri = connection.ConnectionUri;
            try
            {
                _netStore = await NetStore.ConnectAsyncThrows(ServerUri);
            }
            catch (Exception ex)
            {
                Logger.Instance.Error("Cannot establish the specified connection", ex.Message);
            }
        }