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
- EntityDataSourceDesignerHelper.cs
- NumericPagerField.cs
- PublisherIdentityPermission.cs
- CapabilitiesUse.cs
- CompilationLock.cs
- _OverlappedAsyncResult.cs
- CancellationHandlerDesigner.cs
- RightsManagementLicense.cs
- SchemaMerger.cs
- SubMenuStyle.cs
- DataTransferEventArgs.cs
- MaterialGroup.cs
- RegexNode.cs
- LinearGradientBrush.cs
- RemotingAttributes.cs
- UnauthorizedWebPart.cs
- AutomationTextAttribute.cs
- PropertyEmitterBase.cs
- PeerTransportBindingElement.cs
- LineVisual.cs
- TableDetailsRow.cs
- TextServicesHost.cs
- ValidationEventArgs.cs
- TextBox.cs
- RelationshipDetailsRow.cs
- EventLogConfiguration.cs
- StrokeSerializer.cs
- UnitySerializationHolder.cs
- LinkConverter.cs
- ArglessEventHandlerProxy.cs
- QuaternionRotation3D.cs
- PropertyItem.cs
- InvalidProgramException.cs
- ToolStripHighContrastRenderer.cs
- TransactionInterop.cs
- SystemNetHelpers.cs
- StrongNameIdentityPermission.cs
- SuppressIldasmAttribute.cs
- SymbolDocumentInfo.cs
- StylusSystemGestureEventArgs.cs
- ErrorActivity.cs
- ApplyHostConfigurationBehavior.cs
- IisTraceWebEventProvider.cs
- TreeNodeBindingCollection.cs
- EntityDataSourceContainerNameConverter.cs
- HttpModuleAction.cs
- MessagePropertyFilter.cs
- BindingExpressionBase.cs
- CodeCompileUnit.cs
- BinaryExpression.cs
- EtwTrace.cs
- ToolStripGripRenderEventArgs.cs
- PersonalizableTypeEntry.cs
- Mapping.cs
- lengthconverter.cs
- NegotiateStream.cs
- Rect3DConverter.cs
- dataprotectionpermission.cs
- EmptyQuery.cs
- DrawingGroup.cs
- OleDbSchemaGuid.cs
- XmlQualifiedNameTest.cs
- WpfGeneratedKnownTypes.cs
- RoleService.cs
- SoapHeaderAttribute.cs
- ComNativeDescriptor.cs
- XmlWhitespace.cs
- sitestring.cs
- Visual3D.cs
- Random.cs
- RegionData.cs
- securitycriticaldata.cs
- Preprocessor.cs
- SystemIcmpV4Statistics.cs
- FilterableAttribute.cs
- Funcletizer.cs
- ExpressionDumper.cs
- ApplicationServicesHostFactory.cs
- DefaultProxySection.cs
- Win32Exception.cs
- ExpressionEditorSheet.cs
- GenericPrincipal.cs
- AssemblySettingAttributes.cs
- StateMachineAction.cs
- ContentIterators.cs
- RenameRuleObjectDialog.Designer.cs
- Token.cs
- ObjectSet.cs
- FormConverter.cs
- RuleSettings.cs
- PropertyEmitterBase.cs
- TreeNodeEventArgs.cs
- StateRuntime.cs
- PointAnimationUsingPath.cs
- MetadataArtifactLoaderResource.cs
- TrackingDataItem.cs
- AsymmetricKeyExchangeDeformatter.cs
- AsyncResult.cs
- IOThreadScheduler.cs
- BinaryNode.cs