Ejemplo n.º 1
0
        public virtual IStorageLocation GetLocation(IMediaId id)
        {
            string            key       = KeyProvider.GetStorageKey(id);
            IStorageContainer container = GetContainer(KeyProvider.GetContainerName(key));
            var location = container.GetLocation(KeyProvider.GetLocationName(key), id);


            return(location);
        }
Ejemplo n.º 2
0
        public IEnumerable <IStorageLocation> EnumerateLocation(IMediaId id)
        {
            string key           = KeyProvider.GetStorageKey(id);
            string containerName = KeyProvider.GetContainerName(key);


            foreach (IStorageContainer container in GetContainers(containerName))
            {
                foreach (IStorageLocation location in container.GetLocations(KeyProvider.GetLocationName(key)))
                {
                    yield return(location);
                }
            }
        }
Ejemplo n.º 3
0
        public bool Exists(IMediaId id)
        {
            string            key           = KeyProvider.GetStorageKey(id);
            string            containerName = KeyProvider.GetContainerName(key);
            IStorageContainer container;


            if (ContainerExists(containerName))
            {
                container = GetContainer(containerName);

                return(container.LocationExists(KeyProvider.GetLocationName(key)));
            }

            return(false);
        }