/// <summary>
            /// Pops a trait store from the available traits
            /// </summary>
            /// <param name="traitStore">Trait store that is no longer available.</param>
            public void Pop(ISessionPropertyStore traitStore)
            {
                var element = _traitStores.Pop();

                if (element != traitStore)
                {
                    throw new ArgumentException("supplied trait store is not expected.", "traitStore");
                }

                _reversePath.Push(element.Name);
            }
            /// <summary>
            /// Pushes a trait store onto the path of available traits.
            /// </summary>
            /// <param name="traitStore">Trait store that has become available.</param>
            /// <remarks>
            /// This is used to build the connection between the listening session
            /// and the broadcasting session. This is only applicable when a broadcastingPath
            /// is supplied as a constructor argument.
            /// </remarks>
            internal void Push(ISessionPropertyStore traitStore)
            {
                string current = UnavailableTrait;

                if (traitStore.Name != current)
                {
                    throw new ArgumentException(string.Format("Trait store '{0}' was expected. Trait store '{1}' was supplied.", current, traitStore.Name));
                }

                _traitStores.Push(traitStore);
                _reversePath.Pop();
            }
 /// <summary>
 /// Uses to the trait store's name to determine if it is the
 /// target trait.
 /// </summary>
 /// <param name="trait">Trait to be considered.</param>
 /// <returns>true if trait contains the session to be hooked.</returns>
 public bool IsTargetTrait(ISessionPropertyStore trait)
 {
     return(_targetName == trait.Name);
 }