Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Shared / MS / Internal / safesecurityhelperavalon.cs / 1 / safesecurityhelperavalon.cs
/****************************************************************************\ * * File: SafeSecurityHelper.cs * * Purpose: Helper functions for avalon code that require elevation but are safe to use. * * History: * 12/09/04: [....] 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
- CodeDOMProvider.cs
- HtmlElementErrorEventArgs.cs
- Label.cs
- PropertyFilterAttribute.cs
- PeerNameRecord.cs
- SqlUserDefinedTypeAttribute.cs
- TextSchema.cs
- SolidBrush.cs
- HttpHandlerAction.cs
- CapabilitiesUse.cs
- FormViewDeleteEventArgs.cs
- DependencyPropertyHelper.cs
- TextBreakpoint.cs
- ValidateNames.cs
- SubMenuStyleCollection.cs
- OdbcConnectionOpen.cs
- SerializerProvider.cs
- InheritanceService.cs
- MultiPropertyDescriptorGridEntry.cs
- PropertyCollection.cs
- NotFiniteNumberException.cs
- MouseActionValueSerializer.cs
- CodeNamespaceImport.cs
- OutputCacheModule.cs
- Point.cs
- OleCmdHelper.cs
- RuleSetDialog.Designer.cs
- WebPartConnectionsConfigureVerb.cs
- KnownColorTable.cs
- CharKeyFrameCollection.cs
- OdbcException.cs
- ModelTreeManager.cs
- EnterpriseServicesHelper.cs
- BindingExpressionBase.cs
- ComboBoxRenderer.cs
- SqlErrorCollection.cs
- StreamGeometry.cs
- TextTreeTextBlock.cs
- ConfigurationLockCollection.cs
- MetadataCache.cs
- Classification.cs
- ReflectTypeDescriptionProvider.cs
- SqlGatherConsumedAliases.cs
- InputReferenceExpression.cs
- TemplateColumn.cs
- MeshGeometry3D.cs
- ProgressBarBrushConverter.cs
- InvalidPrinterException.cs
- CallbackHandler.cs
- InvalidPrinterException.cs
- MiniParameterInfo.cs
- CollectionChange.cs
- PopupRootAutomationPeer.cs
- HyperLinkColumn.cs
- JsonReaderDelegator.cs
- AudioFormatConverter.cs
- _LocalDataStoreMgr.cs
- Misc.cs
- WebPartDisplayModeEventArgs.cs
- AttachInfo.cs
- Point4D.cs
- XamlTreeBuilderBamlRecordWriter.cs
- Popup.cs
- Operators.cs
- GlyphInfoList.cs
- SiteMapDesignerDataSourceView.cs
- RegexWorker.cs
- AmbiguousMatchException.cs
- Compiler.cs
- XmlQualifiedNameTest.cs
- XmlSchemas.cs
- SqlTypeConverter.cs
- DayRenderEvent.cs
- BinaryObjectReader.cs
- PageBuildProvider.cs
- CmsInterop.cs
- ExtenderControl.cs
- Site.cs
- Configuration.cs
- Int64Storage.cs
- DataGridViewEditingControlShowingEventArgs.cs
- EpmSyndicationContentDeSerializer.cs
- DataBindingList.cs
- AspNetSynchronizationContext.cs
- SocketElement.cs
- DetailsViewInsertedEventArgs.cs
- TextParagraphView.cs
- QuaternionAnimation.cs
- TraceHandlerErrorFormatter.cs
- ScrollableControl.cs
- AccessViolationException.cs
- NameNode.cs
- TextBoxRenderer.cs
- RelationshipManager.cs
- DispatcherHookEventArgs.cs
- MenuCommands.cs
- PlaceHolder.cs
- Registry.cs
- CroppedBitmap.cs
- ObjectDataSourceSelectingEventArgs.cs