示例#1
0
        /// <summary>
        /// Removes the first object graph that satisfies de condition.
        /// </summary>
        /// <typeparam name="T">The type of the object graph to remove.</typeparam>
        /// <param name="predicate">A function to test each object for a condition.</param>
        public void RemoveGraph <T>(Func <T, bool> predicate)
        {
            var item = _items.OfType <T>().FirstOrDefault(predicate);

            if (item != null)
            {
                _objectInspector.InspectObject(item, RemoveCacheItem);
            }
        }