public void ApplyFeature (SolutionFolder parentCombine, SolutionItem entry, Widget editor) { GtkFeatureWidget fw = (GtkFeatureWidget) editor; ReferenceManager refmgr = new ReferenceManager ((DotNetProject) entry); refmgr.GtkPackageVersion = fw.SelectedVersion; refmgr.Dispose (); }
public JsonResult SortRecords(string list) { JsonList psl = (new JavaScriptSerializer()).Deserialize <JsonList>(list); string[] idsList = psl.list; bool issorted = ReferenceManager.SortRecords(idsList); return(Json(issorted)); }
/// <summary> /// Initializes a new instance of the ExcelSheet class. /// </summary> /// <param name="writer">XmlWriter to write the sheet data</param> internal ExcelSheet(XmlWriter writer) { this.writer = writer; writer.WriteStartDocument(); writer.WriteStartElement("worksheet", "http://schemas.openxmlformats.org/spreadsheetml/2006/main"); writer.WriteAttributeString("xmlns", "r", null, "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); writer.WriteStartElement("sheetData"); referenceManager = new ReferenceManager(writer); }
public IndexerThread(IndexWriter w, FacetsConfig config, ITaxonomyWriter tw, ReferenceManager <SearcherAndTaxonomy> mgr, int ordLimit, AtomicBoolean stop) { this.w = w; this.config = config; this.tw = tw; this.mgr = mgr; this.ordLimit = ordLimit; this.stop = stop; }
public IndexerThread(IndexWriter w, FacetsConfig config, TaxonomyWriter tw, ReferenceManager<SearcherAndTaxonomy> mgr, int ordLimit, AtomicBoolean stop) { this.w = w; this.config = config; this.tw = tw; this.mgr = mgr; this.ordLimit = ordLimit; this.stop = stop; }
public void GetReferencesBySearchString() { List <WebReference> references; String searchString = "Gärdenfors"; references = ReferenceManager.GetReferencesBySearchString(GetContext(), searchString); Assert.IsNotNull(references); Assert.IsTrue(references.Count > 4); }
/// <summary> /// Initializes references to Reference Manager and Laser Sight, sets this /// GameObject to the player ship reference in Reference Manager. /// </summary> private void Awake() { reference = FindObjectOfType <ReferenceManager>(); newPosesAppliedAction = SteamVR_Events.NewPosesAppliedAction(OnNewPosesApplied); if (reference == null) { Debug.LogError(GetType().Name + " - Could not find Reference Manager!"); } else { reference.playerShip = gameObject; reference.playerShipSource = source; reference.tooltips.ShipGrabbed(); SetWeapon((int)reference.gameSettings.selectedWeapon); if (reference.shipPickup) { reference.shipPickup.SetActive(false); } if (reference.powerUpStatus) { reference.powerUpStatus.BeginTracking(reference, hand); } if (reference.gameSettings.selectedGameMode == GameSettings.GameMode.SoloNormal) { if (reference.waveManager != null) { reference.waveManager.Run(); } else { Debug.LogError(GetType().Name + " - Reference.WaveManager is null. Cannot call Run()."); } } else { if (reference.countdown) { reference.countdown.SetActive(true); } else { Debug.LogError( GetType().Name + " - Reference.Countdown is null. Cannot enable."); } } StartCoroutine(IntroAudio()); reference.tooltips.SpawnProtectShip(); } }
public void GetReferenceRelationsByGuid() { List <WebReferenceRelation> referenceRelations; WebReferenceRelation referenceRelation; referenceRelation = ReferenceManager.GetReferenceRelationById(GetContext(), 1); referenceRelations = ReferenceManager.GetReferenceRelationsByGuid(GetContext(), referenceRelation.RelatedObjectGuid); Assert.IsTrue(referenceRelations.IsNotEmpty()); }
public WidgetBuilderOptionPanelWidget (Project project) : base (false, 6) { this.project = project as DotNetProject; Gtk.HBox box = new Gtk.HBox (false, 3); Gtk.Label lbl = new Gtk.Label (GettextCatalog.GetString ("Target Gtk# version:")); box.PackStart (lbl, false, false, 0); comboVersions = ComboBox.NewText (); ReferenceManager refmgr = new ReferenceManager (project as DotNetProject); foreach (string v in refmgr.SupportedGtkVersions) comboVersions.AppendText (v); comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf (refmgr.GtkPackageVersion); refmgr.Dispose (); box.PackStart (comboVersions, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); HSeparator sep = new HSeparator (); sep.Show (); PackStart (sep, false, false, 0); if (!GtkDesignInfo.HasDesignedObjects (project)) return; GtkDesignInfo designInfo = GtkDesignInfo.FromProject (project); checkGettext = new CheckButton (GettextCatalog.GetString ("Enable gettext support")); checkGettext.Active = designInfo.GenerateGettext; checkGettext.Show (); PackStart (checkGettext, false, false, 0); box = new Gtk.HBox (false, 3); box.PackStart (new Label (GettextCatalog.GetString ("Gettext class:")), false, false, 0); entryGettext = new Gtk.Entry (); entryGettext.Text = designInfo.GettextClass; entryGettext.Sensitive = checkGettext.Active; box.PackStart (entryGettext, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); sep= new HSeparator (); sep.Show (); PackStart (sep, false, false, 0); box = new Gtk.HBox (false, 3); box.PackStart (new Label (GettextCatalog.GetString ("Stetic folder name :")), false, false, 0); entryFolderName = new Gtk.Entry (); entryFolderName.Text = designInfo.SteticFolderName; entryFolderName.Sensitive = false; box.PackStart (entryFolderName, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); checkHideFiles = new CheckButton (GettextCatalog.GetString ("Hide designer files")); checkHideFiles.Active = designInfo.HideGtkxFiles; checkHideFiles.Show (); PackStart (checkHideFiles, false, false, 0); }
/// <summary> /// Processes sub streams and storages on the specified storage. /// </summary> /// <param name="storage"> The storage to get sub streams and storages for. </param> protected virtual void LoadStorage(NativeMethods.IStorage storage) { if (storage == null) { throw new ArgumentNullException("storage", "Storage can not be null"); } _storage = storage; // Ensures memory is released ReferenceManager.AddItem(storage); NativeMethods.IEnumSTATSTG storageElementEnum = null; try { // Enum all elements of the storage storage.EnumElements(0, IntPtr.Zero, 0, out storageElementEnum); // Iterate elements while (true) { // Get 1 element out of the COM enumerator uint elementStatCount; var elementStats = new STATSTG[1]; storageElementEnum.Next(1, elementStats, out elementStatCount); // Break loop if element not retrieved if (elementStatCount != 1) { break; } var elementStat = elementStats[0]; switch (elementStat.type) { case 1: // Element is a storage, add its statistics object to the storage dictionary _subStorageStatistics.Add(elementStat.pwcsName, elementStat); break; case 2: // Element is a stream, add its statistics object to the stream dictionary _streamStatistics.Add(elementStat.pwcsName, elementStat); break; } } } finally { // Free memory if (storageElementEnum != null) { Marshal.ReleaseComObject(storageElementEnum); } } }
public static List <WebReference> GetSomeReferences(WebServiceContext context) { List <WebReference> allReferences, references; references = new List <WebReference>(); allReferences = ReferenceManager.GetReferences(context); references.Add(allReferences[0]); references.Add(allReferences[1]); return(references); }
/// <summary> /// Spawns the spawn particle emitter and runs the damage boost. /// </summary> private void Start() { reference = GameObject.Find("Reference Manager").GetComponent <ReferenceManager>(); source = GameObject.Find("Powerup Audio Source").GetComponent <AudioSource>(); bossSource = GameObject.Find("Boss Audio Source").GetComponent <AudioSource>(); StartCoroutine(PauseForBoss()); Instantiate(spawnEmitter, reference.playerShip.transform); StartCoroutine(Run()); }
public void ReturnsFalseForFirstUsageOnSecondUsage() { var referenceManager = new ReferenceManager(); var obj = new object(); referenceManager.GetInfo(obj); var referenceInfo = referenceManager.GetInfo(obj); Assert.IsFalse(referenceInfo.IsFirstUsage); }
private void ConnectToManagers() { referenceManager = GameObject.Find("Managers").GetComponent <ReferenceManager>(); keyboardManager = referenceManager.keyboardManager.GetComponent <PlayerKeyboardManager>(); gameStateManager = referenceManager.gameStateManager.GetComponent <GameStateManager>(); inventories[(int)InventoryE.Parent] = referenceManager.inventoryCanvas.GetComponent <Inventory>(); inventoryUIs[(int)InventoryE.Parent] = referenceManager.inventoryCanvas.GetComponent <InventoryUI>(); selected = Resources.Load <Sprite>("SelectedSlot 1"); unselected = Resources.Load <Sprite>("UnselectedSlot 1"); }
protected Manager() { Objects = new ConcurrentDictionary <Id, Obj>(); Synchroniser = new ObjectSynchroniser <Obj>(); References = new ReferenceManager <Obj>(Synchroniser) { OnFirstReference = FirstReference, OnUnReference = CleanupObject }; }
public void GetReferenceRelationById() { Int32 referenceRelationId; WebReferenceRelation referenceRelation; referenceRelationId = 1; referenceRelation = ReferenceManager.GetReferenceRelationById(GetContext(), referenceRelationId); Assert.IsNotNull(referenceRelation); Assert.AreEqual(referenceRelationId, referenceRelation.Id); }
private ReferenceManager GetReferenceManager(Boolean refresh = false) { if (_referenceManager.IsNull() || refresh) { _referenceManager = new ReferenceManager(); _referenceManager.DataSource = new ReferenceDataSource(); } return(_referenceManager); }
public void GetReferencesBySearchCriteria() { List <WebReference> references; WebReferenceSearchCriteria searchCriteria; // Test name search criteria. searchCriteria = new WebReferenceSearchCriteria(); searchCriteria.NameSearchString = new WebStringSearchCriteria(); searchCriteria.NameSearchString.SearchString = "2003"; searchCriteria.NameSearchString.CompareOperators = new List <StringCompareOperator>(); searchCriteria.NameSearchString.CompareOperators.Add(StringCompareOperator.Contains); references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsNotEmpty()); // Test title search criteria. searchCriteria = new WebReferenceSearchCriteria(); searchCriteria.TitleSearchString = new WebStringSearchCriteria(); searchCriteria.TitleSearchString.SearchString = "2003"; searchCriteria.TitleSearchString.CompareOperators = new List <StringCompareOperator>(); searchCriteria.TitleSearchString.CompareOperators.Add(StringCompareOperator.Contains); references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsNotEmpty()); // Test year search criteria. searchCriteria = new WebReferenceSearchCriteria(); searchCriteria.Years = new List <Int32>(); searchCriteria.Years.Add(2003); references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsNotEmpty()); searchCriteria.Years.Add(2004); references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsNotEmpty()); // Test logical operator. searchCriteria = new WebReferenceSearchCriteria(); searchCriteria.NameSearchString = new WebStringSearchCriteria(); searchCriteria.NameSearchString.SearchString = "2003"; searchCriteria.NameSearchString.CompareOperators = new List <StringCompareOperator>(); searchCriteria.NameSearchString.CompareOperators.Add(StringCompareOperator.Contains); searchCriteria.TitleSearchString = new WebStringSearchCriteria(); searchCriteria.TitleSearchString.SearchString = "2003"; searchCriteria.TitleSearchString.CompareOperators = new List <StringCompareOperator>(); searchCriteria.TitleSearchString.CompareOperators.Add(StringCompareOperator.Contains); searchCriteria.Years = new List <Int32>(); searchCriteria.Years.Add(2003); searchCriteria.LogicalOperator = LogicalOperator.Or; references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsNotEmpty()); searchCriteria.LogicalOperator = LogicalOperator.And; references = ReferenceManager.GetReferencesBySearchCriteria(GetContext(), searchCriteria); Assert.IsTrue(references.IsEmpty()); }
public WidgetBuilderOptionPanelWidget(Project project) : base(false, 6) { this.project = project as DotNetProject; Gtk.HBox box = new Gtk.HBox(false, 3); Gtk.Label lbl = new Gtk.Label(GettextCatalog.GetString("Target Gtk# version:")); box.PackStart(lbl, false, false, 0); comboVersions = ComboBox.NewText(); ReferenceManager refmgr = new ReferenceManager(project as DotNetProject); foreach (string v in refmgr.SupportedGtkVersions) { comboVersions.AppendText(v); } comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf(refmgr.GtkPackageVersion); refmgr.Dispose(); box.PackStart(comboVersions, false, false, 0); box.ShowAll(); PackStart(box, false, false, 0); HSeparator sep = new HSeparator(); sep.Show(); PackStart(sep, false, false, 0); if (!GtkDesignInfo.HasDesignedObjects(project)) { return; } GtkDesignInfo designInfo = GtkDesignInfo.FromProject(project); checkGettext = new CheckButton(GettextCatalog.GetString("Enable gettext support")); checkGettext.Active = designInfo.GenerateGettext; checkGettext.Show(); PackStart(checkGettext, false, false, 0); box = new Gtk.HBox(false, 3); box.PackStart(new Label(GettextCatalog.GetString("Gettext class:")), false, false, 0); entryGettext = new Gtk.Entry(); entryGettext.Text = designInfo.GettextClass; entryGettext.Sensitive = checkGettext.Active; box.PackStart(entryGettext, false, false, 0); box.ShowAll(); PackStart(box, false, false, 0); checkGettext.Clicked += delegate { box.Sensitive = checkGettext.Active; if (checkGettext.Active) { entryGettext.Text = "Mono.Unix.Catalog"; } }; }
void InitalizeManagers() { referenceManager = GameObject.Find("Managers").GetComponent <ReferenceManager>(); tradeManager = referenceManager.tradeCanvas.GetComponent <TradeManagerUI>(); dialogueManager = referenceManager.dialogueCanvas.GetComponent <DialogueManager>(); tooltipManager = referenceManager.tooltipManager; gameStateManager = referenceManager.gameStateManager.GetComponent <GameStateManager>(); inventory = referenceManager.inventoryCanvas.GetComponent <Inventory>(); inventoryUI = referenceManager.inventoryCanvas.GetComponent <InventoryUI>(); npcInteractedCanvas = referenceManager.npcInteractedCanvas; }
void Awake() { if (refManager == null) { refManager = this; } else if (refManager != this) { Destroy(gameObject); } }
private void Awake() { if (Instance == null) { Instance = this; } navMeshSurface.BuildNavMesh(); VanishEnemyPoint(); }
void Start() { ReferenceManager = ReferenceManager.GetInstance(); AudioHost = AudioHost.GetInstance(); EnemyManager = EnemyManager.GetInstance(); target = ReferenceManager.playerTransform; _audio = AudioHost.GetComponent <Audio>(); spriteRenderer = GetComponentInChildren <SpriteRenderer>(); FadeIn(); }
/// <summary> /// Initializes the reference to the Reference Manager /// </summary> protected virtual void Awake() { reference = GameObject.Find("Reference Manager").GetComponent <ReferenceManager>(); if (reference == null) { Debug.LogError(GetType().Name + " - Could not find Reference Manager!"); } AimAssistActive = reference.gameSettings != null ? reference.gameSettings.aimAssist : true; }
public WidgetBuilderOptionPanelWidget (Project project) : base (false, 6) { this.project = project as DotNetProject; Gtk.HBox box = new Gtk.HBox (false, 3); Gtk.Label lbl = new Gtk.Label (GettextCatalog.GetString ("Target Gtk# version:")); box.PackStart (lbl, false, false, 0); comboVersions = ComboBox.NewText (); ReferenceManager refmgr = new ReferenceManager (project as DotNetProject); foreach (string v in refmgr.SupportedGtkVersions) comboVersions.AppendText (v); comboVersions.Active = refmgr.SupportedGtkVersions.IndexOf (refmgr.GtkPackageVersion); refmgr.Dispose (); box.PackStart (comboVersions, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); HSeparator sep = new HSeparator (); sep.Show (); PackStart (sep, false, false, 0); if (!GtkDesignInfo.HasDesignedObjects (project)) return; GtkDesignInfo designInfo = GtkDesignInfo.FromProject (project); checkGettext = new CheckButton (GettextCatalog.GetString ("Enable gettext support")); checkGettext.Active = designInfo.GenerateGettext; checkGettext.Show (); PackStart (checkGettext, false, false, 0); box = new Gtk.HBox (false, 3); box.PackStart (new Label (GettextCatalog.GetString ("Gettext class:")), false, false, 0); entryGettext = new Gtk.Entry (); entryGettext.Text = designInfo.GettextClass; entryGettext.Sensitive = checkGettext.Active; box.PackStart (entryGettext, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); box = new Gtk.HBox (false, 3); box.PackStart (new Label (GettextCatalog.GetString ("Resource loader class:")), false, false, 0); entryResourceLoader = new Gtk.Entry (); entryResourceLoader.Text = designInfo.ImageResourceLoaderClass; entryResourceLoader.Sensitive = checkGettext.Active; box.PackStart (entryResourceLoader, false, false, 0); box.ShowAll (); PackStart (box, false, false, 0); checkGettext.Clicked += delegate { box.Sensitive = checkGettext.Active; if (checkGettext.Active) entryGettext.Text = "Mono.Unix.Catalog"; }; }
public CodeAssistBase() { applicationManager = ApplicationManager.GetInstance(); settingsManager = SettingsManager.GetInstance(); referenceManager = ReferenceManager.GetInstance(); cacheManager = CacheManager.GetInstance(); workspaceAssemblyList = new List <string>(); fullNamespaceList = new List <string>(); rootNamespaceList = new List <string>(); configNamespaceList = new List <string>(); }
void Start() { AudioHost = AudioHost.GetInstance(); Debug.Log(AudioHost); ReferenceManager = ReferenceManager.GetInstance(); InventoryManager = InventoryManager.GetInstance(); UIManager = UIManager.GetInstance(); PlayerInput = PlayerInput.GetInstance(); playerInvincibilityEffect = PlayerInput.GetComponent <FadeInOut>(); target = ReferenceManager.playerTransform; }
private void Start() { health = GetComponent <Health>(); entity = GetComponent <Entity>(); referenceManager = GameObject.Find("GameManager").GetComponent <ReferenceManager>(); enemyNamePlate = referenceManager.enemyNamePlate; enemyNamePlate.SetUpBaseValues(health.health, entity.stats.resource); //Resource needs to be changed with real resource value enemyNamePlate.SetUpNamePlate(entity.entityName, entity.entityImage, entity.stats.level, entity.stats.health, entity.stats.resource); }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; } }
/// <summary> /// Runs the master collider shield /// </summary> private void Awake() { reference = GameObject.Find("Reference Manager").GetComponent <ReferenceManager>(); source = GameObject.Find("Powerup Audio Source").GetComponent <AudioSource>(); bossSource = GameObject.Find("Boss Audio Source").GetComponent <AudioSource>(); StartCoroutine(pauseForBoss()); reference.playerShip.GetComponent <ShipController>().masterCollider.ActivateShield(); Destroy(gameObject); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
/// <summary> /// Trigger PowerupStatus to start tracking and find references. /// </summary> public void BeginTracking(ReferenceManager referenceManager, Hand hand) { reference = referenceManager; stats = FindObjectOfType <PlayerStats>(); unlockData = FindObjectOfType <BestiaryUnlockData>(); tracking = true; shipGO = reference.playerShip; this.hand = hand; //hand = shipGO.GetComponentInParent<Hand>(); powerupPoint = shipGO.transform.Find("Powerup Point"); iconPoint = shipGO.transform.Find("Powerup Icon Point"); }
/// <summary> /// Set default volume slider level. /// </summary> private void Awake() { reference = FindObjectOfType <ReferenceManager>(); masterVolumeSlider.value = reference.optionsValues.masterVolume; musicVolumeSlider.value = reference.optionsValues.musicVolume; fxVolumeSlider.value = reference.optionsValues.fxVolume; dialogueVolumeSlider.value = reference.optionsValues.dialogueVolume; masterVolume.text = string.Format("{0:0%}", masterVolumeSlider.value); musicVolume.text = string.Format("{0:0%}", musicVolumeSlider.value); effectsVolume.text = string.Format("{0:0%}", fxVolumeSlider.value); dialogueVolume.text = string.Format("{0:0%}", dialogueVolumeSlider.value); }
/// <summary> /// Triggers gameover/reload process. Find references. Set text values. /// </summary> public void OnEnable() { reference = FindObjectOfType <ReferenceManager>(); StartCoroutine(Reload()); PlayerStats stats = FindObjectOfType <PlayerStats>(); stats.PrintStats(); wavesTextGO.GetComponent <Text>().text = "Waves: " + stats.waves; timeTextGO.GetComponent <Text>().text = "Time: " + stats.totalAliveTime; killsTextGO.GetComponent <Text>().text = "Kills: " + stats.totalEnemiesKilled; }
public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry) { if (!(entry is DotNetProject) || !GtkDesignInfo.SupportsRefactoring (entry as DotNetProject)) return FeatureSupportLevel.NotSupported; ReferenceManager refmgr = new ReferenceManager ((DotNetProject)entry); if (refmgr.SupportedGtkVersions.Count == 0) return FeatureSupportLevel.NotSupported; if (GtkDesignInfo.SupportsDesigner ((Project)entry)) return FeatureSupportLevel.Enabled; else if (entry is DotNetAssemblyProject) return FeatureSupportLevel.SupportedByDefault; else return FeatureSupportLevel.Supported; }
public GtkFeatureWidget (DotNetProject project) { Spacing = 6; versionCombo = Gtk.ComboBox.NewText (); ReferenceManager refmgr = new ReferenceManager (project); foreach (string v in refmgr.SupportedGtkVersions) versionCombo.AppendText (v); versionCombo.Active = 0; refmgr.Dispose (); // GTK# version selector HBox box = new HBox (false, 6); Gtk.Label vlab = new Label (GettextCatalog.GetString ("Target GTK# version:")); box.PackStart (vlab, false, false, 0); box.PackStart (versionCombo, false, false, 0); box.PackStart (new Label (GettextCatalog.GetString ("(or upper)")), false, false, 0); PackStart (box, false, false, 0); ShowAll (); }
private PhpCompilation( string assemblyName, PhpCompilationOptions options, ImmutableArray<MetadataReference> references, //ReferenceManager referenceManager, //SyntaxAndDeclarationManager syntaxAndDeclarations AsyncQueue<CompilationEvent> eventQueue = null ) : base(assemblyName, references, SyntaxTreeCommonFeatures(ImmutableArray<SyntaxTree>.Empty), false, eventQueue) { _wellKnownMemberSignatureComparer = new WellKnownMembersSignatureComparer(this); _options = options; _referenceManager = new ReferenceManager(options.SdkDirectory); _tables = new SourceDeclarations(); _coreTypes = new CoreTypes(this); _coreMethods = new CoreMethods(_coreTypes); _anonymousTypeManager = new AnonymousTypeManager(this); }
private CSharpCompilation( string assemblyName, CSharpCompilationOptions options, ImmutableArray<MetadataReference> references, ImmutableArray<SyntaxTree> syntaxTrees, ImmutableDictionary<SyntaxTree, int> syntaxTreeOrdinalMap, ImmutableDictionary<SyntaxTree, Lazy<RootSingleNamespaceDeclaration>> rootNamespaces, DeclarationTable declarationTable, CSharpCompilation previousSubmission, Type submissionReturnType, Type hostObjectType, bool isSubmission, ReferenceManager referenceManager, bool reuseReferenceManager, AsyncQueue<CompilationEvent> eventQueue = null) : base(assemblyName, references, submissionReturnType, hostObjectType, isSubmission, syntaxTreeOrdinalMap, eventQueue) { using (Logger.LogBlock(FunctionId.CSharp_Compilation_Create, message: assemblyName)) { this.wellKnownMemberSignatureComparer = new WellKnownMembersSignatureComparer(this); this.options = options; this.syntaxTrees = syntaxTrees; this.rootNamespaces = rootNamespaces; this.declarationTable = declarationTable; Debug.Assert(syntaxTrees.All(tree => syntaxTrees[syntaxTreeOrdinalMap[tree]] == tree)); Debug.Assert(syntaxTrees.SetEquals(rootNamespaces.Keys.AsImmutable(), EqualityComparer<SyntaxTree>.Default)); this.builtInOperators = new BuiltInOperators(this); this.scriptClass = new Lazy<ImplicitNamedTypeSymbol>(BindScriptClass); this.globalImports = new Lazy<Imports>(BindGlobalUsings); this.globalNamespaceAlias = new Lazy<AliasSymbol>(CreateGlobalNamespaceAlias); this.anonymousTypeManager = new AnonymousTypeManager(this); if (isSubmission) { Debug.Assert(previousSubmission == null || previousSubmission.HostObjectType == hostObjectType); this.previousSubmission = previousSubmission; } else { Debug.Assert(previousSubmission == null && submissionReturnType == null && hostObjectType == null); } if (reuseReferenceManager) { referenceManager.AssertCanReuseForCompilation(this); this.referenceManager = referenceManager; } else { this.referenceManager = new ReferenceManager( MakeSourceAssemblySimpleName(), options.AssemblyIdentityComparer, (referenceManager != null) ? referenceManager.ObservedMetadata : null); } Debug.Assert((object)this.lazyAssemblySymbol == null); if (EventQueue != null) EventQueue.Enqueue(new CompilationStartedEvent(this)); } }
/// <summary> /// Create a new tag index /// </summary> /// <param name="version">Engine version for the tags</param> /// <param name="dir">Base directory for the tags</param> /// <param name="tag_dir">Name of the tags folder</param> /// <param name="create">Create the directory if it doesn't exist on disk</param> /// <remarks>"<paramref name="tag_dir"/>\" gets appended to <paramref name="dir"/>'s path. /// /// If <paramref name="create"/> is false and full tags path doesn't exist on disk, this will create it /// </remarks> public TagIndex(BlamVersion version, string dir, string tag_dir, bool create) : base() { engine = version; directory = System.IO.Path.Combine(dir, tag_dir); if (!directory.EndsWith("\\")) directory = directory + "\\"; if (!System.IO.Directory.Exists(directory)) { if (create) System.IO.Directory.CreateDirectory(directory); else throw new System.IO.DirectoryNotFoundException(directory); } base.ArrayInitialize(kDefaultArrayName); refManager = new ReferenceManager(version, string.Format("[TagIndex {0}]", directory), false); if (engine.UsesStringIds()) StringTableInitialize(); }
private void InitializeRoot([NotNull] ProjectRootElement element) { const string profileConditionFlag = "'$(Configuration)|$(Platform)' =="; RootElement = element; BasePropertys = new ProjectBasePropertys(element); ReferenceManager = new ReferenceManager(RootElement); ProjectCompilation = new ProjectCompilation(RootElement, ReferenceManager.UsedItemGroupElements); _projectProfiles = new List<SimpleProjectProfile>(); foreach ( var propertyGroup in element.PropertyGroups.Where( propertyGroup => propertyGroup.Condition.Trim().StartsWith(profileConditionFlag, StringComparison.Ordinal))) { _projectProfiles.Add(new SimpleProjectProfile(this, propertyGroup.Condition.Replace(profileConditionFlag, string.Empty).Trim(' ', '\t', '\''), propertyGroup)); } _projectCollection.Add(this); }
static void EnsureReferenceManager() { if (refManager == null) { refManager = new ReferenceManager(); } }
public void UpdateLibraries () { if (hasError || disposed || gproject == null) return; bool needsSave = false; librariesUpdated = true; string[] oldLibs = gproject.WidgetLibraries; ArrayList libs = new ArrayList (); string[] internalLibs; foreach (var pref in project.References) { string wref = GetReferenceLibraryPath (pref); if (wref != null) libs.Add (wref); } ReferenceManager refmgr = new ReferenceManager (project); string target_version = refmgr.TargetGtkVersion; refmgr.Dispose (); // Make sure the target gtk version is properly set if (gproject.TargetGtkVersion != target_version) { gproject.TargetGtkVersion = target_version; needsSave = true; } string outLib = project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration); if (!string.IsNullOrEmpty (outLib)) internalLibs = new string [] { outLib }; else internalLibs = new string [0]; string[] newLibs = (string[]) libs.ToArray (typeof(string)); // See if something has changed if (LibrariesChanged (oldLibs, internalLibs, newLibs)) { gproject.SetWidgetLibraries (newLibs, internalLibs); needsSave = true; } else { GuiBuilderService.SteticApp.UpdateWidgetLibraries (false); } if (needsSave) SaveAll (true); }
public void Store () { ReferenceManager refmgr = new ReferenceManager (project); if (!string.IsNullOrEmpty (comboVersions.ActiveText)) refmgr.GtkPackageVersion = comboVersions.ActiveText; if (GtkDesignInfo.HasDesignedObjects (project)) { GtkDesignInfo info = GtkDesignInfo.FromProject (project); info.GenerateGettext = checkGettext.Active; info.GettextClass = entryGettext.Text; info.GuiBuilderProject.SteticProject.TargetGtkVersion = comboVersions.ActiveText; info.SteticFolderName = entryFolderName.Text; info.HideGtkxFiles = checkHideFiles.Active; info.GuiBuilderProject.Save (false); } refmgr.Dispose (); }