///////////////////////////////////////////////////////////////////////
        #region Constructors, Destructor, Initialization

        /// <summary>
        /// Initializes the object with the specified server.
        /// </summary>
        public TsCHdaTrend(TsCHdaServer server)
        {
            if (server == null)
            {
                throw new ArgumentNullException("server");
            }

            // save a reference to a server.
            _server = server;

            // create a default name.
            do
            {
                Name = String.Format("Trend{0,2:00}", ++_count);
            }while (_server.Trends[Name] != null);
        }
 /// <summary>
 /// Used to set the server after the object is deserialized.
 /// </summary>
 internal void SetServer(TsCHdaServer server)
 {
     _server = server;
 }