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
- XmlSchemaInfo.cs
- Mouse.cs
- RowUpdatingEventArgs.cs
- ThreadStateException.cs
- PackageDigitalSignature.cs
- MsmqHostedTransportManager.cs
- ListItemsPage.cs
- MasterPage.cs
- SchemaSetCompiler.cs
- XPathNavigator.cs
- SqlConnectionManager.cs
- ServerValidateEventArgs.cs
- SafeLibraryHandle.cs
- _HeaderInfoTable.cs
- FloaterParagraph.cs
- PropertyItem.cs
- ConfigurationFileMap.cs
- Expression.cs
- ConfigurationPermission.cs
- RawStylusInput.cs
- BitmapEffectGeneralTransform.cs
- EventProviderWriter.cs
- ListItemCollection.cs
- SqlDataSourceStatusEventArgs.cs
- EntitySetBase.cs
- ProxyWebPartConnectionCollection.cs
- ResourceReferenceExpressionConverter.cs
- XmlSubtreeReader.cs
- DictionaryBase.cs
- RadioButton.cs
- ConfigXmlText.cs
- EventSetterHandlerConverter.cs
- LineProperties.cs
- AnnotationHighlightLayer.cs
- SHA512CryptoServiceProvider.cs
- TextLineBreak.cs
- StreamGeometry.cs
- DataObjectAttribute.cs
- Transform3DGroup.cs
- EastAsianLunisolarCalendar.cs
- DataListCommandEventArgs.cs
- PersonalizationState.cs
- metadatamappinghashervisitor.cs
- XmlElement.cs
- TimeStampChecker.cs
- SqlNodeAnnotation.cs
- RemoteCryptoRsaServiceProvider.cs
- Scripts.cs
- ScriptingSectionGroup.cs
- AccessedThroughPropertyAttribute.cs
- ClientTargetSection.cs
- DataGridViewCellLinkedList.cs
- Converter.cs
- MetadataProperty.cs
- _ScatterGatherBuffers.cs
- ScrollBarAutomationPeer.cs
- RawStylusInputReport.cs
- HostSecurityManager.cs
- PropertyGridDesigner.cs
- sqlcontext.cs
- HttpPostClientProtocol.cs
- FlowDocumentReaderAutomationPeer.cs
- DataGridViewImageCell.cs
- AutomationEvent.cs
- Funcletizer.cs
- DataColumn.cs
- GenericRootAutomationPeer.cs
- ConnectivityStatus.cs
- SqlMethodAttribute.cs
- sortedlist.cs
- _ChunkParse.cs
- PasswordBoxAutomationPeer.cs
- DeviceOverridableAttribute.cs
- DispatcherHookEventArgs.cs
- CompletionProxy.cs
- BitmapImage.cs
- WindowInteropHelper.cs
- CodeEventReferenceExpression.cs
- BitVec.cs
- CharUnicodeInfo.cs
- FileDataSourceCache.cs
- ToolStripItemGlyph.cs
- UriScheme.cs
- TableSectionStyle.cs
- DrawingAttributes.cs
- PersonalizableAttribute.cs
- MappingSource.cs
- Literal.cs
- NameValueCollection.cs
- CollectionCodeDomSerializer.cs
- HtmlEncodedRawTextWriter.cs
- WindowsTooltip.cs
- DefaultTextStoreTextComposition.cs
- ControlCachePolicy.cs
- DelegateSerializationHolder.cs
- TemplateBindingExpressionConverter.cs
- AsymmetricSignatureFormatter.cs
- ActivityExecutor.cs
- MailMessage.cs
- ExecutionEngineException.cs