public void AddPersistentBreadcrumb(PersistentBreadcrumbTypeDefinitionKey type, string id)
        {
            Breadcrumb item = new Breadcrumb(id, type.Id);

            persistentBreadcrumbs.Add(item);
            addSyncQueue.Add(item);
            if (addSyncCoroutine == null || addSyncCoroutine.Disposed)
            {
                addSyncCoroutine = CoroutineRunner.Start(syncAddedBreadcumbs(), this, "Batching breadcrumb adds");
            }
            AddBreadcrumb(PersistentBreadcrumbTypeDefinition.ToStaticBreadcrumb(type.Id, id));
        }
 private void setAllBreadcrumbs(List <Breadcrumb> crumbs)
 {
     persistentBreadcrumbs = new List <Breadcrumb>();
     if (crumbs == null)
     {
         return;
     }
     for (int i = 0; i < crumbs.Count; i++)
     {
         if (!string.IsNullOrEmpty(crumbs[i].id))
         {
             int breadcrumbType = crumbs[i].breadcrumbType;
             AddBreadcrumb(PersistentBreadcrumbTypeDefinition.ToStaticBreadcrumb(breadcrumbType, crumbs[i].id));
             persistentBreadcrumbs.Add(crumbs[i]);
         }
     }
 }
        public void RemovePersistentBreadcrumb(PersistentBreadcrumbTypeDefinitionKey type, string id)
        {
            string text = PersistentBreadcrumbTypeDefinition.ToStaticBreadcrumb(type.Id, id);

            if (!breadcrumbs.ContainsKey(text))
            {
                return;
            }
            for (int i = 0; i < persistentBreadcrumbs.Count; i++)
            {
                if (persistentBreadcrumbs[i].breadcrumbType == type.Id && persistentBreadcrumbs[i].id.Equals(id))
                {
                    List <Breadcrumb> list = new List <Breadcrumb>();
                    list.Add(persistentBreadcrumbs[i]);
                    persistentBreadcrumbs.Remove(persistentBreadcrumbs[i]);
                    Service.Get <INetworkServicesManager>().BreadcrumbService.RemoveBreadcrumbIds(list);
                    RemoveBreadcrumb(text);
                    break;
                }
            }
        }
 public DictionaryKey(string typeId, PersistentBreadcrumbTypeDefinition type)
 {
     TypeId = typeId;
     Type   = type;
 }
 public int GetPersistentBreadcrumbCount(PersistentBreadcrumbTypeDefinitionKey type, string id)
 {
     return(GetBreadcrumbCount(PersistentBreadcrumbTypeDefinition.ToStaticBreadcrumb(type.Id, id)));
 }
 public void SetBreadcrumbId(PersistentBreadcrumbTypeDefinitionKey breadcrumbType, string instanceId)
 {
     SetBreadcrumbId(PersistentBreadcrumbTypeDefinition.ToStaticBreadcrumb(breadcrumbType.Id, instanceId));
 }