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
Exemple #1
0
        /// <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;
        }
 /// <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;
 }
Exemple #3
0
 /// <summary>
 /// Starts the extension after the initialisation of IrcShark.
 /// </summary>
 public abstract void Start(ExtensionContext context);
Exemple #4
0
 public override void Start(ExtensionContext context)
 {
     Context = context;
     RehashLanguages();
     RehashMethods();
 }