msos.CommandExecutionContext.WriteErrorLine C# (CSharp) Method

WriteErrorLine() public method

public WriteErrorLine ( string format ) : void
format string
return void
        public void WriteErrorLine(string format, params object[] args)
        {
            Printer.WriteError(format + Environment.NewLine, args);
        }

Usage Example

コード例 #1
0
ファイル: HeapIndex.cs プロジェクト: goldshtn/msos
        public void Execute(CommandExecutionContext context)
        {
            if (!InMemoryOnly)
            {
                if (context.TargetType == TargetType.LiveProcess)
                {
                    context.WriteErrorLine(
                        "Generating a persistent heap index for a live process is not recommended. " +
                        "Use the --nofile switch to generate an in-memory index instead.");
                    return;
                }
                if (String.IsNullOrEmpty(HeapIndexFileName))
                {
                    HeapIndexFileName = Path.ChangeExtension(context.DumpFile, ".heapindex");
                    context.WriteLine("Using an automatically generated heap index filename: '{0}'", HeapIndexFileName);
                }
            }

            if (InMemoryOnly && !String.IsNullOrEmpty(HeapIndexFileName))
            {
                context.WriteErrorLine("The --nofile and -f options are incompatible.");
                return;
            }

            // If the index fails to build, clear it so that other commands know we don't have an index.
            context.HeapIndex = new HeapIndex(context);
            if (!context.HeapIndex.Build(ChunkSize, InMemoryOnly ? null : HeapIndexFileName, !EnumerateRootsFast))
                context.HeapIndex = null;
        }
All Usage Examples Of msos.CommandExecutionContext::WriteErrorLine