Click here to Skip to main content
15,896,606 members
Articles / Programming Languages / C#

NetMX - a JMX port to the .NET world

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
10 Mar 2008LGPL34 min read 39.6K   268   11  
An introduction to NetMX - a lightweight .NET management solution.
#region USING
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
#endregion

namespace NetMX.Relation
{
   /// <summary>
   /// Represents an unresolved role: a role not retrieved from a relation due to a problem. 
   /// It provides the role name, value (if problem when trying to set the role) and an integer defining 
   /// the problem (constants defined in RoleStatus).
   /// </summary>
   /// <remarks>
   /// This class is immutable.
   /// </remarks>
   [Serializable]
   public sealed class RoleUnresolved
   {
      #region PROPERTIES
      private string _roleName;
      /// <summary>
      /// Gets role name.
      /// </summary>
      public string RoleName
      {
         get { return _roleName; }
      }
      private ReadOnlyCollection<ObjectName> _roleValue;
      /// <summary>
      /// Gets role value.
      /// </summary>
      public IList<ObjectName> RoleValue
      {
         get { return _roleValue; }
      }
      private RoleStatus _problemType;
      /// <summary>
      /// Gets problem type.
      /// </summary>
      public RoleStatus ProblemType
      {
         get { return _problemType; }
      }
      #endregion

      #region CONSTRUCTOR
      /// <summary>
      /// Creates new RoleUnresolved object. Copies referenced MBean names to its internal read-only collection.
      /// </summary>
      /// <param name="roleName">Name of the role which caused the problem.</param>
      /// <param name="roleValue">Value of the role, or null if the problem is the inability to read a role</param>
      /// <param name="problemType">Type of problem.</param>
      public RoleUnresolved(string roleName, IEnumerable<ObjectName> roleValue, RoleStatus problemType)
      {
         _roleName = roleName;
         if (roleValue != null)
         {
            _roleValue = new List<ObjectName>(roleValue).AsReadOnly();
         }
         _problemType = problemType;
      }
      #endregion
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer (Senior) VSoft
Poland Poland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions