コード例 #1
0
 void AddProjectBuilderReference(RemoteProjectBuilder remoteBuilder)
 {
     if (!remoteBuilder.AddReference())
     {
         RemoveBuilder(remoteBuilder);
     }
 }
コード例 #2
0
 void RemoveBuilder(RemoteProjectBuilder remoteBuilder)
 {
     lock (remoteProjectBuilders) {
         if (remoteProjectBuilders.TryGetValue(remoteBuilder.File, out Task <RemoteProjectBuilder> foundRemoteBuilder))
         {
             if (foundRemoteBuilder.IsCompleted && foundRemoteBuilder.Result == remoteBuilder)
             {
                 remoteProjectBuilders.Remove(remoteBuilder.File);
             }
         }
     }
 }
コード例 #3
0
        async Task <RemoteProjectBuilder> CreateRemoteProjectBuilder(string projectFile)
        {
            var pid = await LoadProject(projectFile).ConfigureAwait(false);

            var pb = new RemoteProjectBuilder(projectFile, pid, this, connection);

            // Unlikely, but it may happen
            if (IsShuttingDown)
            {
                pb.Shutdown();
            }

            return(pb);
        }
コード例 #4
0
        internal async Task UnloadProject(RemoteProjectBuilder remoteBuilder, int projectId)
        {
            RemoveBuilder(remoteBuilder);

            try {
                await connection.SendMessage(new UnloadProjectRequest { ProjectId = projectId }).ConfigureAwait(false);
            } catch (Exception ex) {
                LoggingService.LogError("Project unloading failed", ex);
                if (!await CheckDisconnected())
                {
                    throw;
                }
            }
        }
コード例 #5
0
        internal async Task UnloadProject(RemoteProjectBuilder remoteBuilder, ProjectBuilder builder)
        {
            lock (remoteProjectBuilders)
                remoteProjectBuilders.Remove(remoteBuilder);

            try {
                await connection.SendMessage(new UnloadProjectRequest { ProjectId = ((ProjectBuilder)builder).ProjectId });
            } catch (Exception ex) {
                LoggingService.LogError("Project unloading failed", ex);
                if (!await CheckDisconnected())
                {
                    throw;
                }
            }
        }
コード例 #6
0
        public async Task <RemoteProjectBuilder> CreateRemoteProjectBuilder(string projectFile, string sdksPath)
        {
            var builder = await LoadProject(projectFile, sdksPath).ConfigureAwait(false);

            var pb = new RemoteProjectBuilder(projectFile, builder, this);

            lock (remoteProjectBuilders) {
                remoteProjectBuilders.Add(pb);

                // Unlikely, but it may happen
                if (IsShuttingDown)
                {
                    pb.Shutdown();
                }
            }
            return(pb);
        }
コード例 #7
0
ファイル: RemoteProjectBuilder.cs プロジェクト: wjohnke/CSS18
 public RemoteProjectBuilderProxy(RemoteProjectBuilder builder, bool busySet)
 {
     this.builder = builder;
     this.busySet = busySet;
 }