Пример #1
0
        public void CopyToTest()
        {
            IFileSource fileSource = AssemblyResourceFileSource.WithResourceQualifier(typeof(IFileSourceTests).Assembly, @"Content\ReferenceProject");

            IFileSink fileSink = new MemoryFileSink();

            fileSource.CopyTo(fileSink);

            fileSource.AssertSameSource(fileSink.ToSource());
        }
Пример #2
0
 public void Install()
 {
     if (label.distribution_platform == Label.DistributionPlatform.Local || label.distribution_platform == Label.DistributionPlatform.Dev)
     {
         status = Status.Installed;
     }
     else
     {
         status = Status.ReinstallPending;
         if (file_source != null && FileUtil.DeleteDirectory(label.install_path, 0) && FileUtil.CreateDirectory(label.install_path, 0))
         {
             file_source.CopyTo(label.install_path, null);
             file_source = new Directory(label.install_path);
             status      = Status.Installed;
         }
     }
 }