Mercurial > pub > ImplabNet
comparison Implab/Diagnostics/OperationContext.cs @ 93:dc4942d09e74 v2
improved tracing
added the application components container MTComponentContainer.AppContainer
author | cin |
---|---|
date | Thu, 23 Oct 2014 01:13:57 +0400 |
parents | 4c0e5ef99986 |
children | 04d4c92d0f28 |
comparison
equal
deleted
inserted
replaced
92:4c0e5ef99986 | 93:dc4942d09e74 |
---|---|
26 if (m_current != LogicalOperation.EMPTY) { | 26 if (m_current != LogicalOperation.EMPTY) { |
27 if (m_current != m_initial) | 27 if (m_current != m_initial) |
28 m_current = m_current.Parent; | 28 m_current = m_current.Parent; |
29 else if (m_ownership) | 29 else if (m_ownership) |
30 m_current = LogicalOperation.EMPTY; | 30 m_current = LogicalOperation.EMPTY; |
31 else | 31 else { |
32 TraceLog.TraceWarning("DetachLogicalOperation can't be applied in the current context"); | |
32 detached = LogicalOperation.EMPTY; | 33 detached = LogicalOperation.EMPTY; |
34 } | |
35 } else { | |
36 TraceLog.TraceWarning("DetachLogicalOperation can't be applied in the current context"); | |
33 } | 37 } |
34 TraceLog.TraceWarning("EndLogicalOperation can't be applied in the current context"); | 38 |
35 return detached; | 39 return detached; |
36 } | 40 } |
37 | 41 |
38 public void EndLogicalOperation() { | 42 public void EndLogicalOperation() { |
39 if (m_current != m_initial) { | 43 if (m_current != m_initial) { |
40 m_current = m_current.Parent; | 44 m_current = m_current.Parent; |
41 } else if (m_current != null && m_ownership) { | 45 } else if (m_current != LogicalOperation.EMPTY && m_ownership) { |
42 m_current = null; | 46 m_current = LogicalOperation.EMPTY; |
43 } else { | 47 } else { |
44 TraceLog.TraceWarning("EndLogicalOperation can't be applied in the current context"); | 48 TraceLog.TraceWarning("EndLogicalOperation can't be applied in the current context"); |
45 } | 49 } |
46 } | 50 } |
51 | |
52 public void Leave() { | |
53 | |
54 if ((m_ownership && m_current != LogicalOperation.EMPTY) || (!m_ownership && m_current != m_initial) ) | |
55 TraceLog.TraceWarning("Trying to leave unfinished logical operation {0}", m_current.Name); | |
56 } | |
47 } | 57 } |
48 } | 58 } |
49 | 59 |