public SignatureHelpSource(ITextBuffer textBuffer, ICoreShell shell) { _disposeToken = DisposeToken.Create <SignatureHelpSource>(); _textBuffer = textBuffer; _shell = shell; ServiceManager.AddService <SignatureHelpSource>(this, textBuffer, shell); }
public RSignatureHelpSource(ITextBuffer textBuffer, IServiceContainer services) { _disposeToken = DisposeToken.Create <RSignatureHelpSource>(); _textBuffer = textBuffer; _services = services; _settings = _services.GetService <IREditorSettings>(); _broker = _services.GetService <ISignatureHelpBroker>(); _engine = new RFunctionSignatureEngine(services); textBuffer.AddService(this); }
public RSession(int id, Action onDispose) { Id = id; _onDispose = onDispose; _disposeToken = DisposeToken.Create <RSession>(); _disableMutatingOnReadConsole = new CountdownDisposable(() => { if (!_delayedMutatedOnReadConsole) { return; } _delayedMutatedOnReadConsole = false; Task.Run(() => Mutated?.Invoke(this, EventArgs.Empty)); }); }
public PriorityProducerConsumer(int maxPriority = 1, bool excludeDuplicates = false, IEqualityComparer <T> comparer = null) { _maxPriority = maxPriority; _queues = new List <T> [maxPriority]; for (var i = 0; i < _queues.Length; i++) { _queues[i] = new List <T>(); } _syncObj = new object(); _pendingTasks = new Queue <Pending>(); _firstAvailablePriority = _maxPriority; _disposeToken = DisposeToken.Create <PriorityProducerConsumer <T> >(); _excludeDuplicates = excludeDuplicates; _comparer = comparer ?? EqualityComparer <T> .Default; }
public RSession(int id, IRHostBrokerConnector brokerConnector, Action onDispose) { Id = id; BrokerConnector = brokerConnector; _onDispose = onDispose; _disposeToken = DisposeToken.Create <RSession>(); _disableMutatingOnReadConsole = new CountdownDisposable(() => { if (!_delayedMutatedOnReadConsole) { return; } _delayedMutatedOnReadConsole = false; Task.Run(() => Mutated?.Invoke(this, EventArgs.Empty)); }); _afterHostStartedTask = TaskUtilities.CreateCanceled(new RHostDisconnectedException()); }
public RSession(int id, IBrokerClient brokerClient, Action onDispose) { Id = id; BrokerClient = brokerClient; _onDispose = onDispose; _disposeToken = DisposeToken.Create <RSession>(); _disableMutatingOnReadConsole = new CountdownDisposable(() => { if (!_delayedMutatedOnReadConsole) { return; } _delayedMutatedOnReadConsole = false; Task.Run(() => Mutated?.Invoke(this, EventArgs.Empty)); }); _initializationLock = new BinaryAsyncLock(); _initializationTcs = new TaskCompletionSourceEx <object>(); _afterHostStartedTask = TaskUtilities.CreateCanceled(new RHostDisconnectedException()); }
public RSession(int id, string name, IBrokerClient brokerClient, IExclusiveReaderLock initializationLock, Action onDispose) { Id = id; Name = name; BrokerClient = brokerClient; _onDispose = onDispose; _disposeToken = DisposeToken.Create <RSession>(); _disableMutatingOnReadConsole = new CountdownDisposable(() => { if (!_delayedMutatedOnReadConsole) { return; } _delayedMutatedOnReadConsole = false; Task.Run(() => Mutated?.Invoke(this, EventArgs.Empty)); }); _initializationLock = initializationLock; _stopHostLock = new BinaryAsyncLock(true); _hostStartedTcs = new TaskCompletionSourceEx <object>(); _startupInfo = new RHostStartupInfo(); }
public InteractiveWindowConsole(IServiceContainer services) { _disposeToken = DisposeToken.Create <InteractiveWindowConsole>(); _workflow = services.GetService <IRInteractiveWorkflow>(); _mainThread = services.MainThread(); }
public DisposeTokenTest() { _disposeToken = DisposeToken.Create <DisposeTokenTest>(); }
public InteractiveWindowConsole(IRInteractiveWorkflowVisual workflow) { _workflow = workflow; _disposeToken = DisposeToken.Create <InteractiveWindowConsole>(); _mainThread = _workflow.Shell.MainThread(); }