mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-12 05:47:21 +00:00
Turned getter-like extension methods into extension properties (#1157)
This commit is contained in:
1 parent
0375318b1b
commit
f649febf88
286 files changed
+1379
-1109
No files matched your search
@@ -4,15 +4,18 @@ public static class ERIVersionExtensions
|
||||
{
|
||||
extension(ERIVersion version)
|
||||
{
|
||||
public Task<string> ReadSpecification(WebRootFiles webRootFiles) => webRootFiles.ReadTextAsync(version.SpecificationURL());
|
||||
public Task<string> ReadSpecification(WebRootFiles webRootFiles) => webRootFiles.ReadTextAsync(version.SpecificationURL);
|
||||
|
||||
public string SpecificationURL()
|
||||
public string SpecificationURL
|
||||
{
|
||||
var nameLower = version.ToString().ToLowerInvariant();
|
||||
var filename = $"{nameLower}.json";
|
||||
return $"specs/eri/{filename}";
|
||||
get
|
||||
{
|
||||
var nameLower = version.ToString().ToLowerInvariant();
|
||||
var filename = $"{nameLower}.json";
|
||||
return $"specs/eri/{filename}";
|
||||
}
|
||||
}
|
||||
|
||||
public bool WasSpecificationSelected() => version != ERIVersion.NONE;
|
||||
public bool WasSpecificationSelected => version != ERIVersion.NONE;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user