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
- XamlUtilities.cs
- HitTestParameters3D.cs
- VirtualPathUtility.cs
- ParameterReplacerVisitor.cs
- AncestorChangedEventArgs.cs
- FileReader.cs
- TraceContextEventArgs.cs
- ButtonBase.cs
- XsltException.cs
- QuotedPrintableStream.cs
- IriParsingElement.cs
- BitmapEffectDrawingContent.cs
- ObjectReferenceStack.cs
- BuildProvidersCompiler.cs
- SaveFileDialog.cs
- GridViewPageEventArgs.cs
- InputScopeConverter.cs
- NavigationWindow.cs
- DllNotFoundException.cs
- TreeViewImageIndexConverter.cs
- WsdlBuildProvider.cs
- Symbol.cs
- DesignTable.cs
- DateRangeEvent.cs
- ConstraintCollection.cs
- SecurityVerifiedMessage.cs
- ResizingMessageFilter.cs
- DefaultPropertyAttribute.cs
- bidPrivateBase.cs
- BaseAppDomainProtocolHandler.cs
- CorrelationValidator.cs
- EventSourceCreationData.cs
- IOException.cs
- TextProperties.cs
- RectIndependentAnimationStorage.cs
- HandleCollector.cs
- NativeMethods.cs
- CodeGroup.cs
- DynamicControl.cs
- XAMLParseException.cs
- SponsorHelper.cs
- WmiEventSink.cs
- ResourceWriter.cs
- EventLogTraceListener.cs
- TemplateColumn.cs
- XmlDataSourceNodeDescriptor.cs
- GCHandleCookieTable.cs
- XmlExpressionDumper.cs
- ToolStripDropDownClosingEventArgs.cs
- XPathAncestorQuery.cs
- HttpModuleAction.cs
- CodeAssignStatement.cs
- DocumentXmlWriter.cs
- GenericEnumerator.cs
- SettingsPropertyIsReadOnlyException.cs
- TraceContextEventArgs.cs
- SafeBitVector32.cs
- LayoutInformation.cs
- MasterPageCodeDomTreeGenerator.cs
- DialogDivider.cs
- Schema.cs
- MessageSmuggler.cs
- WizardSideBarListControlItemEventArgs.cs
- WebPartCloseVerb.cs
- BulletDecorator.cs
- PassportAuthenticationEventArgs.cs
- HelpInfo.cs
- LayoutEditorPart.cs
- DbModificationClause.cs
- TrackingCondition.cs
- WebReferencesBuildProvider.cs
- Keywords.cs
- TextLine.cs
- ProgressBarBrushConverter.cs
- DomNameTable.cs
- SchemaEntity.cs
- WebPartConnectionsCancelVerb.cs
- ProjectionCamera.cs
- SendKeys.cs
- HtmlInputImage.cs
- RayMeshGeometry3DHitTestResult.cs
- WindowsRegion.cs
- SettingsPropertyIsReadOnlyException.cs
- CriticalFinalizerObject.cs
- AsyncOperationContext.cs
- EnumerableRowCollectionExtensions.cs
- PrinterSettings.cs
- RpcAsyncResult.cs
- Table.cs
- SecurityElement.cs
- remotingproxy.cs
- SqlFacetAttribute.cs
- BasicSecurityProfileVersion.cs
- HtmlSelect.cs
- XmlParser.cs
- TargetControlTypeAttribute.cs
- ContentDisposition.cs
- TrackingProfileSerializer.cs
- VoiceChangeEventArgs.cs
- XdrBuilder.cs