コード例 #1
0
        public static void Pop <T>(T @this) where T : class
        {
            Contract.Requires(@this != null);
            Contract.Assume(ContextAdapters.Count > 0);
            Contract.Assume(Last == @this || Last == null);

            ContextAdapters.RemoveAt(ContextAdapters.Count - 1);
        }
コード例 #2
0
        public static void Push <T>(T @this) where T : class
        {
            Contract.Requires(@this != null);

            ContextAdapters.Add(@this);
        }