PageRenderTime 86ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/Microsoft.Build/Microsoft.Build/Microsoft/Build/Execution/BuildParameters.cs

#
C# | 736 lines | 684 code | 52 blank | 0 comment | 30 complexity | a65c4dc93056a1dc3759d93bf1c47a9d MD5 | raw file
Possible License(s): Apache-2.0, LGPL-3.0
  1. namespace Microsoft.Build.Execution
  2. {
  3. using Microsoft.Build.BackEnd;
  4. using Microsoft.Build.Collections;
  5. using Microsoft.Build.Evaluation;
  6. using Microsoft.Build.Framework;
  7. using Microsoft.Build.Logging;
  8. using Microsoft.Build.Shared;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.Globalization;
  12. using System.IO;
  13. using System.Reflection;
  14. using System.Runtime;
  15. using System.Runtime.CompilerServices;
  16. using System.Threading;
  17. public class BuildParameters : INodePacketTranslatable
  18. {
  19. private int buildId;
  20. private ThreadPriority buildThreadPriority;
  21. private CultureInfo culture;
  22. private const int DefaultEndpointShutdownTimeout = 0x7530;
  23. private const int DefaultEngineShutdownTimeout = -1;
  24. private const int DefaultIdleRequestBuilderLimit = 10;
  25. private const int DefaultLoggingThreadShutdownTimeout = 0x7530;
  26. private const int DefaultNodeConnectionTimeout = 0xdbba0;
  27. private const int DefaultRequestBuilderShutdownTimeout = -1;
  28. private const int DefaultThreadStackSize = 0x40000;
  29. private string defaultToolsVersion;
  30. private bool detailedSummary;
  31. private bool enableNodeReuse;
  32. private PropertyDictionary<ProjectPropertyInstance> environmentProperties;
  33. private IEnumerable<ForwardingLoggerRecord> forwardingLoggers;
  34. private PropertyDictionary<ProjectPropertyInstance> globalProperties;
  35. private Microsoft.Build.Execution.HostServices hostServices;
  36. private IEnumerable<ILogger> loggers;
  37. private int maxNodeCount;
  38. private int memoryUseLimit;
  39. private string nodeExeLocation;
  40. private int nodeId;
  41. private bool onlyLogCriticalEvents;
  42. private bool saveOperatingEnvironment;
  43. private static string startupDirectory = NativeMethodsShared.GetCurrentDirectory();
  44. private Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations;
  45. private Microsoft.Build.Evaluation.ToolsetProvider toolsetProvider;
  46. private CultureInfo uiCulture;
  47. private bool useSynchronousLogging;
  48. public BuildParameters() : this(Utilities.GetEnvironmentProperties(), new Microsoft.Build.Evaluation.ProjectRootElementCache(false))
  49. {
  50. }
  51. private BuildParameters(INodePacketTranslator translator)
  52. {
  53. this.buildThreadPriority = ThreadPriority.Normal;
  54. this.culture = Thread.CurrentThread.CurrentCulture;
  55. this.defaultToolsVersion = "2.0";
  56. this.enableNodeReuse = true;
  57. this.environmentProperties = new PropertyDictionary<ProjectPropertyInstance>();
  58. this.globalProperties = new PropertyDictionary<ProjectPropertyInstance>();
  59. this.maxNodeCount = 1;
  60. this.toolsetDefinitionLocations = Microsoft.Build.Evaluation.ToolsetDefinitionLocations.Registry | Microsoft.Build.Evaluation.ToolsetDefinitionLocations.ConfigurationFile;
  61. this.uiCulture = Thread.CurrentThread.CurrentUICulture;
  62. this.saveOperatingEnvironment = true;
  63. ((INodePacketTranslatable) this).Translate(translator);
  64. }
  65. public BuildParameters(ProjectCollection projectCollection) : this(new PropertyDictionary<ProjectPropertyInstance>(projectCollection.EnvironmentProperties), projectCollection.ProjectRootElementCache)
  66. {
  67. ErrorUtilities.VerifyThrowArgumentNull(projectCollection, "projectCollection");
  68. this.maxNodeCount = projectCollection.MaxNodeCount;
  69. this.onlyLogCriticalEvents = projectCollection.OnlyLogCriticalEvents;
  70. this.toolsetDefinitionLocations = projectCollection.ToolsetLocations;
  71. this.defaultToolsVersion = projectCollection.DefaultToolsVersion;
  72. this.globalProperties = new PropertyDictionary<ProjectPropertyInstance>(projectCollection.GlobalPropertiesCollection);
  73. this.toolsetProvider = new Microsoft.Build.Evaluation.ToolsetProvider(projectCollection.Toolsets);
  74. }
  75. private BuildParameters(BuildParameters other)
  76. {
  77. this.buildThreadPriority = ThreadPriority.Normal;
  78. this.culture = Thread.CurrentThread.CurrentCulture;
  79. this.defaultToolsVersion = "2.0";
  80. this.enableNodeReuse = true;
  81. this.environmentProperties = new PropertyDictionary<ProjectPropertyInstance>();
  82. this.globalProperties = new PropertyDictionary<ProjectPropertyInstance>();
  83. this.maxNodeCount = 1;
  84. this.toolsetDefinitionLocations = Microsoft.Build.Evaluation.ToolsetDefinitionLocations.Registry | Microsoft.Build.Evaluation.ToolsetDefinitionLocations.ConfigurationFile;
  85. this.uiCulture = Thread.CurrentThread.CurrentUICulture;
  86. this.saveOperatingEnvironment = true;
  87. ErrorUtilities.VerifyThrowInternalNull(other, "other");
  88. this.buildId = other.buildId;
  89. this.culture = other.culture;
  90. this.defaultToolsVersion = other.defaultToolsVersion;
  91. this.enableNodeReuse = other.enableNodeReuse;
  92. this.environmentProperties = (other.environmentProperties != null) ? new PropertyDictionary<ProjectPropertyInstance>(other.environmentProperties) : null;
  93. this.forwardingLoggers = (other.forwardingLoggers != null) ? new List<ForwardingLoggerRecord>(other.forwardingLoggers) : null;
  94. this.globalProperties = (other.globalProperties != null) ? new PropertyDictionary<ProjectPropertyInstance>(other.globalProperties) : null;
  95. this.hostServices = other.hostServices;
  96. this.loggers = (other.loggers != null) ? new List<ILogger>(other.loggers) : null;
  97. this.maxNodeCount = other.maxNodeCount;
  98. this.memoryUseLimit = other.memoryUseLimit;
  99. this.nodeExeLocation = other.nodeExeLocation;
  100. this.nodeId = other.nodeId;
  101. this.onlyLogCriticalEvents = other.onlyLogCriticalEvents;
  102. this.buildThreadPriority = other.buildThreadPriority;
  103. this.toolsetProvider = other.toolsetProvider;
  104. this.toolsetDefinitionLocations = other.toolsetDefinitionLocations;
  105. this.toolsetProvider = other.toolsetProvider;
  106. this.uiCulture = other.uiCulture;
  107. this.detailedSummary = other.detailedSummary;
  108. this.ProjectRootElementCache = other.ProjectRootElementCache;
  109. this.ResetCaches = other.ResetCaches;
  110. this.LegacyThreadingSemantics = other.LegacyThreadingSemantics;
  111. this.saveOperatingEnvironment = other.saveOperatingEnvironment;
  112. this.useSynchronousLogging = other.useSynchronousLogging;
  113. }
  114. private BuildParameters(PropertyDictionary<ProjectPropertyInstance> environmentProperties, Microsoft.Build.Evaluation.ProjectRootElementCache projectRootElementCache)
  115. {
  116. this.buildThreadPriority = ThreadPriority.Normal;
  117. this.culture = Thread.CurrentThread.CurrentCulture;
  118. this.defaultToolsVersion = "2.0";
  119. this.enableNodeReuse = true;
  120. this.environmentProperties = new PropertyDictionary<ProjectPropertyInstance>();
  121. this.globalProperties = new PropertyDictionary<ProjectPropertyInstance>();
  122. this.maxNodeCount = 1;
  123. this.toolsetDefinitionLocations = Microsoft.Build.Evaluation.ToolsetDefinitionLocations.Registry | Microsoft.Build.Evaluation.ToolsetDefinitionLocations.ConfigurationFile;
  124. this.uiCulture = Thread.CurrentThread.CurrentUICulture;
  125. this.saveOperatingEnvironment = true;
  126. this.environmentProperties = environmentProperties;
  127. this.ProjectRootElementCache = projectRootElementCache;
  128. this.ResetCaches = true;
  129. if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1")
  130. {
  131. this.enableNodeReuse = false;
  132. }
  133. if (Environment.GetEnvironmentVariable("MSBUILDDETAILEDSUMMARY") == "1")
  134. {
  135. this.detailedSummary = true;
  136. }
  137. this.FindMSBuildExe();
  138. }
  139. public BuildParameters Clone()
  140. {
  141. return new BuildParameters(this);
  142. }
  143. private void EnsureToolsets()
  144. {
  145. if (this.toolsetProvider == null)
  146. {
  147. this.toolsetProvider = new Microsoft.Build.Evaluation.ToolsetProvider(this.DefaultToolsVersion, this.environmentProperties, this.globalProperties, this.ToolsetDefinitionLocations);
  148. }
  149. }
  150. internal static BuildParameters FactoryForDeserialization(INodePacketTranslator translator)
  151. {
  152. return new BuildParameters(translator);
  153. }
  154. private void FindMSBuildExe()
  155. {
  156. if ((this.nodeExeLocation == null) || !File.Exists(this.nodeExeLocation))
  157. {
  158. string environmentVariable = Environment.GetEnvironmentVariable("MSBUILD_EXE_PATH");
  159. if ((environmentVariable != null) && File.Exists(environmentVariable))
  160. {
  161. this.nodeExeLocation = environmentVariable;
  162. }
  163. else
  164. {
  165. environmentVariable = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "MSBuild.exe");
  166. if ((environmentVariable != null) && File.Exists(environmentVariable))
  167. {
  168. this.nodeExeLocation = environmentVariable;
  169. }
  170. else
  171. {
  172. foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
  173. {
  174. if (!assembly.IsDynamic)
  175. {
  176. try
  177. {
  178. environmentVariable = Path.GetDirectoryName(assembly.Location);
  179. }
  180. catch (Exception)
  181. {
  182. goto Label_00AD;
  183. }
  184. if (File.Exists(Path.Combine(environmentVariable, "MSBuild.exe")))
  185. {
  186. this.nodeExeLocation = Path.Combine(environmentVariable, "MSBuild.exe");
  187. return;
  188. }
  189. Label_00AD:;
  190. }
  191. }
  192. environmentVariable = FrameworkLocationHelper.PathToDotNetFrameworkV40;
  193. if ((environmentVariable != null) && File.Exists(Path.Combine(environmentVariable, "MSBuild.exe")))
  194. {
  195. this.nodeExeLocation = Path.Combine(environmentVariable, "MSBuild.exe");
  196. }
  197. }
  198. }
  199. }
  200. }
  201. private static int GetTimeoutVariableOrDefault(string environmentVariable, int defaultValue)
  202. {
  203. string str = Environment.GetEnvironmentVariable(environmentVariable);
  204. if (string.IsNullOrEmpty(str))
  205. {
  206. return defaultValue;
  207. }
  208. try
  209. {
  210. return Convert.ToInt32(str, CultureInfo.InvariantCulture);
  211. }
  212. catch (Exception exception)
  213. {
  214. if (ExceptionHandling.IsCriticalException(exception))
  215. {
  216. throw;
  217. }
  218. return defaultValue;
  219. }
  220. }
  221. public Toolset GetToolset(string toolsVersion)
  222. {
  223. this.EnsureToolsets();
  224. return this.toolsetProvider.GetToolset(toolsVersion);
  225. }
  226. void INodePacketTranslatable.Translate(INodePacketTranslator translator)
  227. {
  228. translator.Translate(ref this.buildId);
  229. translator.TranslateCulture(ref this.culture);
  230. translator.Translate(ref this.defaultToolsVersion);
  231. translator.Translate(ref this.enableNodeReuse);
  232. translator.TranslateProjectPropertyInstanceDictionary(ref this.environmentProperties);
  233. translator.TranslateProjectPropertyInstanceDictionary(ref this.globalProperties);
  234. translator.Translate(ref this.maxNodeCount);
  235. translator.Translate(ref this.memoryUseLimit);
  236. translator.Translate(ref this.nodeExeLocation);
  237. translator.Translate(ref this.onlyLogCriticalEvents);
  238. translator.Translate(ref startupDirectory);
  239. translator.TranslateCulture(ref this.uiCulture);
  240. translator.Translate<Microsoft.Build.Evaluation.ToolsetProvider>(ref this.toolsetProvider, new NodePacketValueFactory<Microsoft.Build.Evaluation.ToolsetProvider>(Microsoft.Build.Evaluation.ToolsetProvider.FactoryForDeserialization));
  241. translator.Translate(ref this.useSynchronousLogging);
  242. }
  243. internal System.AppDomainSetup AppDomainSetup
  244. {
  245. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  246. get
  247. {
  248. return this.<AppDomainSetup>k__BackingField;
  249. }
  250. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  251. set
  252. {
  253. this.<AppDomainSetup>k__BackingField = value;
  254. }
  255. }
  256. internal int BuildId
  257. {
  258. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  259. get
  260. {
  261. return this.buildId;
  262. }
  263. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  264. set
  265. {
  266. this.buildId = value;
  267. }
  268. }
  269. public ThreadPriority BuildThreadPriority
  270. {
  271. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  272. get
  273. {
  274. return this.buildThreadPriority;
  275. }
  276. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  277. set
  278. {
  279. this.buildThreadPriority = value;
  280. }
  281. }
  282. public CultureInfo Culture
  283. {
  284. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  285. get
  286. {
  287. return this.culture;
  288. }
  289. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  290. set
  291. {
  292. this.culture = value;
  293. }
  294. }
  295. public string DefaultToolsVersion
  296. {
  297. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  298. get
  299. {
  300. return this.defaultToolsVersion;
  301. }
  302. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  303. set
  304. {
  305. this.defaultToolsVersion = value;
  306. }
  307. }
  308. public bool DetailedSummary
  309. {
  310. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  311. get
  312. {
  313. return this.detailedSummary;
  314. }
  315. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  316. set
  317. {
  318. this.detailedSummary = value;
  319. }
  320. }
  321. public bool EnableNodeReuse
  322. {
  323. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  324. get
  325. {
  326. return this.enableNodeReuse;
  327. }
  328. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  329. set
  330. {
  331. this.enableNodeReuse = value;
  332. }
  333. }
  334. internal static int EndpointShutdownTimeout
  335. {
  336. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  337. get
  338. {
  339. return GetTimeoutVariableOrDefault("MSBUILDENDPOINTSHUTDOWNTIMEOUT", 0x7530);
  340. }
  341. }
  342. internal static int EngineShutdownTimeout
  343. {
  344. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  345. get
  346. {
  347. return GetTimeoutVariableOrDefault("MSBUILDENGINESHUTDOWNTIMEOUT", -1);
  348. }
  349. }
  350. public IDictionary<string, string> EnvironmentProperties
  351. {
  352. get
  353. {
  354. return new ReadOnlyConvertingDictionary<string, ProjectPropertyInstance, string>(this.environmentProperties, instance => ((IProperty) instance).EvaluatedValueEscaped);
  355. }
  356. }
  357. internal PropertyDictionary<ProjectPropertyInstance> EnvironmentPropertiesInternal
  358. {
  359. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  360. get
  361. {
  362. return this.environmentProperties;
  363. }
  364. set
  365. {
  366. ErrorUtilities.VerifyThrowInternalNull(value, "EnvironmentPropertiesInternal");
  367. this.environmentProperties = value;
  368. }
  369. }
  370. public IEnumerable<ForwardingLoggerRecord> ForwardingLoggers
  371. {
  372. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  373. get
  374. {
  375. return this.forwardingLoggers;
  376. }
  377. set
  378. {
  379. if (value != null)
  380. {
  381. foreach (ForwardingLoggerRecord record in value)
  382. {
  383. ErrorUtilities.VerifyThrowArgumentNull(record, "ForwardingLoggers", "NullLoggerNotAllowed");
  384. }
  385. }
  386. this.forwardingLoggers = value;
  387. }
  388. }
  389. public IDictionary<string, string> GlobalProperties
  390. {
  391. get
  392. {
  393. return new ReadOnlyConvertingDictionary<string, ProjectPropertyInstance, string>(this.globalProperties, instance => ((IProperty) instance).EvaluatedValueEscaped);
  394. }
  395. set
  396. {
  397. this.globalProperties = new PropertyDictionary<ProjectPropertyInstance>(value.Count);
  398. foreach (KeyValuePair<string, string> pair in value)
  399. {
  400. this.globalProperties[pair.Key] = new ProjectPropertyInstance(pair.Key, pair.Value);
  401. }
  402. }
  403. }
  404. internal PropertyDictionary<ProjectPropertyInstance> GlobalPropertiesInternal
  405. {
  406. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  407. get
  408. {
  409. return this.globalProperties;
  410. }
  411. }
  412. public Microsoft.Build.Execution.HostServices HostServices
  413. {
  414. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  415. get
  416. {
  417. return this.hostServices;
  418. }
  419. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  420. set
  421. {
  422. this.hostServices = value;
  423. }
  424. }
  425. internal static int IdleRequestBuilderLimit
  426. {
  427. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  428. get
  429. {
  430. return GetTimeoutVariableOrDefault("MSBUILDIDLEREQUESTBUILDERLIMIT", 10);
  431. }
  432. }
  433. internal bool IsOutOfProc
  434. {
  435. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  436. get
  437. {
  438. return this.<IsOutOfProc>k__BackingField;
  439. }
  440. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  441. set
  442. {
  443. this.<IsOutOfProc>k__BackingField = value;
  444. }
  445. }
  446. public bool LegacyThreadingSemantics
  447. {
  448. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  449. get
  450. {
  451. return this.<LegacyThreadingSemantics>k__BackingField;
  452. }
  453. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  454. set
  455. {
  456. this.<LegacyThreadingSemantics>k__BackingField = value;
  457. }
  458. }
  459. public IEnumerable<ILogger> Loggers
  460. {
  461. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  462. get
  463. {
  464. return this.loggers;
  465. }
  466. set
  467. {
  468. if (value != null)
  469. {
  470. foreach (ILogger logger in value)
  471. {
  472. ErrorUtilities.VerifyThrowArgumentNull(logger, "Loggers", "NullLoggerNotAllowed");
  473. }
  474. }
  475. this.loggers = value;
  476. }
  477. }
  478. internal static int LoggingThreadShutdownTimeout
  479. {
  480. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  481. get
  482. {
  483. return GetTimeoutVariableOrDefault("MSBUILDLOGGINGTHREADSHUTDOWNTIMEOUT", 0x7530);
  484. }
  485. }
  486. public int MaxNodeCount
  487. {
  488. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  489. get
  490. {
  491. return this.maxNodeCount;
  492. }
  493. set
  494. {
  495. ErrorUtilities.VerifyThrowArgument(value > 0, "InvalidMaxNodeCount");
  496. this.maxNodeCount = value;
  497. }
  498. }
  499. public int MemoryUseLimit
  500. {
  501. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  502. get
  503. {
  504. return this.memoryUseLimit;
  505. }
  506. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  507. set
  508. {
  509. this.memoryUseLimit = value;
  510. }
  511. }
  512. internal int MemoryUseLimitPerNode
  513. {
  514. get
  515. {
  516. return (this.MemoryUseLimit / this.MaxNodeCount);
  517. }
  518. }
  519. internal static int NodeConnectionTimeout
  520. {
  521. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  522. get
  523. {
  524. return GetTimeoutVariableOrDefault("MSBUILDNODECONNECTIONTIMEOUT", 0xdbba0);
  525. }
  526. }
  527. public string NodeExeLocation
  528. {
  529. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  530. get
  531. {
  532. return this.nodeExeLocation;
  533. }
  534. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  535. set
  536. {
  537. this.nodeExeLocation = value;
  538. }
  539. }
  540. internal int NodeId
  541. {
  542. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  543. get
  544. {
  545. return this.nodeId;
  546. }
  547. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  548. set
  549. {
  550. this.nodeId = value;
  551. }
  552. }
  553. public bool OnlyLogCriticalEvents
  554. {
  555. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  556. get
  557. {
  558. return this.onlyLogCriticalEvents;
  559. }
  560. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  561. set
  562. {
  563. this.onlyLogCriticalEvents = value;
  564. }
  565. }
  566. internal Microsoft.Build.Evaluation.ProjectRootElementCache ProjectRootElementCache
  567. {
  568. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  569. get
  570. {
  571. return this.<ProjectRootElementCache>k__BackingField;
  572. }
  573. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  574. set
  575. {
  576. this.<ProjectRootElementCache>k__BackingField = value;
  577. }
  578. }
  579. internal static int RequestBuilderShutdownTimeout
  580. {
  581. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  582. get
  583. {
  584. return GetTimeoutVariableOrDefault("MSBUILDREQUESTBUILDERSHUTDOWNTIMEOUT", -1);
  585. }
  586. }
  587. public bool ResetCaches
  588. {
  589. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  590. get
  591. {
  592. return this.<ResetCaches>k__BackingField;
  593. }
  594. [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  595. set
  596. {
  597. this.<ResetCaches>k__BackingField = value;
  598. }
  599. }
  600. public bool SaveOperatingEnvironment
  601. {
  602. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  603. get
  604. {
  605. return this.saveOperatingEnvironment;
  606. }
  607. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  608. set
  609. {
  610. this.saveOperatingEnvironment = value;
  611. }
  612. }
  613. internal static string StartupDirectory
  614. {
  615. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  616. get
  617. {
  618. return startupDirectory;
  619. }
  620. }
  621. internal static int ThreadStackSize
  622. {
  623. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  624. get
  625. {
  626. return GetTimeoutVariableOrDefault("MSBUILDTHREADSTACKSIZE", 0x40000);
  627. }
  628. }
  629. public Microsoft.Build.Evaluation.ToolsetDefinitionLocations ToolsetDefinitionLocations
  630. {
  631. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  632. get
  633. {
  634. return this.toolsetDefinitionLocations;
  635. }
  636. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  637. set
  638. {
  639. this.toolsetDefinitionLocations = value;
  640. }
  641. }
  642. internal IToolsetProvider ToolsetProvider
  643. {
  644. get
  645. {
  646. this.EnsureToolsets();
  647. return this.toolsetProvider;
  648. }
  649. }
  650. public ICollection<Toolset> Toolsets
  651. {
  652. get
  653. {
  654. return this.toolsetProvider.Toolsets;
  655. }
  656. }
  657. public CultureInfo UICulture
  658. {
  659. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  660. get
  661. {
  662. return this.uiCulture;
  663. }
  664. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  665. set
  666. {
  667. this.uiCulture = value;
  668. }
  669. }
  670. public bool UseSynchronousLogging
  671. {
  672. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  673. get
  674. {
  675. return this.useSynchronousLogging;
  676. }
  677. [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
  678. set
  679. {
  680. this.useSynchronousLogging = value;
  681. }
  682. }
  683. }
  684. }