Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SaveAllCommand #238

Merged
merged 2 commits into from
May 21, 2018
Merged

Add SaveAllCommand #238

merged 2 commits into from
May 21, 2018

Conversation

diluculo
Copy link
Contributor

Please see #215 and #237

if (persistedDocument == null) continue;

// skip if the file is new
if (!persistedDocument.IsNew)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what Visual Studio does?

@mwpowellhtx
Copy link
Contributor

For my edification, is "what" (this) what Visual Studio does?

@diluculo
Copy link
Contributor Author

diluculo commented Sep 5, 2016

@tgjones Actually the SaveAll command in VS saves all edited (IsDirty) documents and it shows "Save Prompt" for new documents. However, I think "skip new document" is enough, if users know it.

@mwpowellhtx
Copy link
Contributor

Yes, I believe that's correct, including project changes.

{
var tasks = new List<Task<Tuple<IPersistedDocument, bool>>>();

foreach (var document in _shell.Documents)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed to this:
foreach (var document in _shell.Documents.OfType<IPersistedDocument>().Where(x => !x.IsNew))

@diluculo diluculo force-pushed the 215_SaveAllCommand branch from ffd86e6 to aadeb81 Compare May 15, 2018 08:14
@tgjones
Copy link
Owner

tgjones commented May 15, 2018

LGTM - @diluculo is this ready to merge?

@diluculo
Copy link
Contributor Author

Please merge this, which was rebased onto the latest master.

@tgjones tgjones merged commit fbddde7 into tgjones:master May 21, 2018
@tgjones
Copy link
Owner

tgjones commented May 21, 2018

Thanks!

@diluculo diluculo deleted the 215_SaveAllCommand branch May 23, 2018 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants