Exemplo n.º 1
0
        protected virtual AssemblyHandlerEventArgs OnBeforeAddType(Assembly assembly, Type type)
        {
            AssemblyHandlerEventArgs args = new AssemblyHandlerEventArgs(assembly, type);

            if (BeforeAddType != null)
            {
                BeforeAddType.Invoke(this, args);
            }
            return(args);
        }
Exemplo n.º 2
0
 protected virtual AssemblyHandlerEventArgs OnBeforeAddType(Assembly assembly, Type type)
 {
     AssemblyHandlerEventArgs args = new AssemblyHandlerEventArgs(assembly, type);
       if (BeforeAddType != null)
     BeforeAddType.Invoke(this, args);
       return args;
 }
Exemplo n.º 3
0
        void beforeAddAssembly(object sender, AssemblyHandlerEventArgs evt)
        {
            if (this.BeforeAddAssembly != null) {
            this.BeforeAddAssembly(sender, evt);
            if (evt.Cancel)
                return;
            }

            // Presently we disallow all assembly adds.
            evt.Cancel = true;
        }
Exemplo n.º 4
0
        void beforeAddType(object sender, AssemblyHandlerEventArgs evt)
        {
            if (this.BeforeAddType != null) {
            this.BeforeAddType(sender, evt);
            if (evt.Cancel)
                return;
            }

            System.Diagnostics.Debug.WriteLine("Added type: {0}", evt.Type.FullName);
        }
Exemplo n.º 5
0
 void AssemblyManagerBeforeAddAssembly(object sender, AssemblyHandlerEventArgs e)
 {
     e.Cancel = e.Assembly != typeof(Runtime).Assembly;
 }