Пример #1
0
        /// <summary>
        /// コピーを作成する
        /// </summary>
        /// <returns>ArchiveFile</returns>
        public ArchiveFile Copy()
        {
            var archiveFile = new ArchiveFile()
            {
                ContainerName = ContainerName,
                FilePath      = FilePath,
                CreatedAt     = CreatedAt
            };

            archiveFile.SetMetaData(MetaData);
            return(archiveFile);
        }
Пример #2
0
        /// <summary>
        /// 変換する
        /// </summary>
        /// <param name="file">DtDeviceFile</param>
        /// <returns>ArchiveFile</returns>
        public static ArchiveFile From(DtDeviceFile file)
        {
            Assert.IfNull(file);
            var archiveFile = new ArchiveFile()
            {
                ContainerName = file.Container,
                FilePath      = file.FilePath
            };

            IDictionary <string, string> dic = new Dictionary <string, string>();

            foreach (var attribute in file.DtDeviceFileAttribute)
            {
                archiveFile.SetMetaData(attribute);
            }

            return(archiveFile);
        }