コード例 #1
0
        public override bool Equals(object obj)
        {
            bool retVal = false;

            if (obj is MsgConfigurationKey)
            {
                MsgConfigurationKey key = (MsgConfigurationKey)obj;
                retVal = _msgTag.Equals(key._msgTag) &&
                         _scrId.Equals(key._scrId) && _dstId.Equals(key._dstId);
            }
            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Obtains the configuration for a message to be sent from
        /// specifics source and destination
        /// </summary>
        /// <param name="msgTag">The name of the message to be sent</param>
        /// <param name="srcUnitId">The identifier of the sender</param>
        /// <param name="dstUnitId">The identifier of the destination</param>
        /// <returns>A DataSet containing the configuration of the
        /// desired message. The DataSet has the following structure:
        ///	DMSG_PROCESSTIME	NUMERIC,
        ///	DMSG_USERTIME		NUMERIC,
        ///	MSG_DMSG_ID			NUMERIC,
        ///	MSG_HISMANDATORY	NUMERIC,
        ///	MSG_PRIORITY		NUMERIC,
        ///	MSG_MMSG_ID			NUMERIC,
        ///	MSG_MANDATORY		NUMERIC,
        ///	MSG_ORDER			NUMERIC,
        ///	MSG_IPADAPTER		NVARCHAR(20),
        ///	MSG_PORTADAPTER		NUMERIC,
        ///	MSG_TOTALRETRIES	NUMERIC,
        ///	MSG_PARCIALRETRIES	NUMERIC,
        ///	MSG_TOTALINTERVAL	NUMERIC,
        ///	MSG_PARCIALINTERVAL	NUMERIC,
        ///	MSG_TOTALTIME		NUMERIC,
        ///	MSG_UNI_ID			NUMERIC,
        ///	MSG_UNI_PORT		NUMERIC,
        ///	MSG_XSL				NVARCHAR(255)
        /// </returns>
        /// <remarks>The results are ordered by:
        /// MSG_MANDATORY ASC, MSG_PRIORITY DESC, MSG_ORDER DESC</remarks>
        public DataSet GetConfiguration(
            string msgTag, decimal srcUnitId, decimal dstUnitId)
        {
            DataSet             retVal = null;
            MsgConfigurationKey key    = new MsgConfigurationKey(msgTag, srcUnitId, dstUnitId);

            if (_msgCfgCache.ContainsKey(key))
            {
                retVal = (DataSet)_msgCfgCache[key];
            }
            else
            {
                retVal = LoadConfiguration(msgTag, srcUnitId, dstUnitId);
                _msgCfgCache.Add(key, retVal);
            }
            return(retVal);
        }