public MethodTrack(IServiceProvider sp) { _serviceProvider = sp; _dataService = sp.GetService(typeof(SSrcMLDataService)) as ISrcMLDataService; _srcmlService = sp.GetService(typeof(SSrcMLGlobalService)) as ISrcMLGlobalService; _cursorMonitor = sp.GetService(typeof(SCursorMonitorService)) as ICursorMonitorService; _currentMethod = new Method(); _navigatedMethods = new List <Method>(); _currentCursor = new CursorPos("", 0, 0); if (null != _cursorMonitor) { _cursorMonitor.PropertyChanged += OnCursorMoving; } if (null != _srcmlService) { _srcmlService.SourceFileChanged += OnFileChanged; } }
public MethodTrack(IServiceProvider sp) { _serviceProvider = sp; _dataService = sp.GetService(typeof(SSrcMLDataService)) as ISrcMLDataService; _srcmlService = sp.GetService(typeof(SSrcMLGlobalService)) as ISrcMLGlobalService; _cursorMonitor = sp.GetService(typeof(SCursorMonitorService)) as ICursorMonitorService; _currentMethod = new Method(); _navigatedMethods = new List<Method>(); _currentCursor = new CursorPos("", 0, 0); if (null != _cursorMonitor) _cursorMonitor.PropertyChanged += OnCursorMoving; if(null != _srcmlService) _srcmlService.SourceFileChanged += OnFileChanged; }