protected virtual void Dispose(bool disposing) { if (disposing) { if (this.Disposed != null) { this.Disposed(this, EventArgs.Empty); } try { try { if (this._host != null) { this._host.DisposeHost(); } } finally { if (this._serviceContainer != null) { this._serviceContainer.RemoveService(typeof(DesignSurface)); this._serviceContainer.Dispose(); } } } finally { this._host = null; this._serviceContainer = null; } } }
protected virtual void Dispose(bool disposing) { if (disposing && (this._serviceContainer != null)) { this._serviceContainer.Dispose(); this._serviceContainer = null; } }
public override void Initialize(System.ComponentModel.Design.ServiceContainer services, Microsoft.Xna.Framework.Graphics.GraphicsDevice gd, GameBase.myCallbackDelegate updateCamCallback) { base.Initialize(services, gd, updateCamCallback); if (commClient != null) { commClient.Send(new ClientReadyPacket(MyClientID, "someone")); } }
public DesignSurface(IServiceProvider parentProvider) { this._parentProvider = parentProvider; this._serviceContainer = new DesignSurfaceServiceContainer(this._parentProvider); ServiceCreatorCallback callback = new ServiceCreatorCallback(this.OnCreateService); this.ServiceContainer.AddService(typeof(ISelectionService), callback); this.ServiceContainer.AddService(typeof(IExtenderProviderService), callback); this.ServiceContainer.AddService(typeof(IExtenderListService), callback); this.ServiceContainer.AddService(typeof(ITypeDescriptorFilterService), callback); this.ServiceContainer.AddService(typeof(IReferenceService), callback); this.ServiceContainer.AddService(typeof(DesignSurface), this); this._host = new DesignerHost(this); }
public DesignSurface(IServiceProvider parentProvider) { this._parentProvider = parentProvider; this._serviceContainer = new DesignSurfaceServiceContainer(this._parentProvider); ServiceCreatorCallback callback = new ServiceCreatorCallback(this.OnCreateService); this.ServiceContainer.AddService(typeof(ISelectionService), callback); this.ServiceContainer.AddService(typeof(IExtenderProviderService), callback); this.ServiceContainer.AddService(typeof(IExtenderListService), callback); this.ServiceContainer.AddService(typeof(ITypeDescriptorFilterService), callback); this.ServiceContainer.AddService(typeof(IReferenceService), callback); this.ServiceContainer.AddService(typeof(DesignSurface), this); this._host = new DesignerHost(this); }
public static bool _GetService_System_ComponentModel_Design_ServiceContainer_System_Type( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; //ReturnType/Value System.Object returnVal_Real = null; System.Object returnVal_Intercepted = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { returnVal_Real = _System_ComponentModel_Design_ServiceContainer.GetService(serviceType); } catch (System.Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { returnVal_Intercepted = _System_ComponentModel_Design_ServiceContainer.GetService(serviceType); } catch (System.Exception e) { exception_Intercepted = e; } return((exception_Real.Messsage == exception_Intercepted.Message) && (returnValue_Real == returnValue_Intercepted)); }
public static bool _AddService_System_ComponentModel_Design_ServiceContainer_System_Type_System_ComponentModel_Design_ServiceCreatorCallback_System_Boolean( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; System.ComponentModel.Design.ServiceCreatorCallback callback = null; System.Boolean promote = false; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType, callback, promote); } catch (System.Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType, callback, promote); } catch (System.Exception e) { exception_Intercepted = e; } return((exception_Real.Message == exception_Intercepted.Message)); }
public static bool _GetService_System_ComponentModel_Design_ServiceContainer_System_Type( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; //ReturnType/Value System.Object returnVal_Real = null; System.Object returnVal_Intercepted = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { returnVal_Real = _System_ComponentModel_Design_ServiceContainer.GetService(serviceType); } catch( System.Exception e ) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { returnVal_Intercepted = _System_ComponentModel_Design_ServiceContainer.GetService(serviceType); } catch( System.Exception e ) { exception_Intercepted = e; } return( ( exception_Real.Messsage == exception_Intercepted.Message ) && ( returnValue_Real == returnValue_Intercepted ) ); }
public static bool _AddService_System_ComponentModel_Design_ServiceContainer_System_Type_System_Object( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; System.Object serviceInstance = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType, serviceInstance); } catch (System.Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType, serviceInstance); } catch (System.Exception e) { exception_Intercepted = e; } return((exception_Real.Message == exception_Intercepted.Message)); }
public virtual void OnBeginRequest(HttpContext context) { // put your application start code here //Configure Elmah SqlErrorLog Connection String var parent = Elmah.ServiceCenter.Current; Elmah.ServiceCenter.Current = webcontext => { var container = new System.ComponentModel.Design.ServiceContainer(parent(webcontext)); var log = new Elmah.SqlErrorLog(Global_config.DBConnectionString); container.AddService(typeof(Elmah.ErrorLog), log); return(container); }; //Configure Dynamic Configuration //DynamicConfigurationManager.Instance.ApplyConfiguration(HttpContext.Current); }
public static bool _ctor_System_ComponentModel_Design_ServiceContainer_System_IServiceProvider( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.IServiceProvider parentProvider = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.ctor(parentProvider); } catch (System.Exception e) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.ctor(parentProvider); } catch (System.Exception e) { exception_Intercepted = e; } return((exception_Real.Message == exception_Intercepted.Message)); }
/// <summary>Initializes any data/resources on application start.</summary> /// <param name="context">The application context that instantiated and will be running this module.</param> public virtual void OnStart(HttpApplication context) { // put your application start code here //Note: In IIS 7 You need to configure managed pipeline mode to Classic mode only because Integrated mode do not allow Application_Start event to access HttpContext anymore //Configure Elmah SqlErrorLog Connection String var parent = Elmah.ServiceCenter.Current; Elmah.ServiceCenter.Current = webcontext => { var container = new System.ComponentModel.Design.ServiceContainer(parent(webcontext)); var log = new Elmah.SqlErrorLog(Global_config.DBConnectionString); container.AddService(typeof(Elmah.ErrorLog), log); return(container); }; //Configure Dynamic Configuration //DynamicConfigurationManager.Instance.ApplyConfiguration(HttpContext.Current); }
public static bool _AddService_System_ComponentModel_Design_ServiceContainer_System_Type_System_Object_System_Boolean( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; System.Object serviceInstance = null; System.Boolean promote = false; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType,serviceInstance,promote); } catch( System.Exception e ) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType,serviceInstance,promote); } catch( System.Exception e ) { exception_Intercepted = e; } return( ( exception_Real.Message == exception_Intercepted.Message )); }
public static bool _AddService_System_ComponentModel_Design_ServiceContainer_System_Type_System_ComponentModel_Design_ServiceCreatorCallback( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.Type serviceType = null; System.ComponentModel.Design.ServiceCreatorCallback callback = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType,callback); } catch( System.Exception e ) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.AddService(serviceType,callback); } catch( System.Exception e ) { exception_Intercepted = e; } return( ( exception_Real.Message == exception_Intercepted.Message )); }
public static bool _ctor_System_ComponentModel_Design_ServiceContainer_System_IServiceProvider( ) { //class object System.ComponentModel.Design.ServiceContainer _System_ComponentModel_Design_ServiceContainer = new System.ComponentModel.Design.ServiceContainer(); //Parameters System.IServiceProvider parentProvider = null; //Exception System.Exception exception_Real = null; System.Exception exception_Intercepted = null; InterceptionMaintenance.disableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.ctor(parentProvider); } catch( System.Exception e ) { exception_Real = e; } InterceptionMaintenance.enableInterception( ); try { _System_ComponentModel_Design_ServiceContainer.ctor(parentProvider); } catch( System.Exception e ) { exception_Intercepted = e; } return( ( exception_Real.Message == exception_Intercepted.Message )); }
private DependencyService() { _container = new System.ComponentModel.Design.ServiceContainer(); _container.AddService(typeof(IServiceProvider), this); }
static void RunLayout( string fileName, IObservable <TypeVisualizerDescriptor> visualizerProvider, WorkflowBuilder workflowBuilder, VisualizerLayout layout) { var typeVisualizers = new TypeVisualizerMap(); var loadVisualizers = (from typeVisualizer in visualizerProvider let targetType = Type.GetType(typeVisualizer.TargetTypeName) let visualizerType = Type.GetType(typeVisualizer.VisualizerTypeName) where targetType != null && visualizerType != null select Tuple.Create(targetType, visualizerType)) .Do(entry => typeVisualizers.Add(entry.Item1, entry.Item2)) .ToEnumerable().ToList(); workflowBuilder = new WorkflowBuilder(workflowBuilder.Workflow.ToInspectableGraph()); LayoutHelper.SetWorkflowNotifications(workflowBuilder.Workflow, publishNotifications: false); foreach (var node in workflowBuilder.Workflow) { var layoutSettings = layout.GetLayoutSettings(node.Value); if (layoutSettings == null) { layoutSettings = new VisualizerDialogSettings(); layout.DialogSettings.Add(layoutSettings); } layoutSettings.Tag = node.Value; } LayoutHelper.SetLayoutNotifications(layout); var services = new System.ComponentModel.Design.ServiceContainer(); var runtimeWorkflow = workflowBuilder.Workflow.BuildObservable(); var mapping = LayoutHelper.CreateVisualizerMapping(workflowBuilder.Workflow, layout, typeVisualizers, services); var cts = new CancellationTokenSource(); var contextMenu = new ContextMenuStrip(); foreach (var launcher in mapping.Values.Where(launcher => launcher.Visualizer.IsValueCreated)) { var activeLauncher = launcher; contextMenu.Items.Add(new ToolStripMenuItem(launcher.Text, null, (sender, e) => { activeLauncher.Show(services); })); } contextMenu.Items.Add(new ToolStripSeparator()); contextMenu.Items.Add(new ToolStripMenuItem("Stop", null, (sender, e) => cts.Cancel())); var notifyIcon = new NotifyIcon(); notifyIcon.Icon = Properties.Resources.Icon; notifyIcon.Text = Path.GetFileName(fileName); notifyIcon.ContextMenuStrip = contextMenu; notifyIcon.Visible = true; runtimeWorkflow.Finally(() => { notifyIcon.Visible = false; Application.Exit(); }).Subscribe( unit => { }, ex => { Console.WriteLine(ex); }, () => { }, cts.Token); Application.Run(); }
protected virtual void Dispose(bool disposing) { if (disposing && (this._serviceContainer != null)) { this._serviceContainer.Dispose(); this._serviceContainer = null; } }
protected virtual void Dispose(bool disposing) { if (disposing) { if (this.Disposed != null) { this.Disposed(this, EventArgs.Empty); } try { try { if (this._host != null) { this._host.DisposeHost(); } } finally { if (this._serviceContainer != null) { this._serviceContainer.RemoveService(typeof(DesignSurface)); this._serviceContainer.Dispose(); } } } finally { this._host = null; this._serviceContainer = null; } } }