Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExecutionEngineException.cs
- IRCollection.cs
- MemberRelationshipService.cs
- MergeFilterQuery.cs
- WindowsTitleBar.cs
- DataPagerFieldCommandEventArgs.cs
- WebPartConnection.cs
- SoapSchemaImporter.cs
- IRCollection.cs
- QuadTree.cs
- OleDbTransaction.cs
- StoryFragments.cs
- HostProtectionException.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- MULTI_QI.cs
- versioninfo.cs
- SystemIPGlobalStatistics.cs
- AssemblyHelper.cs
- SpellerError.cs
- FormViewActionList.cs
- TextEditorTables.cs
- VirtualizedContainerService.cs
- SelectionEditor.cs
- FontSourceCollection.cs
- ToolboxComponentsCreatedEventArgs.cs
- SByteConverter.cs
- DocumentViewerBaseAutomationPeer.cs
- Accessible.cs
- SHA512Cng.cs
- AuthenticationConfig.cs
- ScrollEventArgs.cs
- SafeEventLogWriteHandle.cs
- DriveNotFoundException.cs
- ListItem.cs
- elementinformation.cs
- WizardForm.cs
- ImageSource.cs
- DataGridTextBoxColumn.cs
- SqlProvider.cs
- RoutedEventHandlerInfo.cs
- ImageIndexConverter.cs
- OleDbTransaction.cs
- XmlSchemaValidator.cs
- Stack.cs
- HttpCapabilitiesEvaluator.cs
- TextBreakpoint.cs
- CalendarKeyboardHelper.cs
- DelegateBodyWriter.cs
- CodeSnippetTypeMember.cs
- StreamSecurityUpgradeAcceptorAsyncResult.cs
- ShaderEffect.cs
- DebugView.cs
- StyleCollectionEditor.cs
- MailMessage.cs
- PreProcessInputEventArgs.cs
- FileUtil.cs
- OleAutBinder.cs
- BindingExpression.cs
- DocumentPageTextView.cs
- SpellerStatusTable.cs
- WebPartDisplayModeCollection.cs
- DataGridClipboardHelper.cs
- ListControl.cs
- MainMenu.cs
- TimersDescriptionAttribute.cs
- IIS7WorkerRequest.cs
- ThemeDictionaryExtension.cs
- Tuple.cs
- OdbcParameter.cs
- Globals.cs
- UriParserTemplates.cs
- NativeMethods.cs
- Set.cs
- RoleManagerEventArgs.cs
- HandlerFactoryWrapper.cs
- IgnoreSectionHandler.cs
- TextDecorationCollectionConverter.cs
- WebPartConnectionsEventArgs.cs
- PartitionedStream.cs
- RegisteredExpandoAttribute.cs
- ResourceDisplayNameAttribute.cs
- TextBox.cs
- ExpressionBuilderCollection.cs
- AddInSegmentDirectoryNotFoundException.cs
- BitmapEffectInput.cs
- MULTI_QI.cs
- WizardSideBarListControlItem.cs
- EntityClassGenerator.cs
- ProcessModelSection.cs
- PipeStream.cs
- DurationConverter.cs
- TextCharacters.cs
- EntityDataSourceDesignerHelper.cs
- WorkflowOperationContext.cs
- CollectionTraceRecord.cs
- IncrementalReadDecoders.cs
- SmtpSection.cs
- filewebrequest.cs
- PropertyCondition.cs
- ApplicationManager.cs