This commit is contained in:
CortexCore
2024-03-31 23:31:00 +08:00
parent e179d2eb53
commit b7b89ee71a
641 changed files with 31286 additions and 22134 deletions

View File

@@ -1,5 +1,11 @@
namespace BITKit
using System;
using System.Collections.Generic;
using System.Linq;
namespace BITKit
{
public interface IReference
{
string Get();
@@ -7,6 +13,15 @@
string Replace(string value) => Get().Replace("{x}",value);
}
public static class IReferenceExtensions
{
public static string[] Cast(this IEnumerable<IReference> self)
{
return self.Select(Get).ToArray();
string Get(IReference x) => x.Value;
}
}
public interface IReference<T>
{
T Get();