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
- SimpleWebHandlerParser.cs
- SatelliteContractVersionAttribute.cs
- ObjectStateFormatter.cs
- ExpressionEditorAttribute.cs
- DecryptedHeader.cs
- AsyncOperationManager.cs
- ResourceIDHelper.cs
- DataGridHeaderBorder.cs
- MediaCommands.cs
- MemberProjectionIndex.cs
- LayoutDump.cs
- TimeZoneInfo.cs
- FamilyMapCollection.cs
- TextParaLineResult.cs
- EncoderParameters.cs
- ItemsPanelTemplate.cs
- ProgressChangedEventArgs.cs
- EventLogger.cs
- RuleSettings.cs
- DBCSCodePageEncoding.cs
- KeyValueSerializer.cs
- QueryAccessibilityHelpEvent.cs
- AudioFileOut.cs
- RecordsAffectedEventArgs.cs
- UniqueEventHelper.cs
- RequestUriProcessor.cs
- UIElementPropertyUndoUnit.cs
- Message.cs
- RootNamespaceAttribute.cs
- LocalServiceSecuritySettingsElement.cs
- WebPartCatalogCloseVerb.cs
- DeviceContext.cs
- OracleBFile.cs
- ByteStreamGeometryContext.cs
- ValueSerializer.cs
- WmlMobileTextWriter.cs
- LostFocusEventManager.cs
- XmlSchemaRedefine.cs
- XPathSelfQuery.cs
- ModuleBuilder.cs
- MultiPartWriter.cs
- DateTimeAutomationPeer.cs
- QilValidationVisitor.cs
- RuntimeArgumentHandle.cs
- ObjectNavigationPropertyMapping.cs
- ProfileSettings.cs
- DynamicEndpoint.cs
- ProfileSettingsCollection.cs
- DataTableNameHandler.cs
- BindableTemplateBuilder.cs
- BindingFormattingDialog.cs
- ToolCreatedEventArgs.cs
- AmbientLight.cs
- Parser.cs
- XmlnsDefinitionAttribute.cs
- EditorAttribute.cs
- Config.cs
- MatrixKeyFrameCollection.cs
- HandleRef.cs
- ArraySegment.cs
- ReliableMessagingVersion.cs
- ElapsedEventArgs.cs
- DataGridView.cs
- ObjectViewEntityCollectionData.cs
- ElementFactory.cs
- HwndSourceKeyboardInputSite.cs
- Vector3DCollectionValueSerializer.cs
- ImageFormatConverter.cs
- SmtpSection.cs
- SegmentInfo.cs
- FilteredDataSetHelper.cs
- HttpCapabilitiesSectionHandler.cs
- SqlProcedureAttribute.cs
- RangeContentEnumerator.cs
- DelegatedStream.cs
- EdmRelationshipRoleAttribute.cs
- HtmlHead.cs
- HandlerWithFactory.cs
- AuthorizationRule.cs
- MachineKey.cs
- RegexTree.cs
- BasicBrowserDialog.cs
- SoapSchemaMember.cs
- XmlBuffer.cs
- FreeFormDragDropManager.cs
- DataColumn.cs
- ParallelTimeline.cs
- WebSysDescriptionAttribute.cs
- ContractCodeDomInfo.cs
- ProviderUtil.cs
- DataContractSerializer.cs
- HttpVersion.cs
- TypeSystem.cs
- Token.cs
- ServiceDiscoveryElement.cs
- ResourceDescriptionAttribute.cs
- PermissionRequestEvidence.cs
- PointIndependentAnimationStorage.cs
- MailAddress.cs
- TreeViewEvent.cs