Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / InsufficientMemoryException.cs / 1305376 / InsufficientMemoryException.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InsufficientMemoryException ** ** ** Purpose: The exception class for running out of memory ** but most likely in a non-fatal way that shouldn't ** be affected by escalation policy. Use this for cases ** like MemoryFailPoint or a TryAllocate method, where you ** expect OOM's with no shared state corruption and you ** want to recover from these errors. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [Serializable] public sealed class InsufficientMemoryException : OutOfMemoryException { public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } private InsufficientMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** Class: InsufficientMemoryException ** ** ** Purpose: The exception class for running out of memory ** but most likely in a non-fatal way that shouldn't ** be affected by escalation policy. Use this for cases ** like MemoryFailPoint or a TryAllocate method, where you ** expect OOM's with no shared state corruption and you ** want to recover from these errors. ** ** =============================================================================*/ namespace System { using System; using System.Runtime.Serialization; [Serializable] public sealed class InsufficientMemoryException : OutOfMemoryException { public InsufficientMemoryException() : base(GetMessageFromNativeResources(ExceptionMessageKind.OutOfMemory)) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message) : base(message) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } public InsufficientMemoryException(String message, Exception innerException) : base(message, innerException) { SetErrorCode(__HResults.COR_E_INSUFFICIENTMEMORY); } private InsufficientMemoryException(SerializationInfo info, StreamingContext context) : base(info, context) { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Attributes.cs
- RIPEMD160.cs
- ObjectItemCollection.cs
- SQLInt64.cs
- DbConnectionPoolGroup.cs
- Compress.cs
- X509Utils.cs
- TextProperties.cs
- Int64Storage.cs
- EnumerableWrapperWeakToStrong.cs
- TaskExceptionHolder.cs
- HttpCachePolicyWrapper.cs
- XD.cs
- TextViewSelectionProcessor.cs
- FloaterParagraph.cs
- EmptyQuery.cs
- CollectionViewGroup.cs
- XmlNotation.cs
- CultureMapper.cs
- SystemColorTracker.cs
- JapaneseLunisolarCalendar.cs
- ArgumentException.cs
- ObjectStateManager.cs
- TextParaClient.cs
- KeyInstance.cs
- TextBoxLine.cs
- Expressions.cs
- ColorTranslator.cs
- TemplatePartAttribute.cs
- ResourceProviderFactory.cs
- FileDetails.cs
- ScriptControl.cs
- FixedTextContainer.cs
- MasterPage.cs
- AnimationClockResource.cs
- WindowsPen.cs
- AnnotationHighlightLayer.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- ProjectionPlan.cs
- AssemblyCollection.cs
- DataListDesigner.cs
- SizeKeyFrameCollection.cs
- ServiceModelConfigurationSectionCollection.cs
- InputLanguageCollection.cs
- DataGridViewSelectedColumnCollection.cs
- HttpListenerException.cs
- DataSet.cs
- VirtualizedItemProviderWrapper.cs
- TableItemProviderWrapper.cs
- Visitors.cs
- GlyphCache.cs
- LineGeometry.cs
- CodeCatchClause.cs
- TraceListeners.cs
- AudioFormatConverter.cs
- JournalEntryListConverter.cs
- DataServiceQueryOfT.cs
- SmtpLoginAuthenticationModule.cs
- DLinqAssociationProvider.cs
- PageHandlerFactory.cs
- RSAOAEPKeyExchangeDeformatter.cs
- EventMap.cs
- HtmlToClrEventProxy.cs
- DataSourceProvider.cs
- MessageDecoder.cs
- Span.cs
- FileFormatException.cs
- CharUnicodeInfo.cs
- ConfigurationValue.cs
- EventPropertyMap.cs
- Expander.cs
- RowToFieldTransformer.cs
- MultiView.cs
- UserUseLicenseDictionaryLoader.cs
- EnumerableCollectionView.cs
- PointAnimationUsingPath.cs
- TextServicesCompartmentEventSink.cs
- DbDataRecord.cs
- NativeObjectSecurity.cs
- WinEventHandler.cs
- Misc.cs
- BitVector32.cs
- DataGridCell.cs
- DateTimeConverter2.cs
- FactoryId.cs
- GridViewColumnHeader.cs
- DynamicScriptObject.cs
- FontDialog.cs
- UrlPropertyAttribute.cs
- OrderByLifter.cs
- LookupBindingPropertiesAttribute.cs
- BigInt.cs
- DbParameterCollectionHelper.cs
- CollectionEditorDialog.cs
- SqlCrossApplyToCrossJoin.cs
- AnalyzedTree.cs
- SafeRegistryHandle.cs
- HideDisabledControlAdapter.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- DataGridViewTextBoxEditingControl.cs