Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- PageContentAsyncResult.cs
- NegotiateStream.cs
- GeometryGroup.cs
- ListItemConverter.cs
- StreamWithDictionary.cs
- TableRow.cs
- DetailsViewUpdateEventArgs.cs
- AdornerLayer.cs
- Visual3D.cs
- HexParser.cs
- ServicePointManager.cs
- HyperLinkDataBindingHandler.cs
- Int16Converter.cs
- PropertyItem.cs
- IPAddress.cs
- CallbackValidatorAttribute.cs
- RegexCaptureCollection.cs
- TableCellCollection.cs
- WebPartConnectionsConfigureVerb.cs
- SafeSystemMetrics.cs
- UnsafeNativeMethodsCLR.cs
- HttpCapabilitiesEvaluator.cs
- ServiceNameElement.cs
- XmlSerializerVersionAttribute.cs
- ScriptReference.cs
- SafeNativeMethodsCLR.cs
- WindowHideOrCloseTracker.cs
- HtmlFormWrapper.cs
- DetailsViewDeletedEventArgs.cs
- CmsInterop.cs
- ContentValidator.cs
- bindurihelper.cs
- OperatorExpressions.cs
- HorizontalAlignConverter.cs
- FixUpCollection.cs
- Crc32.cs
- FactoryGenerator.cs
- ContextProperty.cs
- DTCTransactionManager.cs
- DbConnectionPoolGroup.cs
- ServiceBehaviorElement.cs
- TypographyProperties.cs
- NGCSerializationManager.cs
- TemplateXamlParser.cs
- RootNamespaceAttribute.cs
- ToolBarOverflowPanel.cs
- WebBrowserEvent.cs
- UIHelper.cs
- DocumentOrderQuery.cs
- CustomAttribute.cs
- Receive.cs
- GridViewSortEventArgs.cs
- BuildProviderUtils.cs
- ActivityCodeGenerator.cs
- CodePropertyReferenceExpression.cs
- StaticFileHandler.cs
- StaticSiteMapProvider.cs
- Exceptions.cs
- LoginNameDesigner.cs
- _ListenerResponseStream.cs
- FunctionGenerator.cs
- XmlSchemaCompilationSettings.cs
- SystemResourceHost.cs
- WithParamAction.cs
- SizeAnimation.cs
- TemplateNameScope.cs
- RenderingEventArgs.cs
- WebPartsPersonalization.cs
- StructuralCache.cs
- Int32Converter.cs
- TrackPoint.cs
- Int16AnimationUsingKeyFrames.cs
- ZipFileInfoCollection.cs
- NetworkCredential.cs
- CharacterString.cs
- CodeTypeConstructor.cs
- TemplatedAdorner.cs
- ProfessionalColors.cs
- XMLSyntaxException.cs
- HexParser.cs
- ConditionalAttribute.cs
- SubpageParagraph.cs
- WebUtil.cs
- StructuralComparisons.cs
- Qualifier.cs
- CancelEventArgs.cs
- FtpWebRequest.cs
- XmlSiteMapProvider.cs
- SetStateDesigner.cs
- WinEventHandler.cs
- Switch.cs
- PrtCap_Base.cs
- HtmlUtf8RawTextWriter.cs
- SqlGenericUtil.cs
- Grammar.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- RequestTimeoutManager.cs
- MatrixTransform.cs
- iisPickupDirectory.cs
- ColumnWidthChangingEvent.cs