Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Runtime / GcSettings.cs / 1 / GcSettings.cs
namespace System.Runtime { using System; using System.Runtime.CompilerServices; using System.Runtime.ConstrainedExecution; using System.Security.Permissions; // 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 { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.nativeGetGCLatencyMode()); } // We don't want to allow this API when hosted. [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } GC.nativeSetGCLatencyMode((int)value); } } public static bool IsServerGC { get { return GC.nativeIsServerGC(); } } } } // 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; // 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 { [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] get { return (GCLatencyMode)(GC.nativeGetGCLatencyMode()); } // We don't want to allow this API when hosted. [HostProtection(MayLeakOnAbort = true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] [PermissionSetAttribute(SecurityAction.LinkDemand, Name="FullTrust")] set { if ((value < GCLatencyMode.Batch) || (value > GCLatencyMode.LowLatency)) { throw new ArgumentOutOfRangeException(Environment.GetResourceString("ArgumentOutOfRange_Enum")); } GC.nativeSetGCLatencyMode((int)value); } } public static bool IsServerGC { get { return GC.nativeIsServerGC(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Visual3DCollection.cs
- EmptyQuery.cs
- EventPrivateKey.cs
- SiteMapProvider.cs
- UriTemplatePathSegment.cs
- FormViewPageEventArgs.cs
- OdbcReferenceCollection.cs
- GuidelineCollection.cs
- ViewGenerator.cs
- TraceRecord.cs
- RoleGroupCollection.cs
- SchemaNames.cs
- Imaging.cs
- DataSet.cs
- StrongTypingException.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- sqlcontext.cs
- ResourceExpressionEditorSheet.cs
- ObservableDictionary.cs
- ContainerAction.cs
- SQLSingle.cs
- X509LogoTypeExtension.cs
- BeginEvent.cs
- BlurEffect.cs
- FunctionDescription.cs
- filewebrequest.cs
- ContentHostHelper.cs
- XmlSchemaComplexContentRestriction.cs
- WeakEventManager.cs
- DuplicateDetector.cs
- JoinCqlBlock.cs
- DataGridPageChangedEventArgs.cs
- PanningMessageFilter.cs
- RSAPKCS1SignatureFormatter.cs
- OleDbDataReader.cs
- GorillaCodec.cs
- Border.cs
- FileReservationCollection.cs
- SoapAttributes.cs
- CodeNamespaceImportCollection.cs
- login.cs
- SmtpLoginAuthenticationModule.cs
- TableLayout.cs
- CfgRule.cs
- SystemResourceHost.cs
- TextContainer.cs
- XamlDesignerSerializationManager.cs
- ToolStripHighContrastRenderer.cs
- RichTextBox.cs
- WebSysDescriptionAttribute.cs
- HttpMethodAttribute.cs
- ResolveNameEventArgs.cs
- SystemTcpConnection.cs
- HttpApplicationFactory.cs
- WebPartUserCapability.cs
- Vector3DAnimation.cs
- ClientScriptItemCollection.cs
- DayRenderEvent.cs
- MD5.cs
- Dynamic.cs
- DataGridViewHeaderCell.cs
- TextTreeObjectNode.cs
- KeyValueConfigurationCollection.cs
- TableMethodGenerator.cs
- MarginsConverter.cs
- DataGridViewColumn.cs
- DynamicAttribute.cs
- SQLBoolean.cs
- NativeMethodsCLR.cs
- ObfuscationAttribute.cs
- ContainerControl.cs
- ActiveXContainer.cs
- ContextQuery.cs
- CounterSampleCalculator.cs
- DefaultHttpHandler.cs
- UIElementAutomationPeer.cs
- Dump.cs
- Triplet.cs
- EntityModelSchemaGenerator.cs
- ToolstripProfessionalRenderer.cs
- DocumentViewerHelper.cs
- ObjectViewEntityCollectionData.cs
- HijriCalendar.cs
- SizeChangedEventArgs.cs
- TypeGeneratedEventArgs.cs
- Exception.cs
- CodeTryCatchFinallyStatement.cs
- EqualityComparer.cs
- ISCIIEncoding.cs
- TrackingAnnotationCollection.cs
- ListDictionaryInternal.cs
- EventSetter.cs
- Predicate.cs
- SecurityUtils.cs
- XmlSchemaAnnotation.cs
- XmlExtensionFunction.cs
- XmlBufferedByteStreamReader.cs
- XmlBoundElement.cs
- AttributeEmitter.cs
- SqlCachedBuffer.cs