Pārlūkot izejas kodu

Shorten lambda statement

Nick Babcock 7 gadi atpakaļ
vecāks
revīzija
012592e7d5
1 mainītis faili ar 1 papildinājumiem un 4 dzēšanām
  1. 1 4
      OhmGraphite/Program.cs

+ 1 - 4
OhmGraphite/Program.cs

@@ -40,10 +40,7 @@ namespace OhmGraphite
                 x.SetDescription("Extract hardware sensor data and exports it to a given host and port in a graphite compatible format");
                 x.SetDisplayName("Ohm Graphite");
                 x.SetServiceName("OhmGraphite");
-                x.OnException(ex =>
-                {
-                    Logger.Error(ex, "OhmGraphite TopShelf encountered an error");
-                });
+                x.OnException(ex => Logger.Error(ex, "OhmGraphite TopShelf encountered an error"));
             });
         }