Пример #1
0
        protected System.IO.Stream GetDataStream()
        {
            var        FileName = GetFileName();
            MDFileItem FileElement;

            try
            {
                FileElement = Reader.GetElement(FileName);
            }
            catch (System.IO.FileNotFoundException exc)
            {
                throw new MDObjectIsEmpty(Owner.Kind.ToString(), exc);
            }

            if (FileElement.ElemType == MDFileItem.ElementType.File)
            {
                return(FileElement.GetStream());
            }
            else
            {
                throw new MDObjectIsEmpty(Owner.Kind.ToString());
            }
        }