mirror of
https://github.com/bitwarden/server
synced 2026-01-21 11:53:41 +00:00
Changed all C# control flow block statements to include space between keyword and open paren
This commit is contained in:
@@ -31,33 +31,33 @@ namespace Bit.Admin.TagHelpers
|
||||
|
||||
public override void Process(TagHelperContext context, TagHelperOutput output)
|
||||
{
|
||||
if(context == null)
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if(output == null)
|
||||
if (output == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(output));
|
||||
}
|
||||
|
||||
if(ActiveAction == null && ActiveController == null)
|
||||
if (ActiveAction == null && ActiveController == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var descriptor = ViewContext.ActionDescriptor as ControllerActionDescriptor;
|
||||
if(descriptor == null)
|
||||
if (descriptor == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var controllerMatch = ActiveMatch(ActiveController, descriptor.ControllerName);
|
||||
var actionMatch = ActiveMatch(ActiveAction, descriptor.ActionName);
|
||||
if(controllerMatch && actionMatch)
|
||||
if (controllerMatch && actionMatch)
|
||||
{
|
||||
var classValue = "active";
|
||||
if(output.Attributes["class"] != null)
|
||||
if (output.Attributes["class"] != null)
|
||||
{
|
||||
classValue += " " + output.Attributes["class"].Value;
|
||||
output.Attributes.Remove(output.Attributes["class"]);
|
||||
|
||||
@@ -21,17 +21,17 @@ namespace Bit.Admin.TagHelpers
|
||||
|
||||
public override void Process(TagHelperContext context, TagHelperOutput output)
|
||||
{
|
||||
if(context == null)
|
||||
if (context == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(context));
|
||||
}
|
||||
|
||||
if(output == null)
|
||||
if (output == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(output));
|
||||
}
|
||||
|
||||
if(Selected)
|
||||
if (Selected)
|
||||
{
|
||||
output.Attributes.Add("selected", "selected");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user