Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DatasetStorageProxy"/> class.
        /// </summary>
        /// <param name="connection">The object that stores the information used to connect with the actual dataset application.</param>
        /// <param name="selector">The object that handles the selection of part groups for the current dataset.</param>
        /// <param name="compositionLayer">The object that stores the composition of the part groups and parts in the dataset.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="connection"/> is <see langword="null" />.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="compositionLayer"/> is <see langword="null" />.
        /// </exception>
        public DatasetStorageProxy(
            DatasetOnlineInformation connection,
            GroupSelector selector,
            IProxyCompositionLayer compositionLayer)
        {
            {
                Lokad.Enforce.Argument(() => connection);
                Lokad.Enforce.Argument(() => selector);
                Lokad.Enforce.Argument(() => compositionLayer);
            }

            m_Selector = selector;
            m_CompositionLayer = compositionLayer;
            m_Connection = connection;
            m_Connection.OnTimelineUpdate +=
                (s, e) =>
                {
                    m_CompositionLayer.ReloadFromDataset();
                };
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DatasetStorageProxy"/> class.
        /// </summary>
        /// <param name="connection">The object that stores the information used to connect with the actual dataset application.</param>
        /// <param name="selector">The object that handles the selection of part groups for the current dataset.</param>
        /// <param name="compositionLayer">The object that stores the composition of the part groups and parts in the dataset.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="connection"/> is <see langword="null" />.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="compositionLayer"/> is <see langword="null" />.
        /// </exception>
        public DatasetStorageProxy(
            DatasetOnlineInformation connection,
            GroupSelector selector,
            IProxyCompositionLayer compositionLayer)
        {
            {
                Lokad.Enforce.Argument(() => connection);
                Lokad.Enforce.Argument(() => selector);
                Lokad.Enforce.Argument(() => compositionLayer);
            }

            m_Selector                     = selector;
            m_CompositionLayer             = compositionLayer;
            m_Connection                   = connection;
            m_Connection.OnTimelineUpdate +=
                (s, e) =>
            {
                m_CompositionLayer.ReloadFromDataset();
            };
        }