Ejemplo n.º 1
0
        private void ShowIntellisense(bool force)
        {
            var pos = _editor.CurrentPosition - 1;

            if (pos == 0)
            {
                return;
            }

            var text = _editor.Text;

            EntityCache.TryGetEntities(_con.ServiceClient, out var entities);

            var suggestions = new Autocomplete(entities, Metadata).GetSuggestions(text, pos, out var currentLength).ToList();

            if (suggestions.Count == 0)
            {
                return;
            }

            if (force || currentLength > 0 || text[pos] == '.')
            {
                _editor.AutoCShow(currentLength, String.Join(_editor.AutoCSeparator.ToString(), suggestions));
            }
        }
Ejemplo n.º 2
0
        private void AddConnection(ConnectionDetail con)
        {
            _metadata[con] = new AttributeMetadataCache(con.ServiceClient);
            _objectExplorer.AddConnection(con);

            // Start loading the entity list in the background
            EntityCache.TryGetEntities(con.ServiceClient, out _);

            _metadata[con].MetadataLoading += MetadataLoading;
            //_metadata[con].LoadAllAsync();
        }
Ejemplo n.º 3
0
        public void AddConnection(ConnectionDetail con)
        {
            var svc = con.ServiceClient;

            EntityCache.TryGetEntities(con.MetadataCacheLoader, svc, out _);

            var conNode = treeView.Nodes.Add(con.ConnectionName);

            conNode.Tag = con;
            conNode.ContextMenuStrip = serverContextMenuStrip;
            SetIcon(conNode, "Environment");

            AddConnectionChildNodes(con, svc, conNode);
        }
Ejemplo n.º 4
0
        private void AddConnection(ConnectionDetail con)
        {
            if (!_dataSources.ContainsKey(con.ConnectionName))
            {
                var metadata = new SharedMetadataCache(con, GetNewServiceClient(con));

                _dataSources[con.ConnectionName] = new DataSource
                {
                    ConnectionDetail = con,
                    Connection       = GetNewServiceClient(con),
                    Metadata         = metadata,
                    TableSizeCache   = new TableSizeCache(GetNewServiceClient(con), metadata),
                    Name             = con.ConnectionName
                };
            }

            // Start loading the entity list in the background
            EntityCache.TryGetEntities(con.MetadataCacheLoader, GetNewServiceClient(con), out _);
        }