Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Runtime / GcSettings.cs / 1 / GcSettings.cs
namespace System.Runtime { using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Security.Permissions; // This is the same format as in clr\src\vm\gcpriv.h // make sure you change that one if you change this one! [Serializable] public enum GCLatencyMode { Batch = 0, Interactive = 1, LowLatency = 2 } public static class GCSettings { public static GCLatencyMode LatencyMode { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.nativeGetGCLatencyMode()); } // We don't want to allow this API when hosted. [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } GC.nativeSetGCLatencyMode((int)value); } } public static bool IsServerGC { get { return GC.nativeIsServerGC(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Runtime { using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Security.Permissions; // This is the same format as in clr\src\vm\gcpriv.h // make sure you change that one if you change this one! [Serializable] public enum GCLatencyMode { Batch = 0, Interactive = 1, LowLatency = 2 } public static class GCSettings { public static GCLatencyMode LatencyMode { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.nativeGetGCLatencyMode()); } // We don't want to allow this API when hosted. [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } GC.nativeSetGCLatencyMode((int)value); } } public static bool IsServerGC { get { return GC.nativeIsServerGC(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputReport.cs
- RemotingConfiguration.cs
- ObjectResult.cs
- XmlArrayItemAttribute.cs
- ListChangedEventArgs.cs
- SqlTriggerAttribute.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- AbstractDataSvcMapFileLoader.cs
- WindowsToolbarItemAsMenuItem.cs
- Enum.cs
- CommandManager.cs
- HtmlButton.cs
- DataObjectCopyingEventArgs.cs
- MDIControlStrip.cs
- ReplacementText.cs
- SchemaNames.cs
- baseaxisquery.cs
- RemotingException.cs
- SqlDataSourceCache.cs
- ColumnTypeConverter.cs
- PreDigestedSignedInfo.cs
- ToggleProviderWrapper.cs
- DiscoveryClientDocuments.cs
- XmlSortKeyAccumulator.cs
- IProvider.cs
- WsatTransactionHeader.cs
- IArgumentProvider.cs
- RightsManagementLicense.cs
- DbException.cs
- PackagingUtilities.cs
- Slider.cs
- ListDataBindEventArgs.cs
- CustomSignedXml.cs
- HMAC.cs
- RefType.cs
- sortedlist.cs
- Converter.cs
- Brush.cs
- TableDetailsRow.cs
- DataGridViewCheckBoxColumn.cs
- Renderer.cs
- AppDomainProtocolHandler.cs
- UpdateTracker.cs
- complextypematerializer.cs
- EditingScopeUndoUnit.cs
- querybuilder.cs
- objectquery_tresulttype.cs
- TextElementCollection.cs
- StringFunctions.cs
- TextBoxDesigner.cs
- UpDownBase.cs
- ElementFactory.cs
- FileSystemInfo.cs
- RoutedEvent.cs
- Pens.cs
- Menu.cs
- XmlSchemaElement.cs
- CompiledRegexRunnerFactory.cs
- SessionMode.cs
- XmlObjectSerializerWriteContext.cs
- MetadataCollection.cs
- FigureHelper.cs
- FilterQuery.cs
- ExpanderAutomationPeer.cs
- RegistryKey.cs
- SEHException.cs
- Animatable.cs
- TypefaceMetricsCache.cs
- TextStore.cs
- CreateParams.cs
- SetterBaseCollection.cs
- Misc.cs
- QueryExpression.cs
- Header.cs
- SqlProviderServices.cs
- TransformedBitmap.cs
- WarningException.cs
- MessageContractImporter.cs
- UnhandledExceptionEventArgs.cs
- FormsAuthenticationEventArgs.cs
- ProcessProtocolHandler.cs
- CodeVariableReferenceExpression.cs
- WhitespaceSignificantCollectionAttribute.cs
- PrintPreviewControl.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- BCryptNative.cs
- GroupStyle.cs
- DatatypeImplementation.cs
- _DisconnectOverlappedAsyncResult.cs
- ProcessHostServerConfig.cs
- FileUtil.cs
- RegularExpressionValidator.cs
- HttpServerUtilityWrapper.cs
- ReadWriteObjectLock.cs
- TCPClient.cs
- TreeNode.cs
- SafeLibraryHandle.cs
- PartialTrustVisibleAssembliesSection.cs
- OleDbPropertySetGuid.cs
- TreeNodeCollection.cs