EmailUser.cs :  » Build-Systems » CruiseControl.NET » ThoughtWorks » CruiseControl » Core » Publishers » 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 » Core » Publishers » EmailUser.cs
using System;
using Exortech.NetReflector;

namespace ThoughtWorks.CruiseControl.Core.Publishers{
    /// <summary>
    /// Defines a user who will receive e-mails.
    /// </summary>
    /// <title>Email User</title>
    /// <version>1.0</version>
    /// <example>
    /// <code>
    /// &lt;user name="BuildGuru" group="buildmaster" address="buildguru@mycompany.com" /&gt;
    /// </code>
    /// </example>
    /// <remarks>
    /// <para>
    /// Users do not need to belong to a group. If they are not in a group then they may still receive emails when they
    /// have committed changes that are part of the current build, depending on the setting of
    /// "modifierNotificationTypes" and the state of the build.
    /// </para>
    /// <para>
    /// See the section on the &lt;converters&gt; setting for manipulations that can be done to transform a user name
    /// to an address if the address is not specified.
    /// </para>
    /// <para type="warning">
    /// It is essential that the value of the name attribute matches the name for the user in the sourcecontrol system.
    /// This is the only way that CruiseControl.Net can reconcile the user that committed a change with the address to
    /// send the email to.
    /// </para>
    /// </remarks>
  [ReflectorType("user")]
  public class EmailUser
  {
        /// <summary>
        /// Default constructor
        /// </summary>
    public EmailUser() { }

        /// <summary>
        /// Extended constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="group"></param>
        /// <param name="address"></param>
    public EmailUser(string name, string group, string address)
    {
      Name = name;
      Address = address;
      Group = group;
    }

        /// <summary>
        /// The user name of a user. This should match the user name in Source Control. 
        /// </summary>
        /// <version>1.0</version>
        /// <default>n/a</default>
    [ReflectorProperty("name")]
    public string Name;

        /// <summary>
        /// The Internet-style email address of the user (e.g., "joe@example.com").
        /// </summary>
        /// <version>1.0</version>
        /// <default>n/a</default>
        [ReflectorProperty("address")]
    public string Address;

        /// <summary>
        /// The group that the user is in. This needs to match the name of one of the &lt;group&gt; elements.
        /// </summary>
        /// <version>1.3</version>
        /// <default>None</default>
        [ReflectorProperty("group", Required = false)]
    public string Group;

    public override bool Equals(Object obj)
    {
      if (obj == null || obj.GetType() != GetType())
      {
        return false;
      }
      EmailUser user = (EmailUser)obj;
      return (user.Name == Name && user.Address == Address && user.Group == Group);
    }

    public override int GetHashCode()
    {
      return String.Concat(Name, Address, Group).GetHashCode();
    }

    public override string ToString()
    {
      return string.Format("Email User: {0} {1} {2}", Name, Address, Group);
    }
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.