예제 #1
0
        protected override CleanResult OnClean(CleanContext context)
        {
            var buildDirectory = context.GetOutputBuildDirectory();

            if (Directory.Exists(buildDirectory))
            {
                Directory.Delete(buildDirectory, true);
            }
            return(context.Success());
        }
        protected override CleanResult OnClean(CleanContext context)
        {
            var result = base.OnClean(context);

            if (result.Failed)
            {
                return(result);
            }
            ResolveBeeProjectRoot(context).DeleteIfExists();
            return(context.Success());
        }
예제 #3
0
            protected override CleanResult OnClean(CleanContext context)
            {
                var result = context.GetBuildResult();

                Assert.That(result, Is.Not.Null);
                Assert.That(result.Succeeded, Is.True);

                var artifact = context.GetBuildArtifact <TestBuildArtifactA>();

                Assert.That(artifact, Is.Not.Null);
                Assert.Throws <NotSupportedException>(() => context.SetValue <TestBuildArtifactB>());
                Assert.Throws <NotSupportedException>(() => context.RemoveValue <TestBuildArtifactB>());

                return(result.Succeeded && artifact != null?context.Success() : context.Failure(nameof(artifact)));
            }
        protected override CleanResult OnClean(CleanContext context)
        {
            var artifacts = context.GetBuildArtifact <DotsRuntimeBuildArtifact>();

            if (artifacts == null)
            {
                return(context.Success());
            }

            var buildDirectory = artifacts.OutputTargetFile.Directory;

            if (buildDirectory.Exists)
            {
                buildDirectory.Delete(true);
            }
            return(context.Success());
        }
예제 #5
0
 public Handler(CleanContext context)
 {
     _context = context;
 }
 public IdeaItemRepository(CleanContext context) : base(context)
 {
 }
예제 #7
0
 public StaticPageRepository(CleanContext context) : base(context)
 {
 }
예제 #8
0
 protected override CleanResult OnClean(CleanContext context) => throw new NotImplementedException();
예제 #9
0
 public QueryHandler(CleanContext context)
 {
     _context = context;
 }
예제 #10
0
 protected override CleanResult OnClean(CleanContext context) => context.Success();
예제 #11
0
파일: CleanService.cs 프로젝트: laiqm/Learn
 public CleanService(IConfigurationRoot config, ILoggerFactory factory)
 {
     log         = factory.CreateLogger("app");
     this.config = config;
     context     = new CleanContext();
 }
예제 #12
0
 public ProjectRepository(CleanContext context) : base(context)
 {
 }
예제 #13
0
 public OfferRepository(CleanContext context) : base(context)
 {
 }