qol: interpolated strings
This commit is contained in:
@@ -169,9 +169,9 @@ namespace Disco.Services.Authorization
|
||||
filename = filename.Substring(filename.IndexOf("\\Disco\\Disco.") + 7);
|
||||
|
||||
var method = frame.GetMethod();
|
||||
var resource = string.Format("{0}::{1}", method.DeclaringType.FullName, method.Name);
|
||||
var resource = $"{method.DeclaringType.FullName}::{method.Name}";
|
||||
if (!string.IsNullOrEmpty(filename))
|
||||
resource = string.Format("{0} [{1}]", resource, filename);
|
||||
resource = $"{resource} [{filename}]";
|
||||
|
||||
return resource;
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace Disco.Services.Authorization
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}: {1}={2}", Name, Key, Value);
|
||||
return $"{Name}: {Key}={Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,10 +65,10 @@ namespace Disco.Services.Authorization
|
||||
var controllerName = FilterContext.ActionDescriptor.ControllerDescriptor.ControllerName;
|
||||
var actionName = FilterContext.ActionDescriptor.ActionName;
|
||||
|
||||
authResource = string.Format("{0}::{1}", controllerName, actionName);
|
||||
authResource = $"{controllerName}::{actionName}";
|
||||
}
|
||||
|
||||
return string.Format("{0} [{1}]", authResource, url);
|
||||
return $"{authResource} [{url}]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user