Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SecondaryIndexList.cs
- EventSourceCreationData.cs
- DesignerOptionService.cs
- HostedHttpTransportManager.cs
- ValidationSummaryDesigner.cs
- ReadOnlyObservableCollection.cs
- CollectionDataContract.cs
- WaveHeader.cs
- compensatingcollection.cs
- FontCacheUtil.cs
- TemplatedMailWebEventProvider.cs
- TableHeaderCell.cs
- SimpleMailWebEventProvider.cs
- EndpointPerformanceCounters.cs
- UndoManager.cs
- ReceiveActivityDesignerTheme.cs
- FormViewUpdatedEventArgs.cs
- SplitterCancelEvent.cs
- Configuration.cs
- FastPropertyAccessor.cs
- SortableBindingList.cs
- OrderPreservingSpoolingTask.cs
- IDReferencePropertyAttribute.cs
- TreePrinter.cs
- ManagedIStream.cs
- SmiEventSink.cs
- LockCookie.cs
- MsmqTransportSecurity.cs
- DelegateSerializationHolder.cs
- ParenthesizePropertyNameAttribute.cs
- CommandBindingCollection.cs
- DataSourceSelectArguments.cs
- PngBitmapEncoder.cs
- ExportOptions.cs
- HistoryEventArgs.cs
- FileAuthorizationModule.cs
- RegexCode.cs
- BulletedList.cs
- NativeDirectoryServicesQueryAPIs.cs
- unsafenativemethodsother.cs
- VsPropertyGrid.cs
- XmlLoader.cs
- QuadraticEase.cs
- Common.cs
- ControlAdapter.cs
- Cell.cs
- ResXResourceSet.cs
- InstanceCreationEditor.cs
- ExpandedWrapper.cs
- CapacityStreamGeometryContext.cs
- MetadataException.cs
- CharConverter.cs
- AnnotationResource.cs
- AdapterSwitches.cs
- LicFileLicenseProvider.cs
- FrameworkElementFactoryMarkupObject.cs
- ConfigurationManagerHelper.cs
- QilScopedVisitor.cs
- AssertFilter.cs
- TypeDescriptor.cs
- Permission.cs
- wgx_sdk_version.cs
- TemplateColumn.cs
- CommunicationObjectFaultedException.cs
- EntityTypeEmitter.cs
- WebDisplayNameAttribute.cs
- ParameterToken.cs
- EncodingInfo.cs
- QueryExpr.cs
- EntityContainer.cs
- AliasGenerator.cs
- CommonGetThemePartSize.cs
- Point3DAnimation.cs
- HTTPRemotingHandler.cs
- ErrorTableItemStyle.cs
- Scene3D.cs
- UnknownBitmapDecoder.cs
- XPathParser.cs
- ByteRangeDownloader.cs
- XmlCustomFormatter.cs
- ResourceAssociationType.cs
- ListDictionaryInternal.cs
- ListViewPagedDataSource.cs
- DataSysAttribute.cs
- ConfigurationManagerInternalFactory.cs
- DefaultSection.cs
- PointF.cs
- OverrideMode.cs
- SQLMembershipProvider.cs
- EventLogTraceListener.cs
- XmlDeclaration.cs
- XmlSchemaAttribute.cs
- HtmlWindow.cs
- DataGridTable.cs
- TextAdaptor.cs
- FileRecordSequenceCompletedAsyncResult.cs
- XmlElementAttribute.cs
- MenuRendererStandards.cs
- UnsignedPublishLicense.cs
- FieldCollectionEditor.cs