Exemplo n.º 1
0
 /// <include file='doc\DocumentManager.uex' path='docs/doc[@for="DocumentManager.ComponentDesignerLoader.Dispose"]/*' />
 /// <devdoc>
 ///     The host will call this method when it no longer needs the
 ///     code stream.  Typically, this only happens when the document is closed.
 /// </devdoc>
 public override void Dispose()
 {
     if (host != null)
     {
         host.RemoveService(typeof(IDesignerLoaderService));
     }
     host = null;
 }
Exemplo n.º 2
0
 public override void Dispose()
 {
     try
     {
         IDesignerLoaderHost host = LoaderHost;
         if (host != null)
         {
             host.RemoveService(typeof(ITypeProvider), true);
         }
     }
     finally
     {
         base.Dispose();
     }
 }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            base.Initialize();

            IDesignerLoaderHost host = LoaderHost;

            if (host != null)
            {
                host.RemoveService(typeof(IIdentifierCreationService));
                host.AddService(typeof(IIdentifierCreationService), new IdentifierCreationService(host));
                host.AddService(typeof(IMenuCommandService), new MenuCommandService(host));
                TypeProvider typeProvider = new TypeProvider(host);
                typeProvider.AddAssemblyReference(typeof(string).Assembly.Location);
                host.AddService(typeof(ITypeProvider), typeProvider, true);
                host.AddService(typeof(IEventBindingService), new EventBindingService());
            }
        }
Exemplo n.º 4
0
        public override void Dispose()
        {
            IDesignerLoaderHost host = LoaderHost;

            if (host != null)
            {
                host.RemoveService(typeof(IIdentifierCreationService));
                host.RemoveService(typeof(IMenuCommandService));
                host.RemoveService(typeof(IToolboxService));
                host.RemoveService(typeof(ITypeProvider), true);
                host.RemoveService(typeof(IWorkflowCompilerOptionsService));
                host.RemoveService(typeof(IEventBindingService));
            }

            base.Dispose();
        }