Код: Выделить всё
@implements MyInterface
@code {
public void MyMethod() { }
}
Код: Выделить всё
private class ComponentMetadata
{
public Type Type { get; set; }
public IDictionary Parameters { get; set; }
public ComponentMetadata(Type type)
{
this.Type = type;
}
}
< /code>
и добавлено следующим образом: < /p>
@{
var c = components.Single(x => x.Type == typeof(MyComponent));
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... -component