ReSharper conform to 'var' settings

This commit is contained in:
Erwin de Haan
2019-01-13 21:37:13 +01:00
parent a36658f6f0
commit 65bd052f3e
199 changed files with 1063 additions and 1063 deletions

View File

@@ -17,7 +17,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
{
var trackInfo = new SubtitleTrackInfo();
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
var trackEvents = new List<SubtitleTrackEvent>();
var eventIndex = 1;
using (var reader = new StreamReader(stream))
{

View File

@@ -24,7 +24,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
{
var trackInfo = new SubtitleTrackInfo();
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
var trackEvents = new List<SubtitleTrackEvent>();
using (var reader = new StreamReader(stream))
{
string line;

View File

@@ -16,7 +16,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
{
var trackInfo = new SubtitleTrackInfo();
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
var trackEvents = new List<SubtitleTrackEvent>();
using (var reader = new StreamReader(stream))
{

View File

@@ -408,7 +408,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
/// <param name="outputPath">The output path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentNullException">
/// <exception cref="ArgumentNullException">
/// inputPath
/// or
/// outputPath
@@ -525,7 +525,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
/// <param name="outputPath">The output path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
/// <exception cref="System.ArgumentException">Must use inputPath list overload</exception>
/// <exception cref="ArgumentException">Must use inputPath list overload</exception>
private async Task ExtractTextSubtitle(
string[] inputFiles,
MediaProtocol protocol,
@@ -734,7 +734,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
{
if (protocol == MediaProtocol.Http)
{
HttpRequestOptions opts = new HttpRequestOptions()
var opts = new HttpRequestOptions()
{
Url = path,
CancellationToken = cancellationToken

View File

@@ -19,8 +19,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles
{
cancellationToken.ThrowIfCancellationRequested();
TimeSpan startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks);
TimeSpan endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks);
var startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks);
var endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks);
// make sure the start and end times are different and seqential
if (endTime.TotalMilliseconds <= startTime.TotalMilliseconds)