示例#1
0
        ///////////////////////////////////////////////////////////////////////

        public StringList(
            StringTransformCallback callback,
            IEnumerable <Result> collection
            )
        {
            Add(callback, collection);
        }
示例#2
0
        ///////////////////////////////////////////////////////////////////////

        public void Add(
            StringTransformCallback callback,
            IEnumerable <Result> collection
            )
        {
            foreach (Result item in collection)
            {
                Add(callback(item));
            }
        }
示例#3
0
        ///////////////////////////////////////////////////////////////////////

        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;
            }
        }
示例#4
0
        ///////////////////////////////////////////////////////////////////////

        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)));
            }
        }
示例#5
0
        ///////////////////////////////////////////////////////////////////////

        public void Add(
            StringTransformCallback callback,
            IEnumerable <string> collection
            )
        {
#if CACHE_STRINGLIST_TOSTRING
            InvalidateCachedString();
#endif

            foreach (string item in collection)
            {
                base.Add(callback(item));
            }
        }