Esempio n. 1
0
        /// <summary>
        /// @see IProcessAdapter#RegisterStream
        /// </summary>
        /// <param name="obj"></param>
        public void RegisterStream(object obj)
        {
            var stream = obj as IItemStream;

            if (stream != null)
            {
                _stream = stream;
            }
        }
 /// <summary>
 ///  Register a IITemStream as one of the interesting providers under
 /// the provided key.
 /// </summary>
 /// <param name="stream"></param>
 public void Register(IItemStream stream)
 {
     lock (_streams)
     {
         if (!_streams.Contains(stream))
         {
             _streams.Add(stream);
         }
     }
 }
 /// <summary>
 ///  Register a IITemStream as one of the interesting providers under
 /// the provided key.
 /// </summary>
 /// <param name="stream"></param>
 public void Register(IItemStream stream)
 {
     lock (_streams)
     {
         if (!_streams.Contains(stream))
         {
             _streams.Add(stream);
         }
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Effective dispose
 /// </summary>
 /// <param name="disposing"></param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (_stream != null)
         {
             _stream.Close();
         }
         _stream = null;
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Register each of the streams for callbacks at the appropriate time in the
 /// step. The  IItemReader and  IItemWriter are automatically
 /// registered, but it doesn't hurt to also register them here. Injected
 /// dependencies of the reader and writer are not automatically registered,
 ///so if you implement ItemWriter using delegation to another object
 /// which itself is a IItemStream, you need to register the delegate
 /// here.
 /// </summary>
 /// <param name="streams"></param>
 public void SetStreams(IItemStream[] streams)
 {
     foreach (IItemStream stream in streams)
     {
         RegisterStream(stream);
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Register a single IItemStream for callbacks to the stream interface.
 /// </summary>
 /// <param name="stream"></param>
 public void RegisterStream(IItemStream stream)
 {
     _stream.Register(stream);
 }
Esempio n. 7
0
 /// <summary>
 /// Register a single IItemStream for callbacks to the stream interface.
 /// </summary>
 /// <param name="stream"></param>
 public void RegisterStream(IItemStream stream)
 {
     _stream.Register(stream);
 }