Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / safesecurityhelperavalon.cs / 1305600 / safesecurityhelperavalon.cs
/****************************************************************************\ * * File: SafeSecurityHelper.cs * * Purpose: Helper functions for avalon code that require elevation but are safe to use. * * History: * 12/09/04: marka Created * * Copyright (C) 2004 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Globalization; using System.Security; using System.Security.Permissions; using System.Reflection; using System.Windows.Media ; using System.Windows; //**************** // // this class is for helpers that require avalon. // done this way so that Compiler doesn't build this file to minimize dependencies compiler has. // //**************** #if WINDOWS_BASE namespace MS.Internal.WindowsBase #elif PRESENTATION_CORE namespace MS.Internal.PresentationCore #elif PRESENTATIONFRAMEWORK namespace MS.Internal.PresentationFramework #elif DRT namespace MS.Internal.Drt #else #error Attempting to use this class from an unknown assembly. #endif { internal static partial class SafeSecurityHelper { ////// is this visual connected to presentation source ? /// i.e. is it "renderable" ? /// ////// Critical - extracts presentationsource /// TreatAsSafe - Knowing whether you're connected to presentation source is ok. /// [SecurityCritical, SecurityTreatAsSafe] internal static bool IsConnectedToPresentationSource( Visual visual ) { bool isConnected = false; isConnected = PresentationSource.CriticalFromVisual(visual ) != null; return isConnected ; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SqlAliaser.cs
- OdbcDataReader.cs
- Ops.cs
- HttpApplicationFactory.cs
- SafeViewOfFileHandle.cs
- autovalidator.cs
- XamlDesignerSerializationManager.cs
- DetailsViewModeEventArgs.cs
- TiffBitmapEncoder.cs
- PtsPage.cs
- BoundColumn.cs
- dataprotectionpermission.cs
- CollectionDataContractAttribute.cs
- JpegBitmapEncoder.cs
- CapabilitiesSection.cs
- TableDesigner.cs
- unsafeIndexingFilterStream.cs
- EnlistmentState.cs
- XmlAttributeOverrides.cs
- UrlSyndicationContent.cs
- HttpConfigurationContext.cs
- Int32.cs
- MessageLoggingFilterTraceRecord.cs
- Number.cs
- AppDomainAttributes.cs
- DesignerDataTable.cs
- StylusButton.cs
- SoapAttributeAttribute.cs
- UserControlAutomationPeer.cs
- Delegate.cs
- MethodRental.cs
- ImageAnimator.cs
- RunClient.cs
- WhitespaceRuleLookup.cs
- DataSourceDesigner.cs
- PageParserFilter.cs
- XsdBuilder.cs
- SafeThemeHandle.cs
- CommonDialog.cs
- Table.cs
- LoginView.cs
- WaveHeader.cs
- SafeTimerHandle.cs
- HierarchicalDataBoundControlAdapter.cs
- WebPartCollection.cs
- WindowInteractionStateTracker.cs
- MonthChangedEventArgs.cs
- KeySpline.cs
- XamlBrushSerializer.cs
- EngineSiteSapi.cs
- MarkupExtensionSerializer.cs
- WebPartEditorApplyVerb.cs
- RtfControls.cs
- SafeEventLogReadHandle.cs
- TypeUtils.cs
- MessageDecoder.cs
- ZoneMembershipCondition.cs
- CancellationTokenRegistration.cs
- Token.cs
- CatalogPartCollection.cs
- MouseEvent.cs
- TypeDescriptionProviderAttribute.cs
- ParentUndoUnit.cs
- COM2PropertyBuilderUITypeEditor.cs
- ViewStateException.cs
- SQLStringStorage.cs
- CodeDomConfigurationHandler.cs
- BitmapEffectInputConnector.cs
- RadioButtonPopupAdapter.cs
- AccessDataSourceView.cs
- NamespaceList.cs
- BooleanStorage.cs
- RuntimeHandles.cs
- XPathParser.cs
- Pair.cs
- TimerEventSubscription.cs
- ApplyImportsAction.cs
- KeyInfo.cs
- DragDropManager.cs
- TextElementEnumerator.cs
- PixelFormats.cs
- Transform.cs
- XamlInt32CollectionSerializer.cs
- DelayedRegex.cs
- ParagraphVisual.cs
- NaturalLanguageHyphenator.cs
- WindowsIdentity.cs
- AsyncDataRequest.cs
- SchemaElementLookUpTableEnumerator.cs
- WmlCalendarAdapter.cs
- SequentialUshortCollection.cs
- ContextQuery.cs
- PrintController.cs
- RelatedImageListAttribute.cs
- XmlSerializationWriter.cs
- CryptoKeySecurity.cs
- StateChangeEvent.cs
- CodeSnippetStatement.cs
- Process.cs
- SettingsBindableAttribute.cs