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
- AutomationPatternInfo.cs
- DataSourceCollectionBase.cs
- XPathDocumentNavigator.cs
- EditorZone.cs
- IProvider.cs
- DispatcherExceptionFilterEventArgs.cs
- safex509handles.cs
- keycontainerpermission.cs
- FunctionUpdateCommand.cs
- TextFindEngine.cs
- EventSinkActivity.cs
- ObjectPropertyMapping.cs
- XomlCompilerError.cs
- NativeMethods.cs
- CopyAttributesAction.cs
- DataGridColumnHeaderAutomationPeer.cs
- PointAnimationClockResource.cs
- ACE.cs
- DoubleConverter.cs
- FontStretchConverter.cs
- XmlSortKey.cs
- AttributeProviderAttribute.cs
- ReferenceEqualityComparer.cs
- SqlUdtInfo.cs
- WebPartZoneCollection.cs
- ACE.cs
- InnerItemCollectionView.cs
- _HelperAsyncResults.cs
- CompressionTransform.cs
- SamlNameIdentifierClaimResource.cs
- TextElementCollection.cs
- TextElementCollection.cs
- CertificateManager.cs
- ClientOperation.cs
- ClonableStack.cs
- SafeEventLogWriteHandle.cs
- CodeTypeConstructor.cs
- FixedSOMLineCollection.cs
- DragDeltaEventArgs.cs
- AuthenticatedStream.cs
- StrongNameIdentityPermission.cs
- HyperLinkField.cs
- SingleAnimation.cs
- BoolExpressionVisitors.cs
- CompleteWizardStep.cs
- ReadOnlyObservableCollection.cs
- OracleRowUpdatingEventArgs.cs
- WindowsListViewGroup.cs
- OleDbConnectionInternal.cs
- BuildDependencySet.cs
- WorkflowApplicationEventArgs.cs
- SynchronousChannelMergeEnumerator.cs
- WebBrowsableAttribute.cs
- UriSection.cs
- ChtmlTextWriter.cs
- BooleanProjectedSlot.cs
- ContainerUtilities.cs
- OLEDB_Enum.cs
- RectIndependentAnimationStorage.cs
- AssemblyBuilder.cs
- FileLogRecordEnumerator.cs
- DataObject.cs
- StylusEventArgs.cs
- CreationContext.cs
- CheckBoxField.cs
- TextServicesProperty.cs
- TreeNodeClickEventArgs.cs
- InfoCardHelper.cs
- DataObject.cs
- ValidationError.cs
- processwaithandle.cs
- KeyMatchBuilder.cs
- Token.cs
- ObjectResult.cs
- SqlTypeSystemProvider.cs
- CompilationSection.cs
- DataGridViewBand.cs
- SqlIdentifier.cs
- URIFormatException.cs
- COM2Properties.cs
- CompositeTypefaceMetrics.cs
- ClientApiGenerator.cs
- PropagatorResult.cs
- SupportingTokenDuplexChannel.cs
- HttpDictionary.cs
- MediaPlayerState.cs
- PropertyPath.cs
- TagPrefixCollection.cs
- SqlSelectStatement.cs
- ReservationNotFoundException.cs
- DefaultObjectMappingItemCollection.cs
- Compilation.cs
- NonParentingControl.cs
- MissingManifestResourceException.cs
- SafeCoTaskMem.cs
- HttpCapabilitiesEvaluator.cs
- ValidationErrorCollection.cs
- MimeXmlReflector.cs
- Visual3D.cs
- VisualStates.cs