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
- QilTypeChecker.cs
- controlskin.cs
- QueryContinueDragEventArgs.cs
- SocketPermission.cs
- ProviderSettingsCollection.cs
- DefaultSection.cs
- Column.cs
- ParserStreamGeometryContext.cs
- RuleAction.cs
- BrushMappingModeValidation.cs
- Configuration.cs
- ZoomPercentageConverter.cs
- TdsEnums.cs
- DrawingGroup.cs
- EncodingTable.cs
- BinaryExpression.cs
- OdbcConnectionFactory.cs
- TextAdaptor.cs
- PartitionResolver.cs
- DataContractSet.cs
- CodeSnippetCompileUnit.cs
- ScriptManager.cs
- FixedSOMPageElement.cs
- XmlWriterSettings.cs
- Model3D.cs
- ObjectListDataBindEventArgs.cs
- ObjectTokenCategory.cs
- BufferModesCollection.cs
- BitmapData.cs
- BitmapCodecInfoInternal.cs
- SmtpAuthenticationManager.cs
- PathSegmentCollection.cs
- TextBounds.cs
- MorphHelper.cs
- EnlistmentState.cs
- WebReferencesBuildProvider.cs
- ImageInfo.cs
- RectangleGeometry.cs
- CancellationTokenSource.cs
- IncrementalHitTester.cs
- MsmqNonTransactedPoisonHandler.cs
- UniformGrid.cs
- nulltextnavigator.cs
- AttributedMetaModel.cs
- WebServiceClientProxyGenerator.cs
- ServiceBehaviorAttribute.cs
- DataSourceViewSchemaConverter.cs
- DesignerTextViewAdapter.cs
- XPathNodeList.cs
- InlinedAggregationOperator.cs
- ParsedAttributeCollection.cs
- AlternateView.cs
- DataGridSortCommandEventArgs.cs
- BuildProviderCollection.cs
- RTLAwareMessageBox.cs
- DecoderFallback.cs
- MDIControlStrip.cs
- OperatingSystem.cs
- HtmlEncodedRawTextWriter.cs
- AmbientProperties.cs
- ScriptResourceAttribute.cs
- ProxyOperationRuntime.cs
- PointConverter.cs
- DataServiceQueryException.cs
- LinearGradientBrush.cs
- XmlValueConverter.cs
- TemplatedWizardStep.cs
- Inline.cs
- GenericWebPart.cs
- UserPreferenceChangedEventArgs.cs
- TreeViewImageKeyConverter.cs
- DbModificationClause.cs
- BamlResourceContent.cs
- TypeLibConverter.cs
- WindowsClientCredential.cs
- CodeAssignStatement.cs
- ComboBoxHelper.cs
- HighlightOverlayGlyph.cs
- TableItemPattern.cs
- StateRuntime.cs
- ConfigUtil.cs
- XmlnsCompatibleWithAttribute.cs
- UMPAttributes.cs
- HighlightVisual.cs
- MailSettingsSection.cs
- HttpStreamMessage.cs
- ConstraintConverter.cs
- Padding.cs
- ApplicationSecurityInfo.cs
- IsolatedStorageException.cs
- BuildProvidersCompiler.cs
- SerializableAuthorizationContext.cs
- BrowsableAttribute.cs
- ObjectViewEntityCollectionData.cs
- ReceiveErrorHandling.cs
- SQLRoleProvider.cs
- BitmapSourceSafeMILHandle.cs
- Point.cs
- DeferredBinaryDeserializerExtension.cs
- MatrixTransform.cs