Пример #1
0
 internal void UnregisterStorage(ContentStorage storage)
 {
     lock (containers)
     {
         containers.Remove(storage.Url);
     }
 }
Пример #2
0
        /// <summary>
        /// Gets the storage container.
        /// </summary>
        /// <param name="storageHeader">The storage header.</param>
        /// <returns>Content Storage container.</returns>
        public ContentStorage GetStorage(ref ContentStorageHeader storageHeader)
        {
            ContentStorage result;

            lock (containers)
            {
                if (!containers.TryGetValue(storageHeader.DataUrl, out result))
                {
                    result = new ContentStorage(this);
                    containers.Add(storageHeader.DataUrl, result);
                }
                result.Init(ref storageHeader);
            }

            Debug.Assert(result != null && result.Url == storageHeader.DataUrl);
            return(result);
        }
Пример #3
0
 internal ContentChunk(ContentStorage storage, int location, int size)
 {
     Storage  = storage;
     Location = location;
     Size     = size;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentStreamingException"/> class.
 /// </summary>
 /// <param name="msg">The message.</param>
 /// <param name="storage">The storage container.</param>
 public ContentStreamingException(string msg, ContentStorage storage = null)
     : base("An internal error happened in the content streaming service [details:'" + msg + "'")
 {
     Storage = storage;
 }