Esempio n. 1
0
        static void Main(string[] args)
        {
            try
            {

            var i = new MetadataService.Repository();
            var methods = i.findMethods("prc_loadqueue");
            methods.Wait();
            Debug.WriteLine(i.getPLSQLWrapper(methods.Result.Matches.FirstOrDefault()).ToString());
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.ToString());
            }
        }
Esempio n. 2
0
        public MainViewModel()
        {

            // Register commands    
            _createDatabaseCommand = new RelayCommand(() => {});
            _updateMetadataCommand = new RelayCommand(() => { _repository.Load();}, () => !IsWorking);
            _exitCommand = new RelayCommand(() => { App.Current.Shutdown(); });

            // Build Servicies    
            _repository = new Repository();
            _methodSelection = new MethodSelectionModel();


var searchTerms = this.ObservableForProperty(x => x.SearchTerm).Value().Throttle(TimeSpan.FromSeconds(0.5));
var searchResults = searchTerms.SelectMany(searchTerm => _repository.findMethods(searchTerm));

var latestMatches = searchTerms.CombineLatest(searchResults, (searchTerm, searchResult) =>
        searchResult.SearchTerm != searchTerm
        ? null : searchResult.Matches)
        .Where(matches => matches != null);

_Matches = latestMatches.ToProperty(this, x => x.Matches);
searchTerms.Subscribe(onNext : x => TaskStarted() ,onCompleted : () => TaskCompleted() );

           // DoUpdateMetadata();

        }