예제 #1
0
        internal T Detatch <T>() where T : ICodeScopeExtension
        {
            ICodeScopeExtension extension = default(T);

            _extensions.TryRemove(typeof(T), out extension);
            return((T)extension);
        }
예제 #2
0
        public ICodeScopeExtension GetExtension <T>() where T : ICodeScopeExtension
        {
            ICodeScopeExtension extension = default(T);

            _extensions.TryGetValue(typeof(T), out extension);
            return((T)extension);
        }