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
- WithParamAction.cs
- CacheAxisQuery.cs
- XmlSchemaException.cs
- FormViewUpdateEventArgs.cs
- ReadOnlyHierarchicalDataSourceView.cs
- DynamicDocumentPaginator.cs
- EncoderReplacementFallback.cs
- TextTreeTextElementNode.cs
- WebPartsSection.cs
- ObjectSet.cs
- HttpRequestTraceRecord.cs
- StructuredTypeEmitter.cs
- TabPage.cs
- ThicknessAnimation.cs
- PermissionAttributes.cs
- URLAttribute.cs
- OracleLob.cs
- ServiceMetadataPublishingElement.cs
- VSWCFServiceContractGenerator.cs
- CapabilitiesRule.cs
- HashCodeCombiner.cs
- SoapAttributes.cs
- XslTransform.cs
- XmlAttributeCollection.cs
- OleDbSchemaGuid.cs
- ResourcesChangeInfo.cs
- Tracking.cs
- TextDecoration.cs
- InfiniteIntConverter.cs
- SoapInteropTypes.cs
- GenericWebPart.cs
- WebBrowsableAttribute.cs
- WebPartConnectVerb.cs
- listitem.cs
- Parser.cs
- ControlPropertyNameConverter.cs
- ImageFormat.cs
- TrustLevel.cs
- WebPartDisplayMode.cs
- QilDataSource.cs
- PerformanceCountersElement.cs
- RawStylusInput.cs
- MarkupCompiler.cs
- Logging.cs
- BindingBase.cs
- EdmItemCollection.cs
- ContentPosition.cs
- TraversalRequest.cs
- LineServicesCallbacks.cs
- XmlnsDictionary.cs
- ItemTypeToolStripMenuItem.cs
- CodeComment.cs
- UnhandledExceptionEventArgs.cs
- DataTableMappingCollection.cs
- Keyboard.cs
- TypeReference.cs
- Matrix3D.cs
- ServiceDocumentFormatter.cs
- TypePropertyEditor.cs
- baseaxisquery.cs
- Drawing.cs
- EmptyElement.cs
- IgnoreSectionHandler.cs
- Rethrow.cs
- Crc32Helper.cs
- EntityClientCacheEntry.cs
- SqlGatherConsumedAliases.cs
- Mappings.cs
- DateTimeOffsetConverter.cs
- TTSVoice.cs
- MediaTimeline.cs
- SectionInput.cs
- ErrorRuntimeConfig.cs
- FtpRequestCacheValidator.cs
- PrinterResolution.cs
- EntityKeyElement.cs
- WebPartActionVerb.cs
- ContainerVisual.cs
- Timer.cs
- PriorityRange.cs
- MessageQuerySet.cs
- Win32KeyboardDevice.cs
- SqlInfoMessageEvent.cs
- WindowsListViewScroll.cs
- StaticSiteMapProvider.cs
- TreeBuilder.cs
- RotateTransform3D.cs
- ListBoxItemAutomationPeer.cs
- StorageMappingFragment.cs
- ExtendedProperty.cs
- OperatingSystem.cs
- ISO2022Encoding.cs
- cookiecollection.cs
- Console.cs
- LabelTarget.cs
- Constants.cs
- UnionExpr.cs
- _Events.cs
- Stack.cs
- ProjectionPath.cs