Skip to content

Handling multiple updates #4

@b2k

Description

@b2k

I added a bit of code to the update process to handle multiple pending updates.

In the server manifest I added
<manifests>
<manifest>
....
</manifest>
<manifest>
...
</manifest>
</manifests>

            // download manifest
            XDocument doc = XDocument.Load(Settings.Default.RemoteManifest);

            // b2k -- look for multiple versions in the file.
            var versions = doc.Descendants("version");
            if (versions.Count() > 1)
            {
                var nextVersion =
                    versions.SkipWhile(node => new Version(node.Value) <= appVersion ).FirstOrDefault();
                if (nextVersion != null && nextVersion.Parent != null)
                {
                    doc = new XDocument(nextVersion.Parent.ToString());
                }
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions