mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-03 04:42:52 +01:00
ReSharper conform to 'var' settings
This commit is contained in:
@@ -36,8 +36,8 @@ namespace Jellyfin.Server
|
||||
|
||||
public static async Task<int> Main(string[] args)
|
||||
{
|
||||
StartupOptions options = new StartupOptions(args);
|
||||
Version version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
var options = new StartupOptions(args);
|
||||
var version = Assembly.GetEntryAssembly().GetName().Version;
|
||||
|
||||
if (options.ContainsOption("-v") || options.ContainsOption("--version"))
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace Jellyfin.Server
|
||||
return 0;
|
||||
}
|
||||
|
||||
ServerApplicationPaths appPaths = createApplicationPaths(options);
|
||||
var appPaths = createApplicationPaths(options);
|
||||
// $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager
|
||||
Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", appPaths.LogDirectoryPath);
|
||||
await createLogger(appPaths);
|
||||
@@ -57,7 +57,7 @@ namespace Jellyfin.Server
|
||||
|
||||
_logger.LogInformation("Jellyfin version: {Version}", version);
|
||||
|
||||
EnvironmentInfo environmentInfo = new EnvironmentInfo(getOperatingSystem());
|
||||
var environmentInfo = new EnvironmentInfo(getOperatingSystem());
|
||||
ApplicationHost.LogEnvironmentInfo(_logger, appPaths, environmentInfo);
|
||||
|
||||
SQLitePCL.Batteries_V2.Init();
|
||||
@@ -173,7 +173,7 @@ namespace Jellyfin.Server
|
||||
if (!File.Exists(configPath))
|
||||
{
|
||||
// For some reason the csproj name is used instead of the assembly name
|
||||
using (Stream rscstr = typeof(Program).Assembly
|
||||
using (var rscstr = typeof(Program).Assembly
|
||||
.GetManifestResourceStream("Jellyfin.Server.Resources.Configuration.logging.json"))
|
||||
using (Stream fstr = File.Open(configPath, FileMode.CreateNew))
|
||||
{
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Jellyfin.SocketSharp
|
||||
//
|
||||
// We use a substream, as in 2.x we will support large uploads streamed to disk,
|
||||
//
|
||||
HttpPostedFile sub = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length);
|
||||
var sub = new HttpPostedFile(e.Filename, e.ContentType, input, e.Start, e.Length);
|
||||
files[e.Name] = sub;
|
||||
}
|
||||
}
|
||||
@@ -207,17 +207,17 @@ namespace Jellyfin.SocketSharp
|
||||
|
||||
async Task LoadWwwForm(WebROCollection form)
|
||||
{
|
||||
using (Stream input = InputStream)
|
||||
using (var input = InputStream)
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
await input.CopyToAsync(ms).ConfigureAwait(false);
|
||||
ms.Position = 0;
|
||||
|
||||
using (StreamReader s = new StreamReader(ms, ContentEncoding))
|
||||
using (var s = new StreamReader(ms, ContentEncoding))
|
||||
{
|
||||
StringBuilder key = new StringBuilder();
|
||||
StringBuilder value = new StringBuilder();
|
||||
var key = new StringBuilder();
|
||||
var value = new StringBuilder();
|
||||
int c;
|
||||
|
||||
while ((c = s.Read()) != -1)
|
||||
@@ -269,7 +269,7 @@ namespace Jellyfin.SocketSharp
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder result = new StringBuilder();
|
||||
var result = new StringBuilder();
|
||||
foreach (var pair in this)
|
||||
{
|
||||
if (result.Length > 0)
|
||||
@@ -715,7 +715,7 @@ namespace Jellyfin.SocketSharp
|
||||
if (at_eof || ReadBoundary())
|
||||
return null;
|
||||
|
||||
Element elem = new Element();
|
||||
var elem = new Element();
|
||||
string header;
|
||||
while ((header = ReadHeaders()) != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user