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
- TextDecorationCollection.cs
- DBSqlParserTableCollection.cs
- Timeline.cs
- AssemblyInfo.cs
- ImmutableClientRuntime.cs
- HwndHostAutomationPeer.cs
- XmlQueryCardinality.cs
- TableLayoutStyle.cs
- PrintPreviewControl.cs
- GridViewPageEventArgs.cs
- BitmapCodecInfo.cs
- NamedPipeHostedTransportConfiguration.cs
- FixedTextBuilder.cs
- FormsAuthenticationEventArgs.cs
- SqlConnectionHelper.cs
- StatusBarItemAutomationPeer.cs
- PageSetupDialog.cs
- MULTI_QI.cs
- KeyValuePair.cs
- Exception.cs
- AxHostDesigner.cs
- SafeNativeMethodsCLR.cs
- PriorityChain.cs
- CompositeCollectionView.cs
- UdpTransportSettings.cs
- InputBindingCollection.cs
- CodeCompiler.cs
- NetworkInformationPermission.cs
- TextShapeableCharacters.cs
- MenuBindingsEditorForm.cs
- ModulesEntry.cs
- DependencyObjectProvider.cs
- DebuggerAttributes.cs
- TracedNativeMethods.cs
- MessageQueueInstaller.cs
- OleDbConnectionFactory.cs
- EntityDataSourceUtil.cs
- ConstantExpression.cs
- ProtocolsSection.cs
- ElapsedEventArgs.cs
- XmlSyndicationContent.cs
- WindowsListView.cs
- WindowsAuthenticationEventArgs.cs
- InstanceDataCollection.cs
- BitStream.cs
- WpfGeneratedKnownProperties.cs
- TemplatePropertyEntry.cs
- PropertyInfoSet.cs
- DockEditor.cs
- SafeMILHandleMemoryPressure.cs
- ClrProviderManifest.cs
- Mutex.cs
- CreateUserErrorEventArgs.cs
- InvalidWMPVersionException.cs
- QueuePathEditor.cs
- Setter.cs
- DataBoundControlAdapter.cs
- HtmlGenericControl.cs
- ProtocolViolationException.cs
- Thumb.cs
- SqlDataSourceWizardForm.cs
- SchemaRegistration.cs
- CodeDirectionExpression.cs
- SHA512Managed.cs
- ListDataBindEventArgs.cs
- TableColumnCollection.cs
- printdlgexmarshaler.cs
- Material.cs
- CodeNamespaceCollection.cs
- ListenerConnectionDemuxer.cs
- SqlDataSourceView.cs
- ManagedIStream.cs
- PerformanceCounterPermissionEntry.cs
- uribuilder.cs
- BCLDebug.cs
- ViewService.cs
- WorkflowEventArgs.cs
- Select.cs
- iisPickupDirectory.cs
- MexHttpsBindingCollectionElement.cs
- SetStoryboardSpeedRatio.cs
- SchemaImporter.cs
- InfoCardSymmetricAlgorithm.cs
- MailWebEventProvider.cs
- StringToken.cs
- List.cs
- DataGridViewColumn.cs
- DrawingState.cs
- KeyPressEvent.cs
- ToolStripItemClickedEventArgs.cs
- AttributeSetAction.cs
- ComponentChangingEvent.cs
- MetabaseServerConfig.cs
- RawStylusSystemGestureInputReport.cs
- HostedBindingBehavior.cs
- MethodImplAttribute.cs
- DesignerCategoryAttribute.cs
- EntityViewContainer.cs
- WebSysDefaultValueAttribute.cs
- GetBrowserTokenRequest.cs