Ejemplo n.º 1
0
        // ---- 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);
            }
        }
Ejemplo n.º 2
0
 /// <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);
         }
     }
 }
Ejemplo n.º 3
0
        public void Put(string repositoryId, ITypeDefinition typeDefinition)
        {
            if ((typeDefinition == null) || (typeDefinition.Id == null))
            {
                return;
            }

            cache.Put(new string[] { repositoryId, typeDefinition.Id }, typeDefinition);
        }
Ejemplo n.º 4
0
        public void Put(IRepositoryInfo repositoryInfo)
        {
            if ((repositoryInfo == null) || (repositoryInfo.Id == null))
            {
                return;
            }

            cache.Put(new string[] { repositoryInfo.Id }, repositoryInfo);
        }
Ejemplo n.º 5
0
        // ---- repository links ----

        public void AddRepositoryLink(string repositoryId, string rel, string link)
        {
            repositoryLinkCache.Put(new string[] { repositoryId, rel }, link);
        }
Ejemplo n.º 6
0
        // ---- templates ----

        public void AddTemplate(string repositoryId, string type, string link)
        {
            templateCache.Put(new string[] { repositoryId, type }, link);
        }
Ejemplo n.º 7
0
        // ---- collections ----

        public void AddCollection(string repositoryId, string collection, string link)
        {
            collectionLinkCache.Put(new string[] { repositoryId, collection }, link);
        }