Refactor: standardize namespace and using directive style

Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
This commit is contained in:
2026-02-20 16:26:53 -05:00
parent 44ab9e1d6d
commit af1152b001
1436 changed files with 36615 additions and 15508 deletions
+39 -32
View File
@@ -2,14 +2,16 @@
// Copyright (c) PlaceholderCompany. All rights reserved.
// </copyright>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Serialization;
using MediaBrowser.Model.Extensions;
#pragma warning disable SA1615 // Element should be documented
namespace MediaBrowser.Model.Dlna;
using global::System;
using global::System.Collections.Generic;
using global::System.Linq;
using global::System.Xml.Serialization;
using MediaBrowser.Model.Extensions;
/// <summary>
/// Defines the <see cref="CodecProfile"/>.
/// </summary>
@@ -20,8 +22,8 @@ public class CodecProfile
/// </summary>
public CodecProfile()
{
Conditions = [];
ApplyConditions = [];
this.Conditions = [];
this.ApplyConditions = [];
}
/// <summary>
@@ -33,12 +35,12 @@ public class CodecProfile
/// <summary>
/// Gets or sets the list of <see cref="ProfileCondition"/> which this profile must meet.
/// </summary>
public ProfileCondition[] Conditions { get; set; }
public List<ProfileCondition> Conditions { get; set; } = [];
/// <summary>
/// Gets or sets the list of <see cref="ProfileCondition"/> to apply if this profile is met.
/// </summary>
public ProfileCondition[] ApplyConditions { get; set; }
public List<ProfileCondition> ApplyConditions { get; set; } = [];
/// <summary>
/// Gets or sets the codec(s) that this profile applies to.
@@ -61,38 +63,43 @@ public class CodecProfile
/// <summary>
/// Checks to see whether the codecs and containers contain the given parameters.
/// </summary>
/// <param name="codecs">The codecs to match.</param>
/// <param name="codec">The codec to match (single codec or comma-separated list).</param>
/// <param name="container">The container to match.</param>
/// <param name="useSubContainer">Consider sub-containers.</param>
/// <returns>True if both conditions are met.</returns>
public bool ContainsAnyCodec(IReadOnlyList<string> codecs, string? container, bool useSubContainer = false)
{
var containerToCheck = useSubContainer && string.Equals(Container, "hls", StringComparison.OrdinalIgnoreCase) ? SubContainer : Container;
return ContainerHelper.ContainsContainer(containerToCheck, container) && codecs.Any(c => ContainerHelper.ContainsContainer(Codec, false, c));
}
/// <summary>
/// Checks to see whether the codecs and containers contain the given parameters.
/// </summary>
/// <param name="codec">The codec to match.</param>
/// <param name="container">The container to match.</param>
/// <param name="useSubContainer">Consider sub-containers.</param>
/// <returns>True if both conditions are met.</returns>
/// <param name="useSubContainer">When true and Container is "hls", uses SubContainer instead of Container for matching.</param>
/// <returns>True if both the codec and container conditions are met.</returns>
public bool ContainsAnyCodec(string? codec, string? container, bool useSubContainer = false)
{
return ContainsAnyCodec(codec.AsSpan(), container, useSubContainer);
if (codec is null)
{
return false;
}
var containerToCheck =
useSubContainer &&
string.Equals(this.Container, "hls", StringComparison.OrdinalIgnoreCase)
? this.SubContainer
: this.Container;
return ContainerHelper.ContainsContainer(containerToCheck, container)
&& ContainerHelper.ContainsContainer(this.Codec, codec);
}
/// <summary>
/// Checks to see whether the codecs and containers contain the given parameters.
/// </summary>
/// <param name="codec">The codec to match.</param>
/// <param name="codecs">The list of codecs to match.</param>
/// <param name="container">The container to match.</param>
/// <param name="useSubContainer">Consider sub-containers.</param>
/// <returns>True if both conditions are met.</returns>
public bool ContainsAnyCodec(ReadOnlySpan<char> codec, string? container, bool useSubContainer = false)
/// <param name="useSubContainer">When true and Container is "hls", uses SubContainer instead of Container for matching.</param>
/// <returns>True if both the codec and container conditions are met.</returns>
public bool ContainsAnyCodec(IReadOnlyList<string> codecs, string? container, bool useSubContainer = false)
{
var containerToCheck = useSubContainer && string.Equals(Container, "hls", StringComparison.OrdinalIgnoreCase) ? SubContainer : Container;
return ContainerHelper.ContainsContainer(containerToCheck, container) && ContainerHelper.ContainsContainer(Codec, false, codec);
if (codecs == null || codecs.Count == 0)
{
return false;
}
// Join codecs with comma to match ContainerHelper's expected format
var codecString = string.Join(',', codecs);
return ContainsAnyCodec(codecString, container, useSubContainer);
}
}