Пример #1
0
        public static Heartbeat GetInstance()
        {
            lock (typeof(Heartbeat))
            {
                if (instance == null)
                    instance = new Heartbeat();
            }

            return instance;
        }
Пример #2
0
        private CoreComponent(IGraphUiContainer uiContainer, bool enableGeometricPreview)
        {
            // Either create or reuse a session name.
            EstablishSessionName(uiContainer);

            this.uiContainer = uiContainer;
            if (false != enableGeometricPreview)
                this.renderService = new RenderService(this);

            if (this.HostApplication != null)
            {
                object filteredClasses = null;
                Dictionary<string, object> configs = this.HostApplication.Configurations;
                if (configs.TryGetValue(ConfigurationKeys.FilteredClasses, out filteredClasses))
                {
                    this.filteredClasses = ((string)filteredClasses).ToLower();
                    if (!this.filteredClasses.EndsWith(";"))
                        this.filteredClasses += ';';
                }
            }

            this.heartbeat = Heartbeat.GetInstance();
            this.studioSettings = StudioSettings;
        }