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
- UInt64.cs
- FileDialog.cs
- TypefaceMap.cs
- Types.cs
- XPathParser.cs
- InternalUserCancelledException.cs
- TableChangeProcessor.cs
- IsolatedStorageFileStream.cs
- InkCanvasSelection.cs
- FixedPage.cs
- StatusBar.cs
- DoubleAnimationBase.cs
- XmlSortKeyAccumulator.cs
- Component.cs
- TrackingWorkflowEventArgs.cs
- SystemColorTracker.cs
- KeyValuePair.cs
- MappedMetaModel.cs
- QueryReaderSettings.cs
- IPGlobalProperties.cs
- WebServicesInteroperability.cs
- XPathDocumentNavigator.cs
- SiteMapDataSourceView.cs
- SerializationEventsCache.cs
- HtmlElementErrorEventArgs.cs
- XmlSchemaObject.cs
- WebConvert.cs
- KoreanLunisolarCalendar.cs
- BigInt.cs
- Parameter.cs
- SafeNativeMethods.cs
- ComponentChangedEvent.cs
- Attributes.cs
- LinkAreaEditor.cs
- BuildProviderUtils.cs
- TrackingServices.cs
- X509Utils.cs
- NTAccount.cs
- DesignerActionTextItem.cs
- SafeNativeMethods.cs
- WebPartConnectionsEventArgs.cs
- TextTreeUndoUnit.cs
- ChannelCacheSettings.cs
- UseLicense.cs
- CustomErrorCollection.cs
- Brush.cs
- AnchoredBlock.cs
- RequestSecurityTokenForGetBrowserToken.cs
- WebAdminConfigurationHelper.cs
- METAHEADER.cs
- EdmFunctions.cs
- EntitySet.cs
- WindowsTokenRoleProvider.cs
- XmlQueryStaticData.cs
- WebPart.cs
- ListView.cs
- ClassHandlersStore.cs
- TableAdapterManagerNameHandler.cs
- VarRefManager.cs
- ValidatingReaderNodeData.cs
- UrlEncodedParameterWriter.cs
- StatusBar.cs
- ScriptModule.cs
- DefaultClaimSet.cs
- NetworkInformationPermission.cs
- DoubleCollectionConverter.cs
- XmlSecureResolver.cs
- CompositeTypefaceMetrics.cs
- ReadOnlyTernaryTree.cs
- ToolTipAutomationPeer.cs
- ConstantSlot.cs
- PhysicalAddress.cs
- WebServiceFault.cs
- NavigationExpr.cs
- HtmlSelectionListAdapter.cs
- SerializerProvider.cs
- __FastResourceComparer.cs
- CacheAxisQuery.cs
- COM2PropertyBuilderUITypeEditor.cs
- EmptyEnumerable.cs
- DesignColumn.cs
- ExceptionHelpers.cs
- DecoderBestFitFallback.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- Parsers.cs
- Set.cs
- WebPartMinimizeVerb.cs
- SiteMapNodeCollection.cs
- PropertySourceInfo.cs
- ListSourceHelper.cs
- VarRemapper.cs
- DbConvert.cs
- ComEventsSink.cs
- EntityContainerEmitter.cs
- HttpHandlersSection.cs
- ComplexObject.cs
- BaseValidatorDesigner.cs
- DoubleAnimation.cs
- Sql8ExpressionRewriter.cs
- DataGridViewBindingCompleteEventArgs.cs