public SendProjectResult SendProject( BackgroundWorker bw, SendProjectInformation information) { var result = new SendProjectResult(); var filePathsToSend = new List <string>(); // -- information.SendFilesEMailReceivers = translate(information.SendFilesEMailReceivers); if (information.SendLocalSettings) { filePathsToSend.Add(information.SettingsFilePath); } if (information.SendProjectFile) { filePathsToSend.Add(information.Project.ProjectConfigurationFilePath.FullName); } if (information.SendResourceFiles) { if (information.SendProjectFile) { // TODO: Later, we could also copy the RESX files to a // TODO: temporary location and adjust the references // TODO: to them inside the project file to have a // TODO: ready-to-open project being generated. } // ReSharper disable LoopCanBeConvertedToQuery foreach (var fileGroup in information.Project.FileGroups) // ReSharper restore LoopCanBeConvertedToQuery { if (bw.CancellationPending) { throw new OperationCanceledException(); } // ReSharper disable LoopCanBeConvertedToQuery foreach (var filePath in fileGroup.FilePaths) // ReSharper restore LoopCanBeConvertedToQuery { filePathsToSend.Add(filePath); } } } // -- result.DownloadUrl = doSendFilesWithZetaUploader(bw, information, filePathsToSend.ToArray()); return(result); }
public SendProjectResult SendProject( BackgroundWorker bw, SendProjectInformation information) { var result = new SendProjectResult(); var filePathsToSend = new List<string>(); // -- information.SendFilesEMailReceivers = translate(information.SendFilesEMailReceivers); if (information.SendLocalSettings) { filePathsToSend.Add(information.SettingsFilePath); } if (information.SendProjectFile) { filePathsToSend.Add(information.Project.ProjectConfigurationFilePath.FullName); } if (information.SendResourceFiles) { if (information.SendProjectFile) { // TODO: Later, we could also copy the RESX files to a // TODO: temporary location and adjust the references // TODO: to them inside the project file to have a // TODO: ready-to-open project being generated. } // ReSharper disable LoopCanBeConvertedToQuery foreach (var fileGroup in information.Project.FileGroups) // ReSharper restore LoopCanBeConvertedToQuery { if (bw.CancellationPending) { throw new OperationCanceledException(); } // ReSharper disable LoopCanBeConvertedToQuery foreach (var filePath in fileGroup.FilePaths) // ReSharper restore LoopCanBeConvertedToQuery { filePathsToSend.Add(filePath); } } } // -- result.DownloadUrl = doSendFilesWithZetaUploader(bw, information, filePathsToSend.ToArray()); return result; }