Ejemplo n.º 1
0
        public static StreamManagerSharedStream CreateSharedStream(ISourcePaths source)
        {
            foreach (string path in source.SourcePaths)
            {
                if (c_sharedStreams.ContainsKey(path))
                    throw new Exception("Stream location already shared");

                c_sharedStreams.Add(path, null);
            }

            var shared = new StreamManagerSharedStream(source);

            return shared;
        }
Ejemplo n.º 2
0
 private static void DisposeStream(ISourcePaths source)
 {
     foreach (string path in source.SourcePaths)
     {
         if (c_sharedStreams.ContainsKey(path))
         {
             var stream = c_sharedStreams[path];
             c_sharedStreams.Remove(path);
             if (stream != null)
             {
                 stream.Dispose();
             }
         }
     }
 }
Ejemplo n.º 3
0
        public static StreamManagerSharedStream CreateSharedStream(ISourcePaths source)
        {
            foreach (string path in source.SourcePaths)
            {
                if (c_sharedStreams.ContainsKey(path))
                {
                    throw new Exception("Stream location already shared");
                }

                c_sharedStreams.Add(path, null);
            }

            var shared = new StreamManagerSharedStream(source);

            return(shared);
        }
Ejemplo n.º 4
0
 public StreamManagerSharedStream(ISourcePaths source)
 {
     m_source = source;
 }
Ejemplo n.º 5
0
 private static void DisposeStream(ISourcePaths source)
 {
     foreach (string path in source.SourcePaths)
     {
         if (c_sharedStreams.ContainsKey(path))
         {
             var stream = c_sharedStreams[path];
             c_sharedStreams.Remove(path);
             if (stream != null)
                 stream.Dispose();
         }
     }
 }
Ejemplo n.º 6
0
 public StreamManagerSharedStream(ISourcePaths source)
 {
     m_source = source;
 }