Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Runtime / GcSettings.cs / 5 / 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
- PolyLineSegment.cs
- Point3DAnimation.cs
- WindowsHyperlink.cs
- HostVisual.cs
- SchemaContext.cs
- AmbientProperties.cs
- CodeParameterDeclarationExpressionCollection.cs
- SqlGenericUtil.cs
- DataListItem.cs
- SystemIPv4InterfaceProperties.cs
- AssemblyBuilder.cs
- QilStrConcatenator.cs
- AppliesToBehaviorDecisionTable.cs
- InstanceCollisionException.cs
- LinkUtilities.cs
- MemberPathMap.cs
- ByteAnimation.cs
- BitmapFrameDecode.cs
- ZipIOLocalFileDataDescriptor.cs
- ADMembershipProvider.cs
- NavigatorInput.cs
- Configuration.cs
- Point3DCollection.cs
- Transform3DGroup.cs
- SoapSchemaExporter.cs
- assemblycache.cs
- FrameSecurityDescriptor.cs
- TabPageDesigner.cs
- HtmlInputReset.cs
- Helpers.cs
- ClientScriptManagerWrapper.cs
- EdgeProfileValidation.cs
- TableItemStyle.cs
- SessionStateModule.cs
- StylusPoint.cs
- X509ChainElement.cs
- XPathDocument.cs
- MessageSecurityOverTcp.cs
- ActivityDesignerHelper.cs
- GridViewDeletedEventArgs.cs
- TextRangeSerialization.cs
- ExtendedPropertyCollection.cs
- X509CertificateInitiatorClientCredential.cs
- sqlmetadatafactory.cs
- TimeSpanOrInfiniteValidator.cs
- StaticSiteMapProvider.cs
- ListControl.cs
- iisPickupDirectory.cs
- CommandEventArgs.cs
- StateMachineWorkflowInstance.cs
- DataSourceView.cs
- ProgressBarRenderer.cs
- XmlReflectionMember.cs
- TableLayoutPanel.cs
- ReadOnlyDictionary.cs
- PreviewKeyDownEventArgs.cs
- ExtentKey.cs
- StorageModelBuildProvider.cs
- ButtonChrome.cs
- ToolBarTray.cs
- StringSorter.cs
- LineServicesCallbacks.cs
- InputProviderSite.cs
- TableCellsCollectionEditor.cs
- FileDialog.cs
- TypeConverterHelper.cs
- HandlerFactoryWrapper.cs
- ClientFormsIdentity.cs
- SHA512Managed.cs
- SafeUserTokenHandle.cs
- StrokeNode.cs
- HttpCookiesSection.cs
- TargetControlTypeAttribute.cs
- ServiceThrottle.cs
- LinqDataView.cs
- MenuItem.cs
- InvokePattern.cs
- LocalizableAttribute.cs
- GenerateScriptTypeAttribute.cs
- ToolboxBitmapAttribute.cs
- QueryContinueDragEvent.cs
- XmlWrappingReader.cs
- OdbcReferenceCollection.cs
- DebuggerAttributes.cs
- UndoEngine.cs
- ReliableChannelBinder.cs
- ToolStripItemDataObject.cs
- HttpRequest.cs
- FileDialogCustomPlacesCollection.cs
- ExceptionWrapper.cs
- Image.cs
- StringDictionary.cs
- ObjectItemAssemblyLoader.cs
- DocumentViewerConstants.cs
- ListViewCommandEventArgs.cs
- AssemblyBuilderData.cs
- KeyManager.cs
- keycontainerpermission.cs
- XmlSchemaAppInfo.cs
- BoundsDrawingContextWalker.cs