Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / TrustUi / MS / Internal / documents / Application / HostedController.cs / 1 / HostedController.cs
//------------------------------------------------------------------------------ //// Copyright (C) Microsoft Corporation. All rights reserved. // //// Responsible for the lifecycle of the Document when hosted in a browser. // // // History: // 10/04/2005: [....]: Initial implementation. //----------------------------------------------------------------------------- using System; using System.Security; using System.Windows.TrustUI; using System.Windows.Interop; using MS.Internal; using MS.Internal.PresentationUI; namespace MS.Internal.Documents.Application { ////// Responsible for the lifecycle of the Document when hosted in a browser. /// [FriendAccessAllowed] internal class HostedController : IDocumentController { #region IDocumentController Members //------------------------------------------------------------------------- // IDocumentController Members //------------------------------------------------------------------------- ////// /// bool IDocumentController.EnableEdit(Document document) { return false; } ////// /// bool IDocumentController.Open(Document document) { return false; } ////// /// ////// /// Critical: /// - uses Document.Uri /// - passes document to security critical method, NavigateToDocument. /// TreatAsSafe: /// - provides uri to security critical method, NavigateToDocument, /// for navigation only. /// [SecurityCritical, SecurityTreatAsSafe] bool IDocumentController.Rebind(Document document) { bool handled = false; if (document.IsReloadNeeded) { Trace.SafeWrite( Trace.File, "Navigation requested for Rebind."); NavigationHelper.NavigateToDocument(document); document.IsReloadNeeded = false; handled = true; } return handled; } ////// bool IDocumentController.SaveAsPreperation(Document document) { return false; } ////// /// bool IDocumentController.SaveCommit(Document document) { return false; } ////// /// bool IDocumentController.SavePreperation(Document document) { return false; } #endregion IDocumentController Members #region IChainOfResponsibiltyNode/// Members //-------------------------------------------------------------------------- // IChainOfResponsibiltyNode Members //------------------------------------------------------------------------- /// /// ////// /// Critical: /// - accesses delegate from framework /// TreatAsSafe: /// - does not leak it, only checks if it's null /// [SecurityCritical, SecurityTreatAsSafe] bool IChainOfResponsibiltyNode.IsResponsible(Document subject) { return NavigationHelper.Navigate != null; } #endregion IChainOfResponsibiltyNode Members } } // 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
- LocalizabilityAttribute.cs
- AutomationPeer.cs
- CreateParams.cs
- SizeF.cs
- Decimal.cs
- DataGridViewColumnHeaderCell.cs
- GAC.cs
- ArgumentNullException.cs
- FlowSwitch.cs
- SpecialNameAttribute.cs
- ComplexObject.cs
- KeyBinding.cs
- SequentialActivityDesigner.cs
- SectionInformation.cs
- PartBasedPackageProperties.cs
- CommonRemoteMemoryBlock.cs
- ResourceReferenceKeyNotFoundException.cs
- SqlServices.cs
- HttpProfileBase.cs
- Keyboard.cs
- EventPrivateKey.cs
- Renderer.cs
- RelativeSource.cs
- DataContractSerializerMessageContractImporter.cs
- DataRecordObjectView.cs
- BrowserDefinition.cs
- DataBindEngine.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- WebPartDisplayMode.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ProtocolsConfigurationHandler.cs
- UpdateCompiler.cs
- ActiveXContainer.cs
- AuditLogLocation.cs
- Axis.cs
- QilXmlReader.cs
- StorageModelBuildProvider.cs
- UrlMappingCollection.cs
- Command.cs
- HMACSHA512.cs
- ColumnClickEvent.cs
- RelationHandler.cs
- CodeGroup.cs
- KerberosSecurityTokenParameters.cs
- RolePrincipal.cs
- Size3D.cs
- PagedDataSource.cs
- OverlappedAsyncResult.cs
- ping.cs
- SqlDependency.cs
- TouchDevice.cs
- TextCompositionEventArgs.cs
- BoundColumn.cs
- StorageInfo.cs
- HashMembershipCondition.cs
- ReadOnlyMetadataCollection.cs
- FrameworkTemplate.cs
- CodeTypeReference.cs
- URLIdentityPermission.cs
- CategoryAttribute.cs
- ControlDesigner.cs
- SQLBoolean.cs
- CodeStatement.cs
- Trace.cs
- RunInstallerAttribute.cs
- XPathNodeIterator.cs
- ProfileGroupSettings.cs
- UrlUtility.cs
- AdjustableArrowCap.cs
- WebPartZoneAutoFormat.cs
- UDPClient.cs
- DataGridItem.cs
- ComPersistableTypeElementCollection.cs
- ProgressBarRenderer.cs
- TextBox.cs
- AssertFilter.cs
- BufferBuilder.cs
- CompressEmulationStream.cs
- MetadataUtilsSmi.cs
- AppearanceEditorPart.cs
- Button.cs
- SQLBytes.cs
- ObjectRef.cs
- TreeNodeStyleCollection.cs
- BitmapCache.cs
- UnsafeMethods.cs
- SchemaTypeEmitter.cs
- DataSet.cs
- RedistVersionInfo.cs
- ISSmlParser.cs
- Soap.cs
- Assembly.cs
- CriticalFinalizerObject.cs
- ReverseInheritProperty.cs
- MemberDomainMap.cs
- StylusTip.cs
- WeakReferenceEnumerator.cs
- AuthStoreRoleProvider.cs
- MenuAdapter.cs
- CollectionDataContractAttribute.cs