public override void OnCreated(IThreading threading) { buildingManager = BuildingManager.instance; propManager = PropManager.instance; base.OnCreated(threading); }
public override void OnCreated(IThreading threading) { m_residentAI = new FlunkingResidentAI(); #if DROPOUTS_DEBUG Debug.Log("Flunker loaded"); #endif }
public ExtendedDebugHostProvider(DebugHostProvider wrappedHostProvider) : base(wrappedHostProvider) { debugger2 = wrappedHostProvider.GetField <util::JetBrains.Util.Lazy.Lazy <IVsDebugger2> >("myDebugger"); dte = wrappedHostProvider.GetField <DTE>("myDte"); threading = wrappedHostProvider.GetField <IThreading>("myThreading"); }
public override void OnCreated(IThreading threading) { Instance = this; ui.selectedToolModeChanged += (ToolMode newMode) => { SetToolMode(newMode); }; }
public ZenCodingOptionsPage(Lifetime lifetime, OptionsSettingsSmartContext settings, IThreading threading, IThemedIconManager iconManager) { myLifetime = lifetime; mySettings = settings; myThreading = threading; myIconManager = iconManager; myLambdaExpression = s => s.FileAssociations; InitializeComponent(); myFileAssociations = new SortedDictionary <int, FileAssociation>(); foreach (var pair in mySettings.EnumerateIndexedEntry(myLambdaExpression)) { myFileAssociations[pair.First] = pair.Second; } var model = BuildModel(); myView = new FileAssociationsTreeView(model, new FileAssociationViewController()) { Presenter = new FileAssociationPresenter(), Dock = DockStyle.Fill }; myView.DoubleClick += EditFileAssociation; myRules.Controls.Add(myView); _buttons.Items.Add("Create", myIconManager.Icons[ZenCodingCommonThemedIcons.Add.Id].CurrentGdipBitmap96, CreateFileAssociation); _buttons.Items.Add("Edit", myIconManager.Icons[CommonThemedIcons.Edit.Id].CurrentGdipBitmap96, EditFileAssociation); _buttons.Items.Add("Remove", myIconManager.Icons[CommonThemedIcons.Remove.Id].CurrentGdipBitmap96, RemoveFileAssociation); _buttons.Items.Add("Up", myIconManager.Icons[CommonThemedIcons.Up.Id].CurrentGdipBitmap96, MoveUp); _buttons.Items.Add("Down", myIconManager.Icons[CommonThemedIcons.Down.Id].CurrentGdipBitmap96, MoveDown); }
private ILookup<string, FileSystemPath> installedPackages; // there can be several versions of one package (different versions) #endregion Fields #region Constructors public NuGetApi(ISolution solution, Lifetime lifetime, IComponentModel componentModel, IThreading threading, ProjectModelSynchronizer projectModelSynchronizer) { this.solution = solution; this.threading = threading; this.projectModelSynchronizer = projectModelSynchronizer; try { vsPackageInstallerServices = componentModel.GetExtensions<IVsPackageInstallerServices>().SingleOrDefault(); vsPackageInstaller = componentModel.GetExtensions<IVsPackageInstaller>().SingleOrDefault(); vsPackageInstallerEvents = componentModel.GetExtensions<IVsPackageInstallerEvents>().SingleOrDefault(); } catch (Exception e) { Logger.LogException("Unable to get NuGet interfaces.", e); } if (!IsNuGetAvailable) { Logger.LogMessage(LoggingLevel.VERBOSE, "[NUGET PLUGIN] Unable to get NuGet interfaces. No exception thrown"); return; } lifetime.AddBracket( () => vsPackageInstallerEvents.PackageInstalled += RecalcInstalledPackages, () => vsPackageInstallerEvents.PackageInstalled -= RecalcInstalledPackages); lifetime.AddBracket( () => vsPackageInstallerEvents.PackageUninstalled += RecalcInstalledPackages, () => vsPackageInstallerEvents.PackageUninstalled -= RecalcInstalledPackages); RecalcInstalledPackages(null); }
public override void OnCreated(IThreading threading) { if (TLMController.instance != null) { TLMController.instance.destroy(); } }
public override void OnCreated(IThreading threading) { _citizenManager = Singleton<CitizenManager>.instance; _buildingManager = Singleton<BuildingManager>.instance; base.OnCreated(threading); }
public override void OnCreated(IThreading threading) { _transportManager = Singleton <TransportManager> .instance; _simulationManager = Singleton <SimulationManager> .instance; _vehicleManager = Singleton <VehicleManager> .instance; _metroLines = _transportManager.m_lines; }
private void PollEditorState(BackendUnityModel backendUnityModel, FrontendBackendHost frontendBackendHost, Lifetime modelLifetime, IThreading threading, ILogger logger) { if (!backendUnityModel.IsBound) { myEditorState = UnityEditorState.Disconnected; UpdateFrontendEditorState(frontendBackendHost, logger); return; } var task = backendUnityModel.GetUnityEditorState.Start(Unit.Instance); task?.Result.AdviseOnce(modelLifetime, result => { logger.Trace($"Got poll result from Unity editor: {result.Result}"); myEditorState = result.Result; UpdateFrontendEditorState(frontendBackendHost, logger); }); Task.Delay(TimeSpan.FromSeconds(2), modelLifetime).ContinueWith(_ => { if (task != null && !task.AsTask().IsCompleted) { logger.Trace( "There were no response from Unity in two seconds. Setting state to Disconnected."); myEditorState = UnityEditorState.Disconnected; UpdateFrontendEditorState(frontendBackendHost, logger); } }, threading.Tasks.GuardedMainThreadScheduler); }
public InspectThisAction(Lifetime lifetime, Agent agent, IActionManager actionManager, IThreading threading) { this.lifetime = lifetime; this.agent = agent; this.actionManager = actionManager; this.threading = threading; }
/// <summary> /// Initializes a new instance of the <see cref="StyleCopStage"/> class. /// </summary> /// <param name="lifetime"> /// The <see cref="Lifetime"/> of the daemon stage. This has solution scope. /// </param> /// <param name="apiPool"> /// A reference to the main API entry points /// </param> /// <param name="referencedAnalyzersCache">Cache of referenced analyzers</param> /// <param name="threading"> /// The threading API for timed actions. /// </param> public StyleCopStage(Lifetime lifetime, StyleCopApiPool apiPool, IReferencedAnalyzersCache referencedAnalyzersCache, IThreading threading) { this.lifetime = lifetime; this.apiPool = apiPool; this.referencedAnalyzersCache = referencedAnalyzersCache; this.threading = threading; }
public PresentationAssistant(Lifetime lifetime, ShortcutProvider shortcutProvider, PresentationAssistantWindowOwner presentationAssistantWindowOwner, PresentationAssistantSettingsStore settingsStore, IThreading threading) { this.shortcutProvider = shortcutProvider; this.presentationAssistantWindowOwner = presentationAssistantWindowOwner; this.settingsStore = settingsStore; // Post to the UI thread so that the app has time to start before we show the message threading.ExecuteOrQueue("Presentation Assistant initial message", () => { var settings = settingsStore.GetSettings(); UpdateSettings(!settings.WelcomeMessageShown); settings.WelcomeMessageShown = true; settingsStore.SetSettings(settings); }); // Post to the UI thread because settings change are raised on a background thread. // Has the unfortunate side effect that the action disabling the assistant is shown // very briefly, so we blacklist it settingsStore.SettingsChanged.Advise(lifetime, _ => threading.ExecuteOrQueue("Presentation Assistant update enabled", () => UpdateSettings(true))); }
public override void OnCreated(IThreading threading) { base.OnCreated(threading); ticksSinceLastMinuteUpdate = 0; ticksSinceLastSecondUpdate = 0; }
public TutorialWindowRunner([NotNull] Lifetime lifetime, ISolution solution, IPsiFiles psiFiles, ChangeManager changeManager, [NotNull] ISolutionStateTracker solutionStateTracker, [NotNull] GlobalSettings globalSettings, TextControlManager textControlManager, IShellLocks shellLocks, IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment, IActionManager actionManager, WindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager, IColorThemeManager colorThemeManager, IThreading threading) { if (lifetime == null) { throw new ArgumentNullException("lifetime"); } if (solutionStateTracker == null) { throw new ArgumentNullException("solutionStateTracker"); } if (globalSettings == null) { throw new ArgumentNullException("globalSettings"); } foreach (var tutorial in globalSettings.AvailableTutorials) { if (VsIntegration.GetCurrentSolutionPath() == tutorial.Value) { solutionStateTracker.AfterSolutionOpened.Advise(lifetime, () => RunTutorial(globalSettings, tutorial.Key, lifetime, solution, psiFiles, changeManager, textControlManager, shellLocks, editorManager, documentManager, environment, actionManager, windowsHookManager, psiServices, shortcutManager, colorThemeManager, threading)); } } }
public CommandBarEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { AttachToCommandBars((CommandBars)DTE.CommandBars); }
public ZenCodingOptionsPage(Lifetime lifetime, OptionsSettingsSmartContext settings, IThreading threading, IThemedIconManager iconManager) { myLifetime = lifetime; mySettings = settings; myThreading = threading; myIconManager = iconManager; myLambdaExpression = s => s.FileAssociations; InitializeComponent(); myFileAssociations = new SortedDictionary<int, FileAssociation>(); foreach (var pair in mySettings.EnumerateIndexedEntry(myLambdaExpression)) { myFileAssociations[pair.First] = pair.Second; } var model = BuildModel(); myView = new FileAssociationsTreeView(model, new FileAssociationViewController()) { Presenter = new FileAssociationPresenter(), Dock = DockStyle.Fill }; myView.DoubleClick += EditFileAssociation; myRules.Controls.Add(myView); _buttons.Items.Add("Create", myIconManager.Icons[ZenCodingCommonThemedIcons.Add.Id].CurrentGdipBitmap96, CreateFileAssociation); _buttons.Items.Add("Edit", myIconManager.Icons[CommonThemedIcons.Edit.Id].CurrentGdipBitmap96, EditFileAssociation); _buttons.Items.Add("Remove", myIconManager.Icons[CommonThemedIcons.Remove.Id].CurrentGdipBitmap96, RemoveFileAssociation); _buttons.Items.Add("Up", myIconManager.Icons[CommonThemedIcons.Up.Id].CurrentGdipBitmap96, MoveUp); _buttons.Items.Add("Down", myIconManager.Icons[CommonThemedIcons.Down.Id].CurrentGdipBitmap96, MoveDown); }
public override void OnCreated(IThreading threading) { base.OnCreated(threading); ReservationManager.instance = this; //create data object m_go = new GameObject("SingleTrainTrackAI - ReservationManager"); m_data = m_go.AddComponent <ReservationData>(); /*GameObject gameObject = new GameObject(typeof(ReservationManager).Name); * gameObject.AddComponent<ReservationManager>(); * CODebugBase<InternalLogChannel>.VerboseLog(InternalLogChannel.System, "Creating mono singleton of type " + typeof(T).Name, gameObject); * UnityEngine.Object.DontDestroyOnLoad(Singleton<T>.sInstance.gameObject); * */ if (Mod.slowSpeedTrains) { CLEAR_RESERVATION_AFTER *= 2; NEXT_RESERVATION_AFTER *= 2; DELETE_RESERVATION_AFTER *= 2; DELETE_TRAINATSTATION_RESERVATION_AFTER *= 2; NOT_STOPPED_VELOCITY_SQUARED /= 4; } }
public ActionEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { }
public PassthroughHost(Lifetime lifetime, ISolution solution, IThreading threading, IEditorManager editorManager, UnitySolutionTracker unitySolutionTracker, BackendUnityHost backendUnityHost, FrontendBackendHost frontendBackendHost) { mySolution = solution; myThreading = threading; myEditorManager = editorManager; myBackendUnityHost = backendUnityHost; myFrontendBackendHost = frontendBackendHost; if (!frontendBackendHost.IsAvailable) { return; } unitySolutionTracker.IsUnityProject.View(lifetime, (unityProjectLifetime, args) => { var model = frontendBackendHost.Model; if (args && model != null) { AdviseFrontendToUnityModel(unityProjectLifetime, model); // Advise the backend/Unity model as high priority so we can add our subscriptions first using (Signal.PriorityAdviseCookie.Create()) { backendUnityHost.BackendUnityModel.ViewNotNull(unityProjectLifetime, AdviseUnityToFrontendModel); } } }); }
public UnitTestAnimations(Lifetime lifetime, IUnitTestSessionConductor sessionConductor, IUnitTestResultManager resultsManager, Agent agent, IThreading threading) { this.resultsManager = resultsManager; this.agent = agent; this.threading = threading; var testSessionLifetimes = new Dictionary <IUnitTestSessionTreeViewModel, LifetimeDefinition>(); sessionConductor.SessionOpened.Advise(lifetime, sessionView => { var sessionLifetimeDefinition = Lifetimes.Define(lifetime, "Clippy::TestSession"); testSessionLifetimes.Add(sessionView, sessionLifetimeDefinition); SubscribeToSessionLaunch(sessionLifetimeDefinition.Lifetime, sessionView.Session); }); sessionConductor.SessionClosed.Advise(lifetime, sessionView => { LifetimeDefinition sessionLifetimeDefinition; if (testSessionLifetimes.TryGetValue(sessionView, out sessionLifetimeDefinition)) { sessionLifetimeDefinition.Terminate(); testSessionLifetimes.Remove(sessionView); } }); }
/// <summary> /// Called by the game after this instance is created. /// </summary> /// <param name="threading">The threading.</param> public override void OnCreated(IThreading threading) { this.threading = threading; #if USE_LOG_FILE if (logFile == null) { logFile = File.Create("CSL-WebServer.log"); logListener = new TextWriterTraceListener(logFile); Trace.Listeners.Add(logListener); } #endif Log("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Log("Initializing..."); /* if(fileWatcher == null) { * fileWatcher = new FileWatcher(); * } */ GetWebRoot(); try { RegisterHandlers(); } catch (Exception ex) { Log($"Error registering handlers: {ex}"); UnityEngine.Debug.LogException(ex); } Log("Starting..."); Run(); Log("Startup OK."); base.OnCreated(threading); Log("OnCreated: done"); }
public override void OnCreated(IThreading threading) { _citizenManager = Singleton <CitizenManager> .instance; _buildingManager = Singleton <BuildingManager> .instance; base.OnCreated(threading); }
public GitEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { _oldActions = Lists.NewList <VersionControlAction>(); }
public UserProfileEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] ISettingsStore settingsStore, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { _settingsStore = settingsStore; }
/// <summary> /// Called by the game after this instance is created. /// </summary> /// <param name="threading">The threading.</param> public override void OnCreated(IThreading threading) { this.InitializeServer(); _requestHandlers = new List <IRequestHandler>(); RegisterHandlers(); base.OnCreated(threading); }
public TaskEventGenerator(IRSEnv env, IMessageBus messageBus, IDateUtils dateUtils, IThreading threading, TasksVersionUtil versionUtil) : base(env, messageBus, dateUtils, threading) { _versionUtil = versionUtil; }
public CodeCompletionEventHandler(IRSEnv env, IMessageBus messageBus, IDateUtils dateUtils, IThreading threading) : base(env, messageBus, dateUtils, threading) { _context = new Context(); }
public override void OnCreated(IThreading threading) { BuildingWatcher.instance = this; this._initialized = false; this._delta = 0.0f; this._depotMap = new Dictionary <ItemClass.SubService, HashSet <ushort> >(); base.OnCreated(threading); }
public TestGitEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { Content = Lists.NewList <string>(); }
public override void OnCreated(IThreading threading) { _initialized = false; _terminated = false; base.OnCreated(threading); ModLogger.Debug(string.Format("{0} created", _monitorType)); }
private static void AdviseModel(Lifetime lifetime, FrontendBackendModel frontendBackendModel, PackageManager packageManager, DeferredCacheController deferredCacheController, IThreading shellLocks) { AdvisePackages(lifetime, frontendBackendModel, packageManager); AdviseIntegrationTestHelpers(lifetime, frontendBackendModel, deferredCacheController, shellLocks); }
/// <summary> /// A method that is called by the game after this instance is created. /// </summary> /// <param name="threading">A reference to the game's <see cref="IThreading"/> implementation.</param> public override void OnCreated(IThreading threading) { var mod = PluginManager.instance.GetPluginsInfo() .Select(p => p.userModInstance) .OfType <StopsAndStationsMod>() .FirstOrDefault(); configuration = mod?.ConfigProvider.Configuration ?? new ModConfiguration(); }
public override void OnCreated(IThreading threading) { _helper = MonitorHelper.Instance; _zombieManager = ZombieManager.instance; _initialized = false; _terminated = false; base.OnCreated(threading); }
public SystemEventGenerator([NotNull] IRSEnv env, [NotNull] IMessageBus messageBus, [NotNull] IDateUtils dateUtils, [NotNull] IThreading threading) : base(env, messageBus, dateUtils, threading) { SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; SystemEvents.SessionSwitch += SystemEvents_SessionSwitch; }
public ExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks, [NotNull] IActionManager actionManager, [NotNull] IThreading threading, [NotNull] IDocumentMarkupManager markupManager) { myPopupMenus = popupMenus; myShellLocks = shellLocks; myActionManager = actionManager; myMarkupManager = markupManager; myThreading = threading; }
public override void OnCreated(IThreading threading) { _settings = Settings.Instance; _helper = Helper.Instance; _initialized = false; _terminated = false; base.OnCreated(threading); }
public JetBoxSettingsStorage(Lifetime lifetime, ProductSettingsLocation productSettingsLocation, ISettingsSchema settingsSchema, DataContexts dataContexts, IThreading threading, IFileSystemTracker fileSystemTracker, FileSettingsStorageBehavior settingsStorageBehavior, ISettingsLogger settingsLogger, ISettingsChangeDispatch settingsChangeDispatch, SettingsStorageMountPoints.SelfCheckControl selfCheckControl) { var filePath = productSettingsLocation.GetUserSettingsNonRoamingDir(ProductSettingsLocationFlag.ThisProductThisVersionThisEnvironment).Combine("JetBox" + XmlFileSettingsStorage.SettingsStorageFileExtensionWithDot); var property = new Property<FileSystemPath>(lifetime, GetType().Name + "Path", filePath); var settingsProvider = new JetBoxSettingsProvider(lifetime, GetType().Name + "::Provider", property, true, 0, IsAvailable.Always, SettingsStoreSerializationToXmlDiskFile.SavingEmptyContent.DeleteFile, threading, fileSystemTracker, settingsStorageBehavior, new Dictionary<PropertyId, object>()); var mounts = new SettingsStorageMountPoints(lifetime, new CollectionEvents<IProvider<ISettingsStorageMountPoint>>(lifetime, GetType() + "::Mounts") { settingsProvider }, threading, settingsLogger, selfCheckControl); mySettingsStore = new SettingsStore(lifetime, settingsSchema, mounts, dataContexts, null, settingsLogger, settingsChangeDispatch ); }
public ClassUsageTextStyleProvider(Lifetime lifetime, IThreading threading, IHighlighterCustomization highlighterCustomization, DefaultTextControlSchemeManager textControlSchemeManager, HighlightingSettingsManager highlightingSettingsManager, ISettingsStore settingsStore) { this.threading = threading; this.highlighterCustomization = highlighterCustomization; this.highlightingSettingsManager = highlightingSettingsManager; this.settingsStore = settingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); textControlSchemeManager.ColorsChanged.Advise(lifetime, Refresh); }
// This method is called on the Main thread but we want the releases on the Simulation thread. public static void ReleaseInstances(IThreading threading) { try { threading.QueueSimulationThread(ReleaseAction); } catch (Exception e) { Util.DebugPrint("ReleaseInstances:"); UnityEngine.Debug.LogException(e); } }
/// <summary> /// Initializes a new instance of the StyleCopStageProcess class, using the specified <see cref="IDaemonProcess"/> . /// </summary> /// <param name="lifetime"> /// The <see cref="Lifetime"/> of the owning <see cref="IDaemonProcess"/> /// </param> /// <param name="apiPool"> /// A reference to the StyleCop runner. /// </param> /// <param name="daemon"> /// A reference to the <see cref="IDaemon"/> manager. /// </param> /// <param name="daemonProcess"> /// <see cref="IDaemonProcess"/> to execute within. /// </param> /// <param name="threading"> /// A reference to the <see cref="IThreading"/> instance for timed actions. /// </param> /// <param name="file"> /// The file to analyze. /// </param> public StyleCopStageProcess(Lifetime lifetime, StyleCopApiPool apiPool, IDaemon daemon, IDaemonProcess daemonProcess, IThreading threading, ICSharpFile file) { StyleCopTrace.In(daemonProcess, file); this.lifetime = lifetime; this.apiPool = apiPool; this.daemon = daemon; this.daemonProcess = daemonProcess; this.threading = threading; this.file = file; StyleCopTrace.Out(); }
public PreviewTabEditorManager(Lifetime lifetime, ProjectModelSynchronizer projectModelSynchronizer, IVsUIShellOpenDocument vsUiShellOpenDocument, VsDocumentManagerSynchronization vsDocumentManagerSynchronization, ITextControlManager textControlManager, IFrameFocusHelper frameFocusHelper, DocumentManager documentManager, DocumentTransactionManager documentTransactionManager, IThreading threading) : base(lifetime, projectModelSynchronizer, vsUiShellOpenDocument, vsDocumentManagerSynchronization, textControlManager, frameFocusHelper, documentManager) { this.documentTransactionManager = documentTransactionManager; this.threading = threading; previewTabRequests = 0; }
public SettingsLoader(Lifetime lifetime, SimpleExtensionManager extensionManager, UserInjectedSettingsLayers userInjectedSettingsLayers, IThreading threading, IFileSystemTracker filetracker, FileSettingsStorageBehavior behavior) { // Check to see if we've been loaded as an extension - so we're either loaded // as a plugin on the command line (debugging) or we're in an environment that // doesn't support the default extension provider (e.g. VS2008) if (extensionManager.IsInstalled()) return; var files = GetSettingsFiles(); foreach (var file in files) { MountSettingsFile(lifetime, extensionManager.ExtensionId, file, extensionManager.SettingsMountPointId, threading, filetracker, behavior, userInjectedSettingsLayers); } }
public TemplatesLoader(Lifetime lifetime, GlobalSettings globalSettings, UserInjectedSettingsLayers userInjectedSettingsLayers, IThreading threading, IFileSystemTracker filetracker, FileSettingsStorageBehavior behavior) { var path = GetSettingsFile(); var persistentId = new UserInjectedSettingsLayers.InjectedLayerPersistentIdentity(AngularJsInjectedLayerId); var pathAsProperty = new Property<FileSystemPath>(lifetime, "InjectedFileStoragePath", path); var serialization = new XmlFileSettingsStorage(lifetime, "angularjs-templates::" + path.FullPath.QuoteIfNeeded(), pathAsProperty, SettingsStoreSerializationToXmlDiskFile.SavingEmptyContent.DeleteFile, threading, filetracker, behavior); var descriptor = new UserInjectedSettingsLayers.UserInjectedLayerDescriptor(lifetime, globalSettings.ProductGlobalLayerId, persistentId, serialization.Storage, SettingsStorageMountPoint.MountPath.Default, () => { }); descriptor.InitialMetadata.Set(UserFriendlySettingsLayers.DisplayName, "angularjs-templates"); descriptor.InitialMetadata.Set(UserFriendlySettingsLayers.Origin, "AngularJS plugin"); descriptor.InitialMetadata.Set(PreventDeletion, true); descriptor.InitialMetadata.Set(PreventReset, true); userInjectedSettingsLayers.RegisterUserInjectedLayer(lifetime, descriptor); }
private void MountSettingsFile(Lifetime lifetime, string pluginId, FileSystemPath path, UserFriendlySettingsLayer.Identity hostId, IThreading threading, IFileSystemTracker filetracker, FileSettingsStorageBehavior behavior, UserInjectedSettingsLayers userInjectedSettingsLayers) { var id = string.Format("extension::{0}-{1}", pluginId, path.Name); var persistentId = new LayerId(id); var pathAsProperty = new Property<FileSystemPath>(lifetime, "InjectedFileStoragePath", path); var serialization = CreateXmlFileSettingsStorage(lifetime, threading, filetracker, behavior, id, pathAsProperty); var descriptor = new LayerDescriptor(lifetime, hostId, persistentId, serialization.Storage, MountPath.Default, () => { }); descriptor.InitialMetadata.Set(UserFriendlySettingsLayers.DisplayName, string.Format("{0} » {1}", pluginId, path.NameWithoutExtension)); descriptor.InitialMetadata.Set(UserFriendlySettingsLayers.Origin, string.Format("Published by plugin: {0}", pluginId)); descriptor.InitialMetadata.Set(UserFriendlySettingsLayers.DiskFilePath, path); descriptor.InitialMetadata.Set(IsNonUserEditable, true); userInjectedSettingsLayers.RegisterUserInjectedLayer(lifetime, descriptor); }
public override void OnCreated(IThreading threading) { logger.Message("==============================="); logger.Message("Initializing auto color monitor"); logger.Message("Initializing colors"); RandomColor.Initialize(); CategorisedColor.Initialize(); GenericNames.Initialize(); logger.Message("Loading current config"); _config = Configuration.Instance; _colorStrategy = SetColorStrategy(_config.ColorStrategy); _namingStrategy = SetNamingStrategy(_config.NamingStrategy); _usedColors = new List<Color32>(); logger.Message("Found color strategy of " + _config.ColorStrategy); logger.Message("Found naming strategy of " + _config.NamingStrategy); _initialized = true; logger.Message("done creating"); base.OnCreated(threading); }
private static XmlFileSettingsStorage CreateXmlFileSettingsStorage(Lifetime lifetime, IThreading threading, IFileSystemTracker filetracker, FileSettingsStorageBehavior behavior, string id, Property<FileSystemPath> pathAsProperty) { return new XmlFileSettingsStorage(lifetime, id, pathAsProperty, SaveEmptyFilePolicy.KeepFile, threading, filetracker, behavior); }
/// <summary> /// Initializes a new instance of the <see cref="StyleCopStage"/> class. /// </summary> /// <param name="lifetime"> /// The <see cref="Lifetime"/> of the daemon stage. This has solution scope. /// </param> /// <param name="apiPool"> /// A reference to the main API entry points /// </param> /// <param name="threading"> /// The threading API for timed actions. /// </param> public StyleCopStage(Lifetime lifetime, StyleCopApiPool apiPool, IThreading threading) { this.lifetime = lifetime; this.apiPool = apiPool; this.threading = threading; }
public ExtendedDebugTaskRunnerHostController(UnitTestManager manager, UnitTestSessionManager sessionManager, util::JetBrains.Util.Lazy.Lazy<IVsDebugger2> debugger2, DTE dte, IThreading threading, IUnitTestLaunch launch, string remotingAddress) : base(manager, sessionManager, debugger2, dte, threading, launch, remotingAddress) { }
public override void OnCreated(IThreading threading) { _settings = Settings.Instance; _helper = Helper.Instance; _initialized = false; _terminated = false; _added = new HashSet<ushort>(); _removed = new HashSet<ushort>(); base.OnCreated(threading); }
/// <summary> /// Called by the game after this instance is created. /// </summary> /// <param name="threading">The threading.</param> public override void OnCreated(IThreading threading) { InitializeServer(); base.OnCreated(threading); }
public void OnReleased() { this.threading = null; this.core = null; }
//Thread: Main public override void OnCreated(IThreading threading) { ChirpLog.Debug("IThreading Created"); }
private static XmlFileSettingsStorage CreateXmlFileSettingsStorage(Lifetime lifetime, IThreading threading, IFileSystemTracker filetracker, FileSettingsStorageBehavior behavior, string id, Property<FileSystemPath> pathAsProperty) { var internKeyPathComponent = Shell.Instance.GetComponent<InternKeyPathComponent>(); return new XmlFileSettingsStorage(lifetime, id, pathAsProperty, SavingEmptyContent.KeepFile, threading, filetracker, behavior, internKeyPathComponent); }
public DaemonData(Lifetime lifetime, IThreading threading, IDaemon daemon, IDocument document) { this.lastCalledTimestamp = DateTime.MinValue; this.groupingEvent = threading.GroupingEvents.CreateEvent( lifetime, "StyleCop::ReHighlight", PauseDuration, Rgc.Guarded, () => ReadLockCookie.Execute(() => daemon.ForceReHighlight(document))); }
/// <summary> /// Called when doer is created. /// </summary> /// <param name="threading">The threading.</param> public override void OnCreated(IThreading threading) { Log.Debug(this, "OnCreated", "Base"); Log.FlushBuffer(); base.OnCreated(threading); }
public void OnCreated(IThreading threading) { this.threading = threading; this.core = RepublicCore.Instance; this.core.managers = threading.managers; }
public FindUsagesOfSymbolController(Lifetime lifetime, ISolution solution, LibrariesFlag librariesFlag, IShellLocks locks, DataContexts dataContexts, IThreading threading) : base(lifetime, solution, librariesFlag, locks) { this.dataContexts = dataContexts; this.threading = threading; }
public ExtendedDebugTaskRunnerHostController(IUnitTestLaunchManager launchManager, IUnitTestAgentManager agentManager, util::JetBrains.Util.Lazy.Lazy<IVsDebugger2> debugger2, DTE dte, IThreading threading, IUnitTestLaunch launch, int port) : base(launchManager, agentManager, debugger2, dte, threading, launch, port) { this.port = port; }