/// <summary>
        /// Add conversation to the <see cref="ConversationPool"/>
        /// </summary>
        /// <remarks>
        /// if already in the <see cref="ConversationPool"/>, do simply change the SpanStrategy if there is any change
        /// </remarks>
        private bool Span(SpanStrategy om, string inWorkSpaceName, TransactionStrategy ts)
        {
            Visited();
            if (!om.ValidForSpan)
            {
                throw new ArgumentException(om + "is not an accetable overspan strategy for spanning");
            }
            if (GivenUp)
            {
                throw new ConversationAlreadyCancelledException();
            }

            SpanStrategy = om;
            bool retVal = false;

            if (!IsInPool)
            {
                ConversationPool.Instance.Add(id, this);
                retVal = true;
            }
            if (ts != null)
            {
                TransactionStrategy = ts;
            }
            TransactionStrategy.ChangeFlushModeOnConversationBeginsSpan(sessManagers.Values);

            workSpaceName = inWorkSpaceName;
            WorkSpaceUpdate();
            return(retVal);
        }
示例#2
0
        public void UpdateToHttpContext()
        {
            HttpContext c = HttpContext.Current;

            if (c == null)
            {
                return;
            }
            foreach (KeyValuePair <string, string> p in SpanStates())
            {
                SpanStrategy.UpdateSpanState(c, p.Key, p.Value);
            }
        }
示例#3
0
 public IDictionary <string, string> GetPostBackFields()
 {
     return(SpanStrategy.GetPostBackFields(SpanStates()));
 }
		/// <summary>
		/// Add conversation to the <see cref="ConversationPool"/>
		/// </summary>
		/// <remarks>
		/// if already in the <see cref="ConversationPool"/>, do simply change the SpanStrategy if there is any change
		/// </remarks>
		private bool Span(SpanStrategy om, string inWorkSpaceName, TransactionStrategy ts)
		{
			Visited();
			if (!om.ValidForSpan)
			{
				throw new ArgumentException(om + "is not an accetable overspan strategy for spanning");
			}
			if (GivenUp)
			{
				throw new ConversationAlreadyCancelledException();
			}

			SpanStrategy = om;
			bool retVal = false;
			if (!IsInPool)
			{
				ConversationPool.Instance.Add(id, this);
				retVal = true;
			}
			if (ts != null)
				TransactionStrategy = ts;
			TransactionStrategy.ChangeFlushModeOnConversationBeginsSpan(sessManagers.Values);

			workSpaceName = inWorkSpaceName;
			WorkSpaceUpdate();
			return retVal;
		}