System.Collections.Generic.List.Add(log)

Here are the examples of the csharp api System.Collections.Generic.List.Add(log) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : FileController.cs
License : Apache License 2.0
Project Creator : ccnetcore

[Authorize(Policy = "日志管理")]
        [HttpGet]
        public Result GetLogs()
        {
            List<log> logData = new List<log>();

             string path = Path.Combine(Directory.GetCurrentDirectory(), "Logs/");
             DirectoryInfo root = new DirectoryInfo(path);
             FileInfo[] files = root.GetFiles();

            foreach (var file in files)
            {
                logData.Add(new log { name =file.Name });
            }
            logData.Reverse();
            return Result.Success().SetData(logData) ;
        }