forked from kendarorg/RepositoryCache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleServiceIndex.cs
More file actions
42 lines (32 loc) · 2.49 KB
/
SampleServiceIndex.cs
File metadata and controls
42 lines (32 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
namespace NugetProtocol
{
public class SampleServiceIndex : IIndexService
{
private IServicesMapper _servicesMapper = null;
public ServiceIndex Get(Guid repoId)
{
return new ServiceIndex("3.0.0", new List<Service>
{
new Service(_servicesMapper.From(repoId,"PackagePublish/2.0.0"),"PackagePublish/2.0.0","Publish"),
new Service(_servicesMapper.From(repoId,"SearchQueryService"),"SearchQueryService","Search"),
new Service(_servicesMapper.From(repoId,"SearchQueryService/3.0.0-beta"),"SearchQueryService/3.0.0-beta","Search"),
new Service(_servicesMapper.From(repoId,"SearchQueryService/3.0.0-rc"),"SearchQueryService/3.0.0-rc","Search"),
new Service(_servicesMapper.From(repoId,"RegistrationsBaseUrl"),"RegistrationsBaseUrl","Registration, semver 1.0.0"),
new Service(_servicesMapper.From(repoId,"RegistrationsBaseUrl/3.0.0-beta"),"RegistrationsBaseUrl/3.0.0-beta","Registration, semver 1.0.0"),
new Service(_servicesMapper.From(repoId,"RegistrationsBaseUrl/3.0.0-rc"),"RegistrationsBaseUrl/3.0.0-rc","Registration, semver 1.0.0"),
new Service(_servicesMapper.From(repoId,"PackageDisplayMetadataUriTemplate/3.0.0-rc","{id-Lower}","index.json"),
"PackageDisplayMetadataUriTemplate/3.0.0-rc","Packages metadata"),
new Service(_servicesMapper.From(repoId,"PackageVersionDisplayMetadataUriTemplate/3.0.0-rc","{id-Lower}","{version-Lower}.json"),
"PackageVersionDisplayMetadataUriTemplate/3.0.0-rc","Packages metadata"),
new Service(_servicesMapper.From(repoId,"RegistrationsBaseUrl/3.4.0"),"RegistrationsBaseUrl/3.4.0","Registration, semver 1.0.0, gz"),
new Service(_servicesMapper.From(repoId,"RegistrationsBaseUrl/3.6.0"),"RegistrationsBaseUrl/3.6.0","Registration, semver 2.0.0, gz"),
new Service(_servicesMapper.From(repoId,"SearchQueryService/3.0.0-rc"),"SearchQueryService/3.0.0-rc","Search"),
new Service(_servicesMapper.From(repoId,"LegacyGallery/2.0.0"),"LegacyGallery/2.0.0","Gallery"),
new Service(_servicesMapper.From(repoId,"LegacyGallery"),"LegacyGallery","Gallery"),
new Service(_servicesMapper.From(repoId,"SearchGalleryQueryService/3.0.0-rc"),"SearchGalleryQueryService/3.0.0-rc","Gallery"),
},new IndexCatalog());
}
}
}