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
- PopupControlService.cs
- ListenerTraceUtility.cs
- BuilderPropertyEntry.cs
- ETagAttribute.cs
- TabRenderer.cs
- CroppedBitmap.cs
- XmlNavigatorFilter.cs
- MatrixCamera.cs
- ProtocolException.cs
- SourceFileInfo.cs
- InstanceData.cs
- TableChangeProcessor.cs
- CommonObjectSecurity.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- PngBitmapDecoder.cs
- CallbackValidatorAttribute.cs
- XmlSchemaInferenceException.cs
- MetadataCache.cs
- UriScheme.cs
- XComponentModel.cs
- Base64Stream.cs
- DbParameterHelper.cs
- DataGridClipboardCellContent.cs
- PackageRelationshipCollection.cs
- ComUdtElement.cs
- PackageRelationship.cs
- HtmlImage.cs
- OAVariantLib.cs
- LinkedResourceCollection.cs
- ApplicationInfo.cs
- ListControlStringCollectionEditor.cs
- RelationshipDetailsCollection.cs
- ObjectDataSourceMethodEditor.cs
- TypeSystemProvider.cs
- CoreSwitches.cs
- RelationshipManager.cs
- WebPartConnectionsCancelVerb.cs
- Int32AnimationBase.cs
- GeneralTransform3D.cs
- InkCanvasSelection.cs
- UpdateProgress.cs
- DataTableExtensions.cs
- FontWeights.cs
- ToolStripLabel.cs
- ObjectCloneHelper.cs
- EntityDescriptor.cs
- PerformanceCountersElement.cs
- ToolStripMenuItem.cs
- AttachedPropertyMethodSelector.cs
- DataGrid.cs
- SQLByte.cs
- DeploymentSection.cs
- GridViewRow.cs
- WorkflowValidationFailedException.cs
- HttpVersion.cs
- Int64AnimationUsingKeyFrames.cs
- PngBitmapDecoder.cs
- ResourceDictionaryCollection.cs
- LoginName.cs
- CapabilitiesPattern.cs
- ByteStreamMessage.cs
- Converter.cs
- HistoryEventArgs.cs
- _LocalDataStoreMgr.cs
- TemplateBamlRecordReader.cs
- UInt32.cs
- Italic.cs
- PartialCachingControl.cs
- ProfilePropertyNameValidator.cs
- WorkerRequest.cs
- Compiler.cs
- Merger.cs
- Crc32.cs
- AutomationIdentifierGuids.cs
- arclist.cs
- WebHttpDispatchOperationSelectorData.cs
- EventLogPermissionAttribute.cs
- CodeComment.cs
- NameValuePermission.cs
- ReferenceSchema.cs
- ExternalException.cs
- DLinqAssociationProvider.cs
- ScriptingProfileServiceSection.cs
- ContainerFilterService.cs
- InitializingNewItemEventArgs.cs
- CaseStatementProjectedSlot.cs
- DbConvert.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- IsolatedStorageFile.cs
- WindowsSlider.cs
- MultiPropertyDescriptorGridEntry.cs
- ControllableStoryboardAction.cs
- SelectionWordBreaker.cs
- DurableInstancingOptions.cs
- StringPropertyBuilder.cs
- SyndicationPerson.cs
- LoginCancelEventArgs.cs
- LicenseProviderAttribute.cs
- EditingCommands.cs
- cryptoapiTransform.cs