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
- Identity.cs
- WebServicesSection.cs
- parserscommon.cs
- LifetimeServices.cs
- Parser.cs
- Utils.cs
- DataObject.cs
- DataGridViewCellParsingEventArgs.cs
- PathGeometry.cs
- SystemIPGlobalProperties.cs
- Monitor.cs
- UnhandledExceptionEventArgs.cs
- PropertyDescriptorCollection.cs
- ToolboxDataAttribute.cs
- ObsoleteAttribute.cs
- SchemaTypeEmitter.cs
- ResourceSet.cs
- SafeMarshalContext.cs
- FileSystemWatcher.cs
- DynamicEndpointElement.cs
- CqlWriter.cs
- SettingsPropertyIsReadOnlyException.cs
- DoubleIndependentAnimationStorage.cs
- LineSegment.cs
- Helpers.cs
- BlockUIContainer.cs
- PenLineCapValidation.cs
- PlaceHolder.cs
- ColorTranslator.cs
- EnumUnknown.cs
- EnumerableRowCollectionExtensions.cs
- Empty.cs
- OrderPreservingSpoolingTask.cs
- SystemIPGlobalStatistics.cs
- BindingsCollection.cs
- InfoCardCryptoHelper.cs
- SchemaCompiler.cs
- ServiceProviders.cs
- WorkItem.cs
- UnionCodeGroup.cs
- OleDbDataReader.cs
- SoapHelper.cs
- CopyOnWriteList.cs
- CompositeFontParser.cs
- ControlBindingsCollection.cs
- Update.cs
- Brush.cs
- OracleConnectionFactory.cs
- SqlDeflator.cs
- InvokePatternIdentifiers.cs
- StorageModelBuildProvider.cs
- SpotLight.cs
- TreeNodeEventArgs.cs
- CustomError.cs
- PropertyValueUIItem.cs
- MSG.cs
- PageEventArgs.cs
- EntityDataReader.cs
- LogPolicy.cs
- Type.cs
- EFTableProvider.cs
- ToolStripControlHost.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ResourcesBuildProvider.cs
- FixUpCollection.cs
- SqlMultiplexer.cs
- OpacityConverter.cs
- StringInfo.cs
- DependencyPropertyConverter.cs
- ShutDownListener.cs
- QilValidationVisitor.cs
- Misc.cs
- InputLanguage.cs
- ToolTip.cs
- DbInsertCommandTree.cs
- FlowDocumentPage.cs
- InstancePersistenceException.cs
- ImportException.cs
- EventWaitHandle.cs
- Point3DKeyFrameCollection.cs
- DialogResultConverter.cs
- IfElseDesigner.xaml.cs
- TimeSpan.cs
- AppDomain.cs
- httpserverutility.cs
- FormsAuthenticationEventArgs.cs
- LassoHelper.cs
- ServiceDescriptionSerializer.cs
- DateTimeConverter.cs
- DetailsViewCommandEventArgs.cs
- XMLUtil.cs
- _SingleItemRequestCache.cs
- LabelLiteral.cs
- ArrayList.cs
- PkcsMisc.cs
- MemberMaps.cs
- TiffBitmapDecoder.cs
- IPAddressCollection.cs
- TextParaLineResult.cs
- DataTableMapping.cs