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
- WinFormsSpinner.cs
- QuaternionAnimation.cs
- SecurityElement.cs
- Listbox.cs
- DataGridViewAdvancedBorderStyle.cs
- EntityTypeEmitter.cs
- InputScopeAttribute.cs
- SendMailErrorEventArgs.cs
- QilList.cs
- NavigationPropertyEmitter.cs
- TemplateBaseAction.cs
- PackUriHelper.cs
- MissingMemberException.cs
- SystemNetworkInterface.cs
- WaitHandle.cs
- IHttpResponseInternal.cs
- SatelliteContractVersionAttribute.cs
- PropertyDescriptorComparer.cs
- rsa.cs
- LayoutSettings.cs
- XomlCompilerHelpers.cs
- GeneralTransform3D.cs
- CompositeScriptReferenceEventArgs.cs
- KeyProperty.cs
- PreProcessor.cs
- RemotingSurrogateSelector.cs
- TargetParameterCountException.cs
- XmlBindingWorker.cs
- IEnumerable.cs
- EntityCommandDefinition.cs
- SkinBuilder.cs
- AudioStateChangedEventArgs.cs
- AggregateNode.cs
- MatchAllMessageFilter.cs
- RijndaelManaged.cs
- DefinitionBase.cs
- SqlBulkCopyColumnMappingCollection.cs
- EpmContentSerializerBase.cs
- PrimaryKeyTypeConverter.cs
- URI.cs
- ResourceAssociationTypeEnd.cs
- OpCodes.cs
- DeliveryRequirementsAttribute.cs
- CalendarDesigner.cs
- IdnMapping.cs
- Command.cs
- GeometryHitTestResult.cs
- ViewLoader.cs
- SafeViewOfFileHandle.cs
- VectorAnimationUsingKeyFrames.cs
- ApplicationSecurityInfo.cs
- SiteMapNode.cs
- DataGridRelationshipRow.cs
- ApplicationException.cs
- Image.cs
- DateTimeValueSerializerContext.cs
- RawTextInputReport.cs
- FacetChecker.cs
- PropertyCondition.cs
- DeferredSelectedIndexReference.cs
- UnsafePeerToPeerMethods.cs
- ObjectStateEntry.cs
- ServiceOperationWrapper.cs
- EntityDataSourceChangingEventArgs.cs
- DependencyObject.cs
- BuildProviderUtils.cs
- CriticalHandle.cs
- RowSpanVector.cs
- HttpCookie.cs
- NavigationProperty.cs
- VisualTreeHelper.cs
- InplaceBitmapMetadataWriter.cs
- CodeNamespaceCollection.cs
- EncoderParameters.cs
- AppDomain.cs
- OutgoingWebRequestContext.cs
- SvcMapFileSerializer.cs
- PathFigure.cs
- SiteMapPath.cs
- SrgsRuleRef.cs
- SimpleHandlerFactory.cs
- DataServiceHost.cs
- PageFunction.cs
- RouteCollection.cs
- CustomAttribute.cs
- AxImporter.cs
- ellipse.cs
- FontEmbeddingManager.cs
- Stack.cs
- DockPanel.cs
- WebPartTransformerAttribute.cs
- CalendarDataBindingHandler.cs
- SequenceQuery.cs
- SafePipeHandle.cs
- DoubleCollectionConverter.cs
- ExportException.cs
- Directory.cs
- FrameworkElementAutomationPeer.cs
- FindCriteriaElement.cs
- MimeBasePart.cs