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
- ActivityMetadata.cs
- PTProvider.cs
- UnsafeNativeMethodsCLR.cs
- PasswordBox.cs
- WindowsListViewGroupHelper.cs
- RadioButtonAutomationPeer.cs
- WebEventCodes.cs
- ThreadStartException.cs
- RSACryptoServiceProvider.cs
- Int32Collection.cs
- ProviderBase.cs
- DecoderReplacementFallback.cs
- MetadataCache.cs
- StretchValidation.cs
- CustomBinding.cs
- XmlIncludeAttribute.cs
- documentsequencetextcontainer.cs
- EventSourceCreationData.cs
- ZipFileInfo.cs
- BamlRecords.cs
- WorkflowOwnershipException.cs
- SelectionProviderWrapper.cs
- ExpressionBindingCollection.cs
- BitStack.cs
- ProtocolsConfigurationEntry.cs
- XmlAttributeHolder.cs
- CustomSignedXml.cs
- SQLResource.cs
- TypeCollectionPropertyEditor.cs
- CategoryNameCollection.cs
- IImplicitResourceProvider.cs
- XmlReflectionMember.cs
- TraceSection.cs
- ParentQuery.cs
- DomainConstraint.cs
- WorkItem.cs
- GenericUriParser.cs
- XmlEventCache.cs
- FixedTextSelectionProcessor.cs
- LowerCaseStringConverter.cs
- SourceSwitch.cs
- ObjectDataSource.cs
- DataGridViewDataErrorEventArgs.cs
- ObjectQueryProvider.cs
- InvalidEnumArgumentException.cs
- DbProviderSpecificTypePropertyAttribute.cs
- IPEndPoint.cs
- NeedSkipTokenVisitor.cs
- MultiView.cs
- FlatButtonAppearance.cs
- EventLogLink.cs
- IPipelineRuntime.cs
- TabletCollection.cs
- String.cs
- XmlStreamNodeWriter.cs
- RenderingBiasValidation.cs
- FunctionParameter.cs
- DataGridViewCellMouseEventArgs.cs
- HttpModulesSection.cs
- FileNotFoundException.cs
- HttpStreamFormatter.cs
- TypeBrowser.xaml.cs
- ToolStripTextBox.cs
- DriveInfo.cs
- SeparatorAutomationPeer.cs
- DataServiceRequestOfT.cs
- ContractBase.cs
- IndicFontClient.cs
- IdentityReference.cs
- Encoder.cs
- AutomationElementIdentifiers.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- TextElementEnumerator.cs
- AnchoredBlock.cs
- filewebrequest.cs
- ParamArrayAttribute.cs
- ellipse.cs
- QilScopedVisitor.cs
- ToolStripDropTargetManager.cs
- FixedSOMGroup.cs
- StorageScalarPropertyMapping.cs
- ComEventsSink.cs
- OdbcTransaction.cs
- DbParameterCollectionHelper.cs
- CompiledAction.cs
- InheritedPropertyChangedEventArgs.cs
- RunWorkerCompletedEventArgs.cs
- WindowsFormsHelpers.cs
- ThreadStateException.cs
- TimeSpanConverter.cs
- RelationshipDetailsRow.cs
- CatalogPartChrome.cs
- ButtonColumn.cs
- UnauthorizedAccessException.cs
- SqlInternalConnectionSmi.cs
- HtmlProps.cs
- SchemaMapping.cs
- HtmlElementErrorEventArgs.cs
- ParenExpr.cs
- CheckBoxBaseAdapter.cs