private Task ProcessCommandLineHandlersAsync(IComparable version, BuildOptions added, BuildOptions removed, ContextState state, CancellationToken cancellationToken) { foreach (ExportLifetimeContext <IWorkspaceContextHandler> handler in _handlers) { cancellationToken.ThrowIfCancellationRequested(); if (handler.Value is ICommandLineHandler commandLineHandler) { commandLineHandler.Handle(version, added, removed, state, _logger); } } return(Task.CompletedTask); }
public void HandleCommandLineNotifications(string binPath, BuildOptions added, BuildOptions removed) { if (added is FSharpBuildOptions fscAdded) { foreach (Action <string, ImmutableArray <CommandLineSourceFile>, ImmutableArray <CommandLineReference>, ImmutableArray <string> > handler in _handlers) { handler?.Invoke(binPath, fscAdded.SourceFiles, fscAdded.MetadataReferences, fscAdded.CompileOptions); } } return; }
private void ProcessCommandLineHandlers(IComparable version, BuildOptions added, BuildOptions removed, bool isActiveContext, CancellationToken cancellationToken) { foreach (ExportLifetimeContext <IWorkspaceContextHandler> handler in _handlers) { if (cancellationToken.IsCancellationRequested) { break; } if (handler.Value is ICommandLineHandler commandLineHandler) { commandLineHandler.Handle(version, added, removed, isActiveContext, _logger); } } }
public BuildOptions Parse(IEnumerable <string> args, string projectPath) { return(BuildOptions.FromCommandLineArguments( CSharpCommandLineParser.Default.Parse(args, Path.GetDirectoryName(projectPath), sdkDirectory: null, additionalReferenceDirectories: null))); }
public BuildOptions Parse(IEnumerable <string> args, string baseDirectory) { return(BuildOptions.FromCommandLineArguments( CSharpCommandLineParser.Default.Parse(args, baseDirectory, sdkDirectory: null, additionalReferenceDirectories: null))); }