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
- ScriptManagerProxy.cs
- CustomValidator.cs
- IsolatedStorageFileStream.cs
- PanelDesigner.cs
- Accessors.cs
- Calendar.cs
- BaseUriHelper.cs
- IISUnsafeMethods.cs
- CryptoConfig.cs
- Number.cs
- ToolStripSettings.cs
- SqlCharStream.cs
- HttpException.cs
- WsatConfiguration.cs
- DesignTimeHTMLTextWriter.cs
- ShutDownListener.cs
- smtppermission.cs
- QueryStringParameter.cs
- MarkupCompiler.cs
- InvokeHandlers.cs
- AuthenticationConfig.cs
- RegistryConfigurationProvider.cs
- ContextDataSourceView.cs
- NonSerializedAttribute.cs
- XmlSiteMapProvider.cs
- log.cs
- FloaterParaClient.cs
- CombinedGeometry.cs
- Expression.DebuggerProxy.cs
- TextRunProperties.cs
- MeasureData.cs
- SelectionPattern.cs
- DynamicResourceExtension.cs
- ToolBarOverflowPanel.cs
- BindingsCollection.cs
- CreateUserWizardDesigner.cs
- AtomServiceDocumentSerializer.cs
- TreeView.cs
- KeyFrames.cs
- Point3DValueSerializer.cs
- EventWaitHandle.cs
- RegexMatchCollection.cs
- AliasExpr.cs
- ChannelProtectionRequirements.cs
- EventMappingSettingsCollection.cs
- TransformedBitmap.cs
- XmlExpressionDumper.cs
- FillRuleValidation.cs
- AttachedPropertyInfo.cs
- UInt16.cs
- WmfPlaceableFileHeader.cs
- SwitchElementsCollection.cs
- PointConverter.cs
- UIElementParaClient.cs
- ToolStripProgressBar.cs
- OverflowException.cs
- _Win32.cs
- transactioncontext.cs
- FontEmbeddingManager.cs
- CoTaskMemSafeHandle.cs
- XmlNamespaceDeclarationsAttribute.cs
- SectionUpdates.cs
- CodeAttachEventStatement.cs
- RectIndependentAnimationStorage.cs
- InvalidOleVariantTypeException.cs
- RequestCachePolicy.cs
- ClusterRegistryConfigurationProvider.cs
- HtmlInputPassword.cs
- CacheEntry.cs
- EntityContainer.cs
- EventSinkHelperWriter.cs
- LogAppendAsyncResult.cs
- DefaultValidator.cs
- EditorZoneDesigner.cs
- TextEmbeddedObject.cs
- AllowedAudienceUriElement.cs
- PreviewControlDesigner.cs
- Trustee.cs
- AuthorizationPolicyTypeElement.cs
- ModifiableIteratorCollection.cs
- COM2PictureConverter.cs
- KeyValuePair.cs
- XmlSchemaExternal.cs
- XmlObjectSerializerWriteContext.cs
- MarkupCompiler.cs
- DigitShape.cs
- VisualStyleInformation.cs
- TextParagraph.cs
- TokenBasedSetEnumerator.cs
- Identifier.cs
- TraceContextRecord.cs
- DescriptionAttribute.cs
- ContentIterators.cs
- SchemaCompiler.cs
- InlineObject.cs
- Attributes.cs
- FamilyTypefaceCollection.cs
- MessageBox.cs
- MetadataArtifactLoaderCompositeFile.cs
- Int64Storage.cs