Esempio n. 1
0
        public void Initialize(AddonInfomation infomation, IJavaScriptExecuter engine)
        {
            if (!infomation.HasPermission(PermissionNames.Output))
            {
                this.output = null;
            }
            else
            {
                this.output !.SetInfo(infomation);
            }

            if (!infomation.HasPermission(PermissionNames.Hooks))
            {
                this.hooks = null;
            }

            if (infomation.HasPermission(PermissionNames.Log))
            {
                this.log !.Initialize(infomation);
            }
            else
            {
                this.log = null;
            }

            if (infomation.HasPermission(PermissionNames.Resource))
            {
                this.resource !.Initialize(infomation);
            }
            else
            {
                this.resource = null;
            }

            if (infomation.HasPermission(PermissionNames.Storage))
            {
                this.storage !.localStorage.Initialize(infomation);
            }
            else
            {
                this.storage = null;
            }

            if (infomation.HasPermission(PermissionNames.Tab))
            {
                this.tab !.SetInfo(infomation);
            }
            else
            {
                this.tab = null;
            }
        }
Esempio n. 2
0
 public AddonContext(INicoFileIO fileIO, IAddonLogger addonLogger, IJavaScriptExecuter executer)
 {
     this.fileIO      = fileIO;
     this.addonLogger = addonLogger;
     this.Executer    = executer;
 }