Esempio n. 1
0
        public Catalogue Read()
        {
            const string method = "Read";

            try
            {
                var catalogue           = new Catalogue();
                ICatalogueReader reader = StartReading();

                try
                {
                    reader.Read(catalogue);
                }
                finally
                {
                    StopReading();
                }

                return(catalogue);
            }
            catch (System.Exception e)
            {
                throw new CannotConnectToRepositoryException(GetType(), method, Constants.Module.DisplayName, "XXX", _initialisationString, e);
            }
        }
Esempio n. 2
0
        public TCatalogueItem Read(int id)
        {
            if (id < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(id));
            }

            return(_catalogueReader.Read(_list, id));
        }