Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public WidgetServisi(IEklentiBulucu eklentiBulucu,
                      WidgetAyarları widgetAyarları)
 {
     this._eklentiBulucu  = eklentiBulucu;
     this._widgetAyarları = widgetAyarları;
 }