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
- XmlHelper.cs
- TextSelection.cs
- COSERVERINFO.cs
- XmlQueryStaticData.cs
- DataGridViewCheckBoxColumn.cs
- CustomErrorsSectionWrapper.cs
- PagedDataSource.cs
- EditorOptionAttribute.cs
- TypeForwardedToAttribute.cs
- SponsorHelper.cs
- DataGridViewAccessibleObject.cs
- WebPartZoneBase.cs
- XmlSerializer.cs
- DrawingContextDrawingContextWalker.cs
- RenderingEventArgs.cs
- PlatformCulture.cs
- HtmlContainerControl.cs
- Empty.cs
- COM2ColorConverter.cs
- ToolStripDropDownClosedEventArgs.cs
- Code.cs
- Models.cs
- HwndAppCommandInputProvider.cs
- CompilationRelaxations.cs
- ByteStorage.cs
- PeerMaintainer.cs
- IncrementalHitTester.cs
- ColumnProvider.cs
- Image.cs
- WebScriptMetadataFormatter.cs
- SqlGatherProducedAliases.cs
- XmlSerializerSection.cs
- ValidationHelper.cs
- IssuedTokenParametersElement.cs
- XmlSchemaExporter.cs
- PolicyException.cs
- SurrogateChar.cs
- sitestring.cs
- XmlSchemaResource.cs
- FixedTextSelectionProcessor.cs
- FileSecurity.cs
- ExpandableObjectConverter.cs
- NamespaceListProperty.cs
- ReliableMessagingHelpers.cs
- XPathSelfQuery.cs
- ChannelAcceptor.cs
- EventLogInternal.cs
- DeferredRunTextReference.cs
- ApplicationGesture.cs
- BindingGroup.cs
- MatrixValueSerializer.cs
- SqlWebEventProvider.cs
- UdpSocket.cs
- ManifestResourceInfo.cs
- XmlWriterTraceListener.cs
- FloaterBaseParaClient.cs
- RepeatBehavior.cs
- SBCSCodePageEncoding.cs
- TreeNodeSelectionProcessor.cs
- ObjectListFieldCollection.cs
- DataGridViewColumn.cs
- FixedSOMSemanticBox.cs
- FreezableOperations.cs
- ModuleBuilderData.cs
- ExpressionBuilder.cs
- AuthenticationServiceManager.cs
- XmlDataCollection.cs
- EventLogEntry.cs
- PenLineCapValidation.cs
- CatalogZoneDesigner.cs
- EraserBehavior.cs
- CodeTypeParameterCollection.cs
- WmlTextViewAdapter.cs
- ModuleBuilder.cs
- JapaneseCalendar.cs
- ColumnCollection.cs
- DataServiceConfiguration.cs
- WebPartActionVerb.cs
- SQLDateTime.cs
- SByte.cs
- WebResponse.cs
- XmlReflectionImporter.cs
- _NegoState.cs
- RightsManagementInformation.cs
- StreamAsIStream.cs
- MobileUITypeEditor.cs
- ClientSponsor.cs
- TagPrefixAttribute.cs
- Pkcs7Recipient.cs
- ResourceSet.cs
- WorkflowDesignerColors.cs
- BlockCollection.cs
- ClientScriptManager.cs
- XmlQueryCardinality.cs
- TextBox.cs
- CommunicationObjectFaultedException.cs
- safex509handles.cs
- GiveFeedbackEventArgs.cs
- HttpStreamXmlDictionaryWriter.cs
- User.cs