Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="link">The link this repository will be associated with.</param>
        public DataRepository(IDataLink link)
        {
            if (link == null)
            {
                throw new ArgumentNullException("link", "Data Link cannot be null.");
            }
            if (link.IsDisposed)
            {
                throw new ObjectDisposedException(link.ToString());
            }

            _Link         = link;
            _TemplateLink = link.Clone();

            _SerialId       = ++Uber.RepositoryLastSerial;
            _UberMaps       = new UberMapCollection(this);
            _UberOperations = new UberOperationList(this);

            if (Uber.EnableCollector)
            {
                EnableCollector();
            }
        }