// ---- type links --- public void AddTypeLink(string repositoryId, string id, string rel, string type, string link) { if (KnownLinks.Contains(rel)) { typeLinkCache.Put(new string[] { repositoryId, id, rel, type }, link); } }
/// <summary> /// Adds a link. /// </summary> public void AddLink(string repositoryId, string id, string rel, string type, string link) { if (KnownLinks.Contains(rel)) { linkCache.Put(new string[] { repositoryId, id, rel, type }, link); } else if (BindingConstants.RelAlternate == rel) { // use streamId instead of type as discriminating parameter string streamId = ExtractStreamId(link); if (streamId != null) { linkCache.Put(new string[] { repositoryId, id, rel, streamId }, link); } } }
public void Put(string repositoryId, ITypeDefinition typeDefinition) { if ((typeDefinition == null) || (typeDefinition.Id == null)) { return; } cache.Put(new string[] { repositoryId, typeDefinition.Id }, typeDefinition); }
public void Put(IRepositoryInfo repositoryInfo) { if ((repositoryInfo == null) || (repositoryInfo.Id == null)) { return; } cache.Put(new string[] { repositoryInfo.Id }, repositoryInfo); }
// ---- repository links ---- public void AddRepositoryLink(string repositoryId, string rel, string link) { repositoryLinkCache.Put(new string[] { repositoryId, rel }, link); }
// ---- templates ---- public void AddTemplate(string repositoryId, string type, string link) { templateCache.Put(new string[] { repositoryId, type }, link); }
// ---- collections ---- public void AddCollection(string repositoryId, string collection, string link) { collectionLinkCache.Put(new string[] { repositoryId, collection }, link); }