System.IO.File.AppendAllLines C# (CSharp) Méthode

AppendAllLines() public static méthode

public static AppendAllLines ( string path, System contents ) : void
path string
contents System
Résultat void
        public static void AppendAllLines(string path, System.Collections.Generic.IEnumerable<string> contents) { }
        public static void AppendAllLines(string path, System.Collections.Generic.IEnumerable<string> contents, System.Text.Encoding encoding) { }

Same methods

File::AppendAllLines ( String path, IEnumerable contents ) : void
File::AppendAllLines ( String path, IEnumerable contents, Encoding encoding ) : void
File::AppendAllLines ( string path, System contents, System encoding ) : void

Usage Example

Exemple #1
0
        public void NotifySuiteFinalized(string name, bool passed, int runtime)
        {
            Response.ContentType = "text/plain";
            lock (IO_SYNC)
            {
                if (passed && _runFlags.IsContinuousIntegration)
                {
                    IOFile.AppendAllLines(_completedSuitesFileName, new[] { name });
                }
                ConsoleHelper.Write("[");
                if (passed)
                {
                    ConsoleHelper.Write(" OK ", ConsoleColor.Green);
                }
                else
                {
                    ConsoleHelper.Write("FAIL", ConsoleColor.Red);
                }

                TimeSpan runSpan = TimeSpan.FromMilliseconds(runtime);
                ConsoleHelper.WriteLine($"] {name} in {Math.Round(runSpan.TotalSeconds, 3)}s");

                NotifyIsAlive();
            }
        }
All Usage Examples Of System.IO.File::AppendAllLines