Esempio n. 1
0
        /// <summary>
        /// Beendet eine Aufzeichnung.
        /// </summary>
        /// <param name="sourceName">Der Name des Senders.</param>
        /// <param name="key">Die Identifikation der Aufzeichnung.</param>
        public void StopRecordingFeed(string sourceName, string key)
        {
            // Look it up
            var source = m_provider.Translate(sourceName);

            if (source == null)
            {
                throw new ArgumentException("unbekannter sender", "sourceName");
            }

            // Find the feed
            var feed = FindFeed(source);

            if (feed == null)
            {
                return;
            }
            else if (!feed.IsRecording(key))
            {
                return;
            }

            // Prepare the change
            using (var tx = new FeedTransaction(this))
            {
                // Mark as active
                tx.DisableRecording(feed, key);

                // Avoid cleanup
                tx.Commit();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Beendet alle Aufträge.
        /// </summary>
        public void Shutdown()
        {
            // Prepare the change
            using (var tx = new FeedTransaction(this))
            {
                // All feeds
                foreach (var feed in Feeds)
                {
                    // Primary
                    if (feed.IsPrimaryView)
                    {
                        tx.DisablePrimaryView(feed);
                    }

                    // Secondary
                    if (feed.IsSecondaryView)
                    {
                        tx.DisableSecondaryView(feed);
                    }

                    // Recording
                    foreach (var recording in feed.Recordings.ToArray())
                    {
                        tx.DisableRecording(feed, recording);
                    }
                }

                // Process all
                tx.Commit();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Beendet eine Aufzeichnung.
        /// </summary>
        /// <param name="sourceName">Der Name des Senders.</param>
        /// <param name="key">Die Identifikation der Aufzeichnung.</param>
        public void StopRecordingFeed( string sourceName, string key )
        {
            // Look it up
            var source = m_provider.Translate( sourceName );
            if (source == null)
                throw new ArgumentException( "unbekannter sender", "sourceName" );

            // Find the feed
            var feed = FindFeed( source );
            if (feed == null)
                return;
            else if (!feed.IsRecording( key ))
                return;

            // Prepare the change
            using (var tx = new FeedTransaction( this ))
            {
                // Mark as active
                tx.DisableRecording( feed, key );

                // Avoid cleanup
                tx.Commit();
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Beendet alle Aufträge.
        /// </summary>
        public void Shutdown()
        {
            // Prepare the change
            using (var tx = new FeedTransaction( this ))
            {
                // All feeds
                foreach (var feed in Feeds)
                {
                    // Primary
                    if (feed.IsPrimaryView)
                        tx.DisablePrimaryView( feed );

                    // Secondary
                    if (feed.IsSecondaryView)
                        tx.DisableSecondaryView( feed );

                    // Recording
                    foreach (var recording in feed.Recordings.ToArray())
                        tx.DisableRecording( feed, recording );
                }

                // Process all
                tx.Commit();
            }
        }