/////////////////////////////////////////////////////////////////////// public StringList( StringTransformCallback callback, IEnumerable <Result> collection ) { Add(callback, collection); }
/////////////////////////////////////////////////////////////////////// public void Add( StringTransformCallback callback, IEnumerable <Result> collection ) { foreach (Result item in collection) { Add(callback(item)); } }
/////////////////////////////////////////////////////////////////////// private /* protected virtual */ void Dispose( bool disposing ) { TraceOps.DebugTrace(String.Format( "Dispose: disposing = {0}, interpreter = {1}, disposed = {2}", disposing, FormatOps.InterpreterNoThrow(interpreter), disposed), typeof(InteractiveContext).Name, TracePriority.CleanupDebug); if (!disposed) { if (disposing) { //////////////////////////////////// // dispose managed resources here... //////////////////////////////////// interpreter = null; /* NOT OWNED: Do not dispose. */ threadId = 0; /////////////////////////////////////////////////////////// interactive = false; interactiveInput = null; previousInteractiveInput = null; interactiveMode = null; activeInteractiveLoops = 0; totalInteractiveLoops = 0; interactiveLoopData = null; interactiveCommandCallback = null; #if HISTORY historyLoadData = null; historySaveData = null; historyInfoFilter = null; historyLoadFilter = null; historySaveFilter = null; historyFileName = null; #endif } ////////////////////////////////////// // release unmanaged resources here... ////////////////////////////////////// disposed = true; } }
/////////////////////////////////////////////////////////////////////// public void Add( StringTransformCallback callback, IEnumerable <Result> collection ) { #if CACHE_STRINGLIST_TOSTRING InvalidateCachedString(); #endif foreach (Result item in collection) { base.Add(callback(StringOps.GetStringFromObject(item))); } }
/////////////////////////////////////////////////////////////////////// public void Add( StringTransformCallback callback, IEnumerable <string> collection ) { #if CACHE_STRINGLIST_TOSTRING InvalidateCachedString(); #endif foreach (string item in collection) { base.Add(callback(item)); } }