Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / GcSettings.cs / 1305376 / GcSettings.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Runtime { using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Security.Permissions; using System.Diagnostics.Contracts; // 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 { [System.Security.SecuritySafeCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.GetGCLatencyMode()); } // We don't want to allow this API when hosted. [System.Security.SecurityCritical] // auto-generated_required [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } Contract.EndContractBlock(); GC.SetGCLatencyMode((int)value); } } public static bool IsServerGC { [System.Security.SecuritySafeCritical] // auto-generated get { return GC.IsServerGC(); } } } } // 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; using System.Diagnostics.Contracts; // 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 { [System.Security.SecuritySafeCritical] // auto-generated [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.GetGCLatencyMode()); } // We don't want to allow this API when hosted. [System.Security.SecurityCritical] // auto-generated_required [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } Contract.EndContractBlock(); GC.SetGCLatencyMode((int)value); } } public static bool IsServerGC { [System.Security.SecuritySafeCritical] // auto-generated get { return GC.IsServerGC(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolBar.cs
- DataGridHelper.cs
- ColumnMap.cs
- AutomationEvent.cs
- RelativeSource.cs
- SchemaTableOptionalColumn.cs
- AvTrace.cs
- WebBrowserContainer.cs
- SharedStatics.cs
- NavigationWindowAutomationPeer.cs
- SpecularMaterial.cs
- HighlightComponent.cs
- FixUp.cs
- DesignerSelectionListAdapter.cs
- IteratorAsyncResult.cs
- InheritanceAttribute.cs
- PkcsUtils.cs
- ListControl.cs
- FrameworkElement.cs
- NameValuePermission.cs
- DispatchWrapper.cs
- VerticalConnector.xaml.cs
- OdbcError.cs
- baseaxisquery.cs
- CodeCompiler.cs
- SafeMILHandleMemoryPressure.cs
- ObjectDesignerDataSourceView.cs
- ServiceModelSecurityTokenRequirement.cs
- DesignerAutoFormat.cs
- ISFClipboardData.cs
- PageVisual.cs
- SystemColorTracker.cs
- PointF.cs
- CharacterBuffer.cs
- ApplicationServiceHelper.cs
- TextUtf8RawTextWriter.cs
- IISUnsafeMethods.cs
- AddInAttribute.cs
- MissingMethodException.cs
- DependencyPropertyAttribute.cs
- CodeTypeMemberCollection.cs
- BooleanFunctions.cs
- ExpressionBuilderCollection.cs
- AsymmetricSignatureDeformatter.cs
- CFStream.cs
- MobileErrorInfo.cs
- XamlTypeMapperSchemaContext.cs
- XmlILConstructAnalyzer.cs
- DataGridViewLinkCell.cs
- IdnElement.cs
- BinaryFormatterWriter.cs
- TdsParserStateObject.cs
- OleDbInfoMessageEvent.cs
- Model3D.cs
- ObjectIDGenerator.cs
- ProxyManager.cs
- PriorityBinding.cs
- TextServicesManager.cs
- XPathCompileException.cs
- XpsFont.cs
- PointLightBase.cs
- PageContentCollection.cs
- Pen.cs
- SplashScreenNativeMethods.cs
- FontSizeConverter.cs
- HttpProcessUtility.cs
- CopyAttributesAction.cs
- OdbcDataAdapter.cs
- LookupBindingPropertiesAttribute.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- CompleteWizardStep.cs
- shaperfactoryquerycacheentry.cs
- XmlIncludeAttribute.cs
- BuildProviderInstallComponent.cs
- Journal.cs
- TabControlEvent.cs
- MediaContextNotificationWindow.cs
- WebPartDisplayModeCollection.cs
- LinqDataSourceValidationException.cs
- Constants.cs
- XmlILTrace.cs
- TypeGeneratedEventArgs.cs
- FlowLayoutSettings.cs
- Encoder.cs
- PublisherIdentityPermission.cs
- PocoPropertyAccessorStrategy.cs
- XmlWrappingReader.cs
- RenderData.cs
- Point3D.cs
- AssemblyAttributesGoHere.cs
- SqlGatherProducedAliases.cs
- SqlInternalConnection.cs
- StringStorage.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XsltException.cs
- TextParagraphCache.cs
- HeaderedItemsControl.cs
- ModelPropertyCollectionImpl.cs
- AppDomain.cs
- CodeNamespace.cs