public static bool IsWidgetActive(this IWidgetEklenti widget, WidgetAyarları widgetSettings) { if (widget == null) { throw new ArgumentNullException(nameof(widget)); } if (widgetSettings == null) { throw new ArgumentNullException(nameof(widgetSettings)); } if (widgetSettings.AktifWidgetSistemAdları == null) { return(false); } foreach (var activeMethodSystemName in widgetSettings.AktifWidgetSistemAdları) { if (widget.EklentiTanımlayıcı.SistemAdı.Equals(activeMethodSystemName, StringComparison.InvariantCultureIgnoreCase)) { return(true); } } return(false); }
public WidgetServisi(IEklentiBulucu eklentiBulucu, WidgetAyarları widgetAyarları) { this._eklentiBulucu = eklentiBulucu; this._widgetAyarları = widgetAyarları; }