Пример #1
0
        public Participant(Domain domain, string participantID)
        {
            Interlocked.Increment(ref safeInstanceCount);  ///TEST
            this.domainID      = domain.GetDomainID();
            this.participantID = participantID;

            this.domain = domain;

            this.inProcessTransport.Start();
            SetupCyclicThread();
        }
Пример #2
0
        ///
        /// <param name="domain"></param>
        /// <param name="participantID"></param>
        internal Participant GetParticipant(Domain domain, string participantID)
        {
            string hashKey = domain.GetDomainID() + " " + participantID;

            if (!instances.ContainsKey(hashKey))
            {
                Participant newInst = new Participant(domain, participantID);
                Domain      tDomain = newInst.getDomain();

                if (tDomain != null)
                {
                    instances.Add(hashKey, newInst);
                }
                else
                {
                    return(null);
                }
            }
            return(instances[hashKey]);
        }
Пример #3
0
        /// 
        /// <param name="domain"></param>
        /// <param name="participantID"></param>
        internal Participant GetParticipant(Domain domain, string participantID)
        {
            string hashKey = domain.GetDomainID() + " " + participantID;

            if (!instances.ContainsKey(hashKey))
            {
                Participant newInst = new Participant(domain, participantID);
                Domain tDomain = newInst.getDomain();

                if (tDomain != null)
                {
                    instances.Add(hashKey, newInst);
                }
                else
                {
                    return null;
                }
            }
            return instances[hashKey];
        }
Пример #4
0
        public Participant(Domain domain, string participantID)
        {
            Interlocked.Increment(ref safeInstanceCount);  ///TEST
            this.domainID = domain.GetDomainID();
            this.participantID = participantID;

            this.domain = domain;

            this.inProcessTransport.Start();
            SetupCyclicThread();
        }