The ExtensionContext class saves informations about the context, the Extension is running in.
The context of an extension holds all information an extension needs to run. It gives access to all needed informations as propertys.
Inheritance: System.MarshalByRefObject, IContext
コード例 #1
0
ファイル: Extension.cs プロジェクト: hapm/IrcShark
        /// <summary>
        /// Initializes a new instance of the Extension class.
        /// </summary>
        /// <param name="info">
        /// The <see cref="ExtensionContext"/> for this extension.
        /// </param>
        protected Extension(ExtensionContext context)
        {
            if (context == null) {
                throw new ArgumentNullException("context", "You must specify a context");
            }

            if (!context.Info.Trusted) {
                throw new ExtensionException(context.Info, "You can't initialise an extension with an untrusted ExtensionInfo");
            }

            this.context = context;
        }
コード例 #2
0
ファイル: ChatManagerExtension.cs プロジェクト: hapm/IrcShark
 /// <summary>
 /// Starts the ChatManagerExtension.
 /// </summary>
 public override void Start(ExtensionContext context)
 {
     Context = context;
     object[] protocols = Mono.Addins.AddinManager.GetExtensionObjects(typeof(IProtocolExtension));
     foreach (IProtocolExtension ext in protocols) {
         RegisterProtocol(ext);
     }
     LoadSettings();
     running = true;
 }
コード例 #3
0
ファイル: Extension.cs プロジェクト: hapm/IrcShark
 /// <summary>
 /// Starts the extension after the initialisation of IrcShark.
 /// </summary>
 public abstract void Start(ExtensionContext context);
コード例 #4
0
ファイル: ScriptingExtension.cs プロジェクト: hapm/IrcShark
 public override void Start(ExtensionContext context)
 {
     Context = context;
     RehashLanguages();
     RehashMethods();
 }