public async ValueTask OnInitialized(IFomanticComponent component) { foreach (var feature in Features) { if (feature.Type.IsAssignableFrom(component.GetType())) { await feature.OnInitialized(component); } } }
public async ValueTask DisposeAsync(IFomanticComponent component) { foreach (var feature in Features) { if (feature.Type.IsAssignableFrom(component.GetType())) { await feature.DisposeAsync(component); } } }
public async ValueTask <bool> OnAfterFirstRender(IFomanticComponent component) { bool result = false; foreach (var feature in Features) { if (feature.Type.IsAssignableFrom(component.GetType())) { result = result || await feature.OnAfterFirstRender(component); } } return(result); }
public List <string> OnConstractClasses(IFomanticComponent component) { List <string> result = new List <string>(); foreach (var feature in Features) { if (feature.Type.IsAssignableFrom(component.GetType())) { result.AddRange(feature.ProvideCssClasses(component)); result.Add(feature.ProvideCssClass(component)); } } return(result); }
/// <inheritdoc/> string IFeatureDefinition.ProvideCssClass(IFomanticComponent component) { return(ProvideCssClass((TFeatureInterface)component)); }
/// <inheritdoc/> ValueTask <bool> IFeatureDefinition.OnAfterFirstRender(IFomanticComponent component) { return(OnAfterFirstRender((TFeatureInterface)component)); }
///------------------------------------------------------------------------------------------------- /// <summary> Dispose asynchronous. </summary> /// /// <param name="component"> The component. </param> /// /// <returns> A ValueTask. </returns> ///------------------------------------------------------------------------------------------------- ValueTask IFeatureDefinition.DisposeAsync(IFomanticComponent component) { return(DisposeAsync((TFeatureInterface)component)); }
/// <inheritdoc/> ValueTask IFeatureDefinition.OnInitialized(IFomanticComponent component) { return(OnInitialized((TFeatureInterface)component)); }