public static ResourceSyncDocument CreateSourceDescription(Uri baseUri, params Location[] capabilityLists)
            {
                var metadata = new ResourceSyncMetadata {
                    Capability = CapabilityNames.SourceDescription
                };
                var sitemap = new ResourceSyncDocument(baseUri ?? new Uri("/", UriKind.Relative), metadata);

                foreach (var resourceSetCapability in capabilityLists)
                {
                    sitemap.Add(resourceSetCapability);
                }
                return(sitemap);
            }
            public static ResourceSyncDocument CreateChangeNotification(Uri baseUri, Uri parentUri, ResourceSet resourceSet, params ChangeLocation[] operationLocations)
            {
                var metadata = new ResourceSyncMetadata {
                    Capability = CapabilityNames.ChangelistNotification
                };
                var sitemap = new ResourceSyncDocument(baseUri, metadata);

                foreach (var operationLocation in operationLocations)
                {
                    sitemap.Add(operationLocation);
                }
                sitemap.Add(Link.CreateUpLink(parentUri.ToString()));
                return(sitemap);
            }
            public static ResourceSyncDocument CreateCapabilityList(Uri baseUri, ResourceSet resourceSet, params CapabilityLocation[] operationLocations)
            {
                var metadata = new ResourceSyncMetadata {
                    Capability = CapabilityNames.CapabilityList
                };
                var sitemap = new ResourceSyncDocument(baseUri, metadata);

                foreach (var operationLocation in operationLocations)
                {
                    sitemap.Add(operationLocation);
                }
                sitemap.Add(Link.CreateUpLink(baseUri, UriPartNames.WellKnownResourceSync));
                return(sitemap);
            }
            public static ResourceSyncDocument CreateChangeDump(Uri baseUri,
                                                                Uri parentCapabilityListUri,
                                                                ResourceSet resourceSet,
                                                                DateTime from,
                                                                params Location[] operationLocations)
            {
                var metadata = new ResourceSyncMetadata {
                    Capability = CapabilityNames.ChangeDump, From = from
                };
                var sitemap = new ResourceSyncDocument(baseUri, metadata);

                foreach (var operationLocation in operationLocations)
                {
                    sitemap.Add(operationLocation);
                }
                sitemap.Add(Link.CreateUpLink(baseUri, parentCapabilityListUri.ToString()));
                return(sitemap);
            }