Beispiel #1
0
		public CSharpProject(MSBuildBasedProject project)
		{
			this.IProject = project;
			
			CompilerSettings.AllowUnsafeBlocks = GetBoolProperty("AllowUnsafeBlocks") ?? false;
			CompilerSettings.CheckForOverflow = GetBoolProperty("CheckForOverflowUnderflow") ?? false;
			string defineConstants = project.GetEvaluatedProperty("DefineConstants");
			foreach (string symbol in defineConstants.Split(new char[] { ';', ',' }, StringSplitOptions.RemoveEmptyEntries))
				this.CompilerSettings.ConditionalSymbols.Add(symbol.Trim());
			
			// Parse the C# code files
			foreach (var item in project.GetItemsOfType(ItemType.Compile)) {
				var file = new CSharpFile(this, FileName.Create(item.FileName));
				Files.Add(file);
			}
		}