DeleteProjectModel.cs :  » Build-Systems » CruiseControl.NET » ThoughtWorks » CruiseControl » WebDashboard » Plugins » DeleteProject » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Build Systems » CruiseControl.NET 
CruiseControl.NET » ThoughtWorks » CruiseControl » WebDashboard » Plugins » DeleteProject » DeleteProjectModel.cs
using ThoughtWorks.CruiseControl.Core.Reporting.Dashboard.Navigation;

namespace ThoughtWorks.CruiseControl.WebDashboard.Plugins.DeleteProject{
  public class DeleteProjectModel
  {
    private readonly IProjectSpecifier projectSpecifier;
    private readonly bool purgeWorkingDirectory;
    private readonly bool purgeArtifactDirectory;
    private readonly bool purgeSourceControlEnvironment;
    private readonly bool allowDelete;
    private readonly string message;

    public DeleteProjectModel(IProjectSpecifier projectSpecifier, string message, bool allowDelete,
      bool purgeWorkingDirectory, bool purgeArtifactDirectory, bool purgeSourceControlEnvironment)
    {
      this.message = message;
      this.allowDelete = allowDelete;
      this.purgeSourceControlEnvironment = purgeSourceControlEnvironment;
      this.purgeArtifactDirectory = purgeArtifactDirectory;
      this.purgeWorkingDirectory = purgeWorkingDirectory;
      this.projectSpecifier = projectSpecifier;
    }

    public bool AllowDelete
    {
      get { return allowDelete; }
    }

    public string Message
    {
      get { return message; }
    }

    public string ProjectName
    {
      get { return projectSpecifier.ProjectName; }
    }

    public string ServerName
    {
      get { return projectSpecifier.ServerSpecifier.ServerName; }
    }

    public bool PurgeWorkingDirectory
    {
      get { return purgeWorkingDirectory; }
    }

    public bool PurgeArtifactDirectory
    {
      get { return purgeArtifactDirectory; }
    }

    public bool PurgeSourceControlEnvironment
    {
      get { return purgeSourceControlEnvironment; }
    }

    public override bool Equals(object obj)
    {
      if (obj != null && obj is DeleteProjectModel)
      {
        DeleteProjectModel other = (DeleteProjectModel) obj;
        return (
          this.ServerName == other.ServerName
          && this.ProjectName == other.ProjectName
          && this.Message == other.Message
          && this.AllowDelete == other.AllowDelete
          && this.PurgeArtifactDirectory == other.PurgeArtifactDirectory
          && this.PurgeWorkingDirectory == other.PurgeWorkingDirectory
          && this.PurgeSourceControlEnvironment == other.PurgeSourceControlEnvironment
        );
      }
      return false;
    }

    public override int GetHashCode()
    {
      return ServerName.GetHashCode() + ProjectName.GetHashCode() + Message.GetHashCode() + AllowDelete.GetHashCode()
        + PurgeArtifactDirectory.GetHashCode() + PurgeWorkingDirectory.GetHashCode() + PurgeSourceControlEnvironment.GetHashCode();
    }
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.