示例#1
0
        /// <summary>
        /// creates a request scope PICurrent from the ThreadScope PICurrent.
        /// </summary>
        internal PICurrentImpl CreateRequestScopeFromThreadScope()
        {
            PICurrentImpl result = new PICurrentImpl(GetNrOfSlotsAllocated());

            result.SetSlotsFrom(GetThreadScopedCurrent());
            return(result);
        }
示例#2
0
 /// <summary>
 /// gets the current thread-scope PICurrent.
 /// </summary>
 /// <remarks>
 /// thread scope is managed inside a ThreadStatic member.
 /// Sadly using the .NET CallContext is not feasible, because model differs on the server side too much and
 /// is also not really specified in detail.
 /// </remarks>
 internal PICurrentImpl GetThreadScopedCurrent()
 {
     if (t_threadScopePICurrent == null)
     {
         t_threadScopePICurrent = new PICurrentImpl(GetNrOfSlotsAllocated());
     }
     return(t_threadScopePICurrent);
 }
示例#3
0
 /// <summary>sets this picurrent data from another instance.</summary>
 internal void SetSlotsFrom(PICurrentImpl other)
 {
     if (other.m_slots.Length != m_slots.Length)
     {
         m_slots = new object[other.m_slots.Length];
     }
     for (int i = 0; i < m_slots.Length; i++)
     {
         m_slots[i] = other.m_slots[i];
     }
 }
示例#4
0
 /// <summary>
 /// helper method to set the picurrent inside a message.
 /// </summary>
 internal static void SetPICurrent(IMessage msg, PICurrentImpl current) {
     msg.Properties[SimpleGiopMsg.PI_CURRENT_SLOTS] = current;
 }                
 /// <summary>
 /// creates a request scope PICurrent from the ThreadScope PICurrent.
 /// </summary>
 internal PICurrentImpl CreateRequestScopeFromThreadScope() {
     PICurrentImpl result = new PICurrentImpl(GetNrOfSlotsAllocated());
     result.SetSlotsFrom(GetThreadScopedCurrent());
     return result;
 }
 /// <summary>
 /// copys the request-scope current to the thread-scope current.
 /// </summary>
 internal void SetFromRequestScope(PICurrentImpl requestCurrent) {
     PICurrentImpl threadScoped = GetThreadScopedCurrent();
     threadScoped.SetSlotsFrom(requestCurrent);            
 }
 /// <summary>
 /// gets the current thread-scope PICurrent.
 /// </summary>
 /// <remarks>
 /// thread scope is managed inside a ThreadStatic member.
 /// Sadly using the .NET CallContext is not feasible, because model differs on the server side too much and
 /// is also not really specified in detail.
 /// </remarks>
 internal PICurrentImpl GetThreadScopedCurrent() {
     if (t_threadScopePICurrent == null) {
         t_threadScopePICurrent = new PICurrentImpl(GetNrOfSlotsAllocated());
     }
     return t_threadScopePICurrent;
 }
 /// <summary>sets this picurrent data from another instance.</summary>
 internal void SetSlotsFrom(PICurrentImpl other) {
     if (other.m_slots.Length != m_slots.Length) {
         m_slots = new object[other.m_slots.Length];
     }
     for (int i = 0; i < m_slots.Length; i++) {
         m_slots[i] = other.m_slots[i];
     }
 }
 /// <summary>clears the thread context of all slot data.</summary>
 /// <remarks>e.g. used on the server side to remove all context data when the request
 /// has been processed.</remarks>
 internal void ClearThreadScope() {
     t_threadScopePICurrent = null;
 }        
示例#10
0
 /// <summary>creates an empty request scope PICurrent</summary>
 internal PICurrentImpl CreateEmptyRequestScope() {
     PICurrentImpl result = new PICurrentImpl(GetNrOfSlotsAllocated());
     return result;
 }
示例#11
0
        /// <summary>
        /// copys the request-scope current to the thread-scope current.
        /// </summary>
        internal void SetFromRequestScope(PICurrentImpl requestCurrent)
        {
            PICurrentImpl threadScoped = GetThreadScopedCurrent();

            threadScoped.SetSlotsFrom(requestCurrent);
        }
示例#12
0
 /// <summary>clears the thread context of all slot data.</summary>
 /// <remarks>e.g. used on the server side to remove all context data when the request
 /// has been processed.</remarks>
 internal void ClearThreadScope()
 {
     t_threadScopePICurrent = null;
 }
示例#13
0
        /// <summary>creates an empty request scope PICurrent</summary>
        internal PICurrentImpl CreateEmptyRequestScope()
        {
            PICurrentImpl result = new PICurrentImpl(GetNrOfSlotsAllocated());

            return(result);
        }