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
- PathFigureCollection.cs
- CollectionChangedEventManager.cs
- TimelineCollection.cs
- DrawingGroupDrawingContext.cs
- GlyphRunDrawing.cs
- XslNumber.cs
- OrthographicCamera.cs
- MD5CryptoServiceProvider.cs
- SqlBinder.cs
- Image.cs
- Walker.cs
- ObjectManager.cs
- XmlSchemaObjectCollection.cs
- EdmRelationshipRoleAttribute.cs
- AutomationElement.cs
- ExecutionEngineException.cs
- DataControlButton.cs
- XmlSerializerNamespaces.cs
- ChainedAsyncResult.cs
- TextReturnReader.cs
- Convert.cs
- WebPartEditVerb.cs
- SafeRightsManagementHandle.cs
- RegistrationServices.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DataGridViewColumnConverter.cs
- NavigationExpr.cs
- HealthMonitoringSection.cs
- AddInActivator.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- ConfigXmlWhitespace.cs
- SqlParameterCollection.cs
- EncodingDataItem.cs
- ProfilePropertySettingsCollection.cs
- MultilineStringEditor.cs
- DocumentViewerAutomationPeer.cs
- EntityDesignerUtils.cs
- TextTrailingWordEllipsis.cs
- RawStylusInputCustomData.cs
- PartialTrustHelpers.cs
- ResourceWriter.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- RTLAwareMessageBox.cs
- TemplateControl.cs
- SchemaSetCompiler.cs
- CompressEmulationStream.cs
- NetMsmqSecurityMode.cs
- VersionedStreamOwner.cs
- CodeAccessSecurityEngine.cs
- XmlSchemaSimpleContent.cs
- SpecialTypeDataContract.cs
- DrawingBrush.cs
- FixedTextView.cs
- EtwTrace.cs
- DataKey.cs
- ColorDialog.cs
- ConvertTextFrag.cs
- UnmanagedMemoryStreamWrapper.cs
- DeadCharTextComposition.cs
- AssociationSetEnd.cs
- AssemblyUtil.cs
- FrameworkPropertyMetadata.cs
- FontNamesConverter.cs
- ResourcesBuildProvider.cs
- AsyncCompletedEventArgs.cs
- DependencyPropertyDescriptor.cs
- ListViewItemSelectionChangedEvent.cs
- BatchParser.cs
- SchemaSetCompiler.cs
- NodeLabelEditEvent.cs
- UriSection.cs
- GeometryDrawing.cs
- UInt32Storage.cs
- CustomErrorCollection.cs
- PrefixQName.cs
- FillRuleValidation.cs
- WebConfigurationHostFileChange.cs
- EncryptedKeyHashIdentifierClause.cs
- Image.cs
- AgileSafeNativeMemoryHandle.cs
- UInt64.cs
- ExpressionBindings.cs
- AlphabeticalEnumConverter.cs
- FormatException.cs
- BuildProviderAppliesToAttribute.cs
- DateTimeOffset.cs
- EdmProviderManifest.cs
- SelectionChangedEventArgs.cs
- SqlClientFactory.cs
- CompilerGeneratedAttribute.cs
- XmlSerializerAssemblyAttribute.cs
- LogLogRecordHeader.cs
- ToolBarButton.cs
- DefaultPerformanceCounters.cs
- securitycriticaldata.cs
- DeliveryStrategy.cs
- VScrollBar.cs
- DbConnectionFactory.cs
- TextRangeProviderWrapper.cs
- ModulesEntry.cs