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
- SystemIdentity.cs
- DefaultPropertiesToSend.cs
- versioninfo.cs
- MethodBody.cs
- Point3DCollectionConverter.cs
- RegexRunnerFactory.cs
- ChangeTracker.cs
- ProcessHostConfigUtils.cs
- StrokeCollection.cs
- OdbcCommand.cs
- SelectorItemAutomationPeer.cs
- StrongNamePublicKeyBlob.cs
- XmlReturnReader.cs
- Serializer.cs
- CrossContextChannel.cs
- GraphicsContainer.cs
- PersonalizationStateInfoCollection.cs
- EllipseGeometry.cs
- SQLBytesStorage.cs
- xdrvalidator.cs
- DoubleAnimationBase.cs
- Rotation3DAnimationBase.cs
- PageRequestManager.cs
- SymLanguageVendor.cs
- ItemCheckedEvent.cs
- KnownBoxes.cs
- LayoutTable.cs
- JapaneseLunisolarCalendar.cs
- DecimalKeyFrameCollection.cs
- TextPointerBase.cs
- WindowsListViewGroupHelper.cs
- SetterTriggerConditionValueConverter.cs
- RijndaelManaged.cs
- LightweightEntityWrapper.cs
- XmlIncludeAttribute.cs
- BitmapEffect.cs
- SQLString.cs
- ToolStripRenderer.cs
- AssertSection.cs
- SafeTokenHandle.cs
- PropertyChangedEventManager.cs
- HostProtectionPermission.cs
- _ConnectOverlappedAsyncResult.cs
- FileDialog_Vista_Interop.cs
- UIAgentAsyncBeginRequest.cs
- WebPartZone.cs
- TagPrefixCollection.cs
- WithParamAction.cs
- DebugTrace.cs
- ItemList.cs
- GeometryValueSerializer.cs
- AuthenticationService.cs
- CacheDependency.cs
- DefaultSettingsSection.cs
- MessageEncoderFactory.cs
- BoundColumn.cs
- Transform3DGroup.cs
- Types.cs
- SafeNativeMethods.cs
- FormViewDeletedEventArgs.cs
- UnmanagedMemoryStreamWrapper.cs
- DeclarationUpdate.cs
- StyleXamlTreeBuilder.cs
- CacheOutputQuery.cs
- CommandField.cs
- MobileListItem.cs
- FrameworkRichTextComposition.cs
- WebOperationContext.cs
- QueryCacheManager.cs
- XPathNavigator.cs
- UrlMapping.cs
- UnlockInstanceCommand.cs
- WebServiceEndpoint.cs
- AddingNewEventArgs.cs
- FlowLayoutPanelDesigner.cs
- CircleHotSpot.cs
- TriggerBase.cs
- InteropBitmapSource.cs
- DeclarativeExpressionConditionDeclaration.cs
- NumericUpDownAcceleration.cs
- KeyInstance.cs
- ByteAnimation.cs
- RawTextInputReport.cs
- SecurityTokenSerializer.cs
- XmlNavigatorFilter.cs
- NativeMethods.cs
- TextFindEngine.cs
- SQLInt16Storage.cs
- DBDataPermission.cs
- ComponentResourceManager.cs
- HotSpot.cs
- Separator.cs
- IntSecurity.cs
- ValidatorCollection.cs
- XPathDescendantIterator.cs
- NetCodeGroup.cs
- XNodeNavigator.cs
- IsolatedStorageFile.cs
- CalendarTable.cs
- IndicCharClassifier.cs