Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / mda.cs / 1305376 / mda.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System.Runtime.CompilerServices; using System.Runtime.Versioning; namespace System { #if MDA_SUPPORTED internal static class Mda { internal static class StreamWriterBufferedDataLost { // State: 0 (not queried); 1 (enabled); 2 (disabled) private static int _enabledState; private static int _captureAllocatedCallStackState; internal static bool Enabled { [System.Security.SecuritySafeCritical] // auto-generated get { if (_enabledState == 0) { if (Mda.IsStreamWriterBufferedDataLostEnabled()) _enabledState = 1; else _enabledState = 2; } return (_enabledState == 1); } } internal static bool CaptureAllocatedCallStack { [System.Security.SecuritySafeCritical] // auto-generated get { if (_captureAllocatedCallStackState == 0) { if (Mda.IsStreamWriterBufferedDataLostCaptureAllocatedCallStack()) _captureAllocatedCallStackState = 1; else _captureAllocatedCallStackState = 2; } return (_captureAllocatedCallStackState == 1); } } [System.Security.SecuritySafeCritical] // auto-generated internal static void ReportError(String text) { Mda.ReportStreamWriterBufferedDataLost(text); } } [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void ReportStreamWriterBufferedDataLost(String text); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsStreamWriterBufferedDataLostEnabled(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsStreamWriterBufferedDataLostCaptureAllocatedCallStack(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void MemberInfoCacheCreation(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void DateTimeInvalidLocalFormat(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsInvalidGCHandleCookieProbeEnabled(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void FireInvalidGCHandleCookieProbe(IntPtr cookie); [System.Security.SecurityCritical] [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void ReportErrorSafeHandleRelease(Exception ex); } #endif } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== using System.Runtime.CompilerServices; using System.Runtime.Versioning; namespace System { #if MDA_SUPPORTED internal static class Mda { internal static class StreamWriterBufferedDataLost { // State: 0 (not queried); 1 (enabled); 2 (disabled) private static int _enabledState; private static int _captureAllocatedCallStackState; internal static bool Enabled { [System.Security.SecuritySafeCritical] // auto-generated get { if (_enabledState == 0) { if (Mda.IsStreamWriterBufferedDataLostEnabled()) _enabledState = 1; else _enabledState = 2; } return (_enabledState == 1); } } internal static bool CaptureAllocatedCallStack { [System.Security.SecuritySafeCritical] // auto-generated get { if (_captureAllocatedCallStackState == 0) { if (Mda.IsStreamWriterBufferedDataLostCaptureAllocatedCallStack()) _captureAllocatedCallStackState = 1; else _captureAllocatedCallStackState = 2; } return (_captureAllocatedCallStackState == 1); } } [System.Security.SecuritySafeCritical] // auto-generated internal static void ReportError(String text) { Mda.ReportStreamWriterBufferedDataLost(text); } } [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void ReportStreamWriterBufferedDataLost(String text); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsStreamWriterBufferedDataLostEnabled(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsStreamWriterBufferedDataLostCaptureAllocatedCallStack(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void MemberInfoCacheCreation(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void DateTimeInvalidLocalFormat(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern bool IsInvalidGCHandleCookieProbeEnabled(); [System.Security.SecurityCritical] // auto-generated [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void FireInvalidGCHandleCookieProbe(IntPtr cookie); [System.Security.SecurityCritical] [ResourceExposure(ResourceScope.None)] [MethodImplAttribute(MethodImplOptions.InternalCall)] internal static extern void ReportErrorSafeHandleRelease(Exception ex); } #endif } // 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
- DataGridCheckBoxColumn.cs
- TimeoutException.cs
- ScriptResourceHandler.cs
- ListInitExpression.cs
- Viewport3DAutomationPeer.cs
- QilStrConcat.cs
- NullableBoolConverter.cs
- RijndaelManagedTransform.cs
- CryptoConfig.cs
- OdbcCommandBuilder.cs
- HashRepartitionStream.cs
- SignalGate.cs
- CryptoConfig.cs
- Form.cs
- DbConnectionClosed.cs
- TableRow.cs
- UnmanagedHandle.cs
- ToolStrip.cs
- JsonMessageEncoderFactory.cs
- ToolStripInSituService.cs
- HttpRequestTraceRecord.cs
- HtmlInputSubmit.cs
- FileUpload.cs
- HandleCollector.cs
- ClientSideQueueItem.cs
- _ConnectOverlappedAsyncResult.cs
- AvTraceFormat.cs
- CookieHandler.cs
- EdmComplexPropertyAttribute.cs
- Menu.cs
- EntityClassGenerator.cs
- HMAC.cs
- CalendarDataBindingHandler.cs
- smtpconnection.cs
- nulltextnavigator.cs
- CopyNodeSetAction.cs
- ElementProxy.cs
- SchemaConstraints.cs
- DataGridViewTopLeftHeaderCell.cs
- DirectoryInfo.cs
- SweepDirectionValidation.cs
- Storyboard.cs
- StringStorage.cs
- TabletDevice.cs
- AssemblyBuilder.cs
- MouseEventArgs.cs
- ListViewTableCell.cs
- TableLayoutSettings.cs
- BrowserTree.cs
- SpellCheck.cs
- EmptyStringExpandableObjectConverter.cs
- GridToolTip.cs
- RuntimeUtils.cs
- RSAOAEPKeyExchangeFormatter.cs
- ListParaClient.cs
- AstNode.cs
- DataFormats.cs
- ComponentSerializationService.cs
- ApplicationTrust.cs
- TemplateComponentConnector.cs
- GridView.cs
- AsymmetricSignatureFormatter.cs
- ZoneButton.cs
- XmlText.cs
- Table.cs
- NamedServiceModelExtensionCollectionElement.cs
- SslStream.cs
- DataObjectEventArgs.cs
- WindowsToolbar.cs
- ToolStripItemTextRenderEventArgs.cs
- RowBinding.cs
- ValidatorCompatibilityHelper.cs
- DisposableCollectionWrapper.cs
- XmlWrappingWriter.cs
- SqlCommandBuilder.cs
- IdentityHolder.cs
- ResourceProperty.cs
- CachedFontFamily.cs
- BitmapDecoder.cs
- DefaultDiscoveryService.cs
- Matrix.cs
- ArgIterator.cs
- XamlBrushSerializer.cs
- X509PeerCertificateAuthenticationElement.cs
- COM2IDispatchConverter.cs
- FixedSOMTableCell.cs
- DrawItemEvent.cs
- InfiniteTimeSpanConverter.cs
- CommentGlyph.cs
- DocumentDesigner.cs
- HandlerFactoryCache.cs
- Stackframe.cs
- RectangleF.cs
- ConfigurationException.cs
- TransactionFlowBindingElementImporter.cs
- InternalControlCollection.cs
- CodeExporter.cs
- SynchronizationContext.cs
- TemplateKeyConverter.cs
- SmtpException.cs