示例#1
0
        public CoreModuleInfo(Type typeOf, string version, string name, bool enabled, int priority, bool debug, bool quiet)
        {
            _TypeOf   = typeOf;
            _Name     = name;
            _Version  = version;
            _Enabled  = enabled;
            _Priority = priority;
            _Debug    = debug;
            _Quiet    = quiet;

            Deferred = !_Enabled;

            if (VitaNexCore.ModuleAssemblies.Contains(_TypeOf.Assembly))
            {
                DynamicAssembly     = _TypeOf.Assembly;
                DynamicAssemblyFile = new FileInfo(DynamicAssembly.Location);
                _Version            = DynamicAssembly.GetName().Version.ToString();
            }

            _OptionsProperty = _TypeOf.GetProperty("CMOptions", SearchFlags);
            _ConfigMethod    = _TypeOf.GetMethod("CMConfig", SearchFlags);
            _InvokeMethod    = _TypeOf.GetMethod("CMInvoke", SearchFlags);
            _DisposeMethod   = _TypeOf.GetMethod("CMDispose", SearchFlags);
            _LoadMethod      = _TypeOf.GetMethod("CMLoad", SearchFlags);
            _SaveMethod      = _TypeOf.GetMethod("CMSave", SearchFlags);
            _EnabledMethod   = _TypeOf.GetMethod("CMEnabled", SearchFlags);
            _DisabledMethod  = _TypeOf.GetMethod("CMDisabled", SearchFlags);

            VitaNexCore.RegisterPlugin(this);
        }
示例#2
0
        public CoreServiceInfo(Type t, string version, string name, int priority, bool debug, bool quiet)
        {
            _TypeOf   = t;
            _Name     = name;
            _Version  = version;
            _Priority = priority;
            _Debug    = debug;
            _Quiet    = quiet;

            if (VitaNexCore.ServiceAssemblies.Contains(_TypeOf.Assembly))
            {
                DynamicAssembly     = _TypeOf.Assembly;
                DynamicAssemblyFile = new FileInfo(DynamicAssembly.Location);
                _Version            = DynamicAssembly.GetName().Version.ToString();
            }

            _OptionsProperty = _TypeOf.GetProperty("CSOptions", SearchFlags);
            _ConfigMethod    = _TypeOf.GetMethod("CSConfig", SearchFlags);
            _InvokeMethod    = _TypeOf.GetMethod("CSInvoke", SearchFlags);
            _DisposeMethod   = _TypeOf.GetMethod("CSDispose", SearchFlags);
            _LoadMethod      = _TypeOf.GetMethod("CSLoad", SearchFlags);
            _SaveMethod      = _TypeOf.GetMethod("CSSave", SearchFlags);

            VitaNexCore.RegisterPlugin(this);
        }