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
- BlockUIContainer.cs
- StoreAnnotationsMap.cs
- SystemResourceHost.cs
- HttpHandlerAction.cs
- EntityDataSourceWrapper.cs
- PerformanceCountersElement.cs
- Perspective.cs
- AssemblyBuilder.cs
- InstanceDataCollection.cs
- IOException.cs
- FrameworkContentElementAutomationPeer.cs
- _SSPISessionCache.cs
- DesignerGeometryHelper.cs
- LicenseContext.cs
- ContentControl.cs
- MsiStyleLogWriter.cs
- AnnouncementDispatcherAsyncResult.cs
- TcpSocketManager.cs
- Method.cs
- GeometryConverter.cs
- HealthMonitoringSectionHelper.cs
- HostedImpersonationContext.cs
- InputScopeAttribute.cs
- GridItemCollection.cs
- FormattedTextSymbols.cs
- PropertyTab.cs
- BaseContextMenu.cs
- AbsoluteQuery.cs
- JoinCqlBlock.cs
- CreateUserWizardStep.cs
- HostingEnvironmentSection.cs
- XmlnsCompatibleWithAttribute.cs
- BitmapMetadataEnumerator.cs
- ScrollViewerAutomationPeer.cs
- SqlServer2KCompatibilityAnnotation.cs
- XamlSerializerUtil.cs
- SemanticBasicElement.cs
- ImageSource.cs
- AsmxEndpointPickerExtension.cs
- OdbcConnectionFactory.cs
- EntityDataSourceView.cs
- BindStream.cs
- Timer.cs
- DescendantQuery.cs
- SingleAnimationUsingKeyFrames.cs
- RemotingConfiguration.cs
- WindowsListViewSubItem.cs
- InputBinding.cs
- AppDomainShutdownMonitor.cs
- PathSegment.cs
- ObjectQueryExecutionPlan.cs
- JournalEntryStack.cs
- RecordManager.cs
- TextFormatterHost.cs
- JsonFormatReaderGenerator.cs
- KnowledgeBase.cs
- StateWorkerRequest.cs
- nulltextnavigator.cs
- WindowsBrush.cs
- StructuralCache.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- OleDbFactory.cs
- DecimalAnimationBase.cs
- TextPenaltyModule.cs
- RC2CryptoServiceProvider.cs
- Guid.cs
- EmptyEnumerable.cs
- MessageQueueAccessControlEntry.cs
- SqlReorderer.cs
- IdnMapping.cs
- DrawingAttributesDefaultValueFactory.cs
- TextTreeRootTextBlock.cs
- ProfileInfo.cs
- WebBrowserProgressChangedEventHandler.cs
- SafeFindHandle.cs
- KnownTypesHelper.cs
- CodeAttributeDeclaration.cs
- EmptyEnumerable.cs
- GenericEnumConverter.cs
- AvtEvent.cs
- SqlMethodCallConverter.cs
- ScriptResourceHandler.cs
- DoubleKeyFrameCollection.cs
- DayRenderEvent.cs
- DtrList.cs
- PixelFormat.cs
- WebBrowserBase.cs
- InputLanguageManager.cs
- MediaElementAutomationPeer.cs
- WindowsSysHeader.cs
- ReverseInheritProperty.cs
- CounterCreationData.cs
- MailDefinition.cs
- TransformerTypeCollection.cs
- ConfigurationValidatorBase.cs
- CapabilitiesPattern.cs
- XmlWellformedWriterHelpers.cs
- HideDisabledControlAdapter.cs
- ListViewDeleteEventArgs.cs
- DataRecordObjectView.cs