Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XmlUrlResolver.cs / 1 / XmlUrlResolver.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System; using System.IO; using System.Net; using System.Threading; using System.Security.Permissions; using System.Security.Policy; using System.Security; ////// /// public class XmlUrlResolver : XmlResolver { static object s_DownloadManager; ICredentials _credentials; static XmlDownloadManager DownloadManager { get { if ( s_DownloadManager == null ) { object dm = new XmlDownloadManager(); Interlocked.CompareExchange( ref s_DownloadManager, dm, null ); } return (XmlDownloadManager)s_DownloadManager; } } // Construction ///Resolves external XML resources named by a /// Uniform Resource Identifier (URI). ////// /// public XmlUrlResolver() { } //UE attension ////// Creates a new instance of the XmlUrlResolver class. /// ////// /// public override ICredentials Credentials { set { _credentials = value; } } // Resource resolution ///[To be supplied.] ////// /// public override Object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) { if (ofObjectToReturn == null || ofObjectToReturn == typeof(System.IO.Stream)) { return DownloadManager.GetStream(absoluteUri, _credentials); } else { throw new XmlException(Res.Xml_UnsupportedClass, string.Empty); } } ///Maps a /// URI to an Object containing the actual resource. ////// /// [PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")] public override Uri ResolveUri(Uri baseUri, string relativeUri){ return base.ResolveUri(baseUri, relativeUri); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbError.cs
- XmlCharCheckingWriter.cs
- DockAndAnchorLayout.cs
- XmlNamespaceMappingCollection.cs
- ExpandableObjectConverter.cs
- FieldInfo.cs
- XmlMtomWriter.cs
- CollectionContainer.cs
- FacetEnabledSchemaElement.cs
- InvariantComparer.cs
- RefreshPropertiesAttribute.cs
- HatchBrush.cs
- ClassHandlersStore.cs
- CompilerCollection.cs
- BuildManager.cs
- DocumentGridPage.cs
- BrowserInteropHelper.cs
- SqlWebEventProvider.cs
- FigureParaClient.cs
- XamlToRtfParser.cs
- AudioBase.cs
- ScrollViewerAutomationPeer.cs
- UriTemplateLiteralQueryValue.cs
- StylusCaptureWithinProperty.cs
- RegexCompiler.cs
- handlecollector.cs
- CompileLiteralTextParser.cs
- CodeSubDirectoriesCollection.cs
- Parallel.cs
- Table.cs
- DocumentXPathNavigator.cs
- PagerSettings.cs
- DiscoveryReferences.cs
- PeerEndPoint.cs
- BufferedGraphics.cs
- SymbolEqualComparer.cs
- GuidConverter.cs
- FrameworkRichTextComposition.cs
- UnaryQueryOperator.cs
- SerializationUtility.cs
- SplashScreen.cs
- DoubleAnimation.cs
- DesignTimeHTMLTextWriter.cs
- AdornerHitTestResult.cs
- TableLayoutSettingsTypeConverter.cs
- OracleRowUpdatedEventArgs.cs
- VScrollBar.cs
- BooleanProjectedSlot.cs
- Globals.cs
- diagnosticsswitches.cs
- SystemIPInterfaceStatistics.cs
- SqlClientFactory.cs
- XPathScanner.cs
- Transactions.cs
- ChtmlImageAdapter.cs
- UnsafeNativeMethods.cs
- TextBox.cs
- PieceNameHelper.cs
- TokenBasedSet.cs
- Command.cs
- DataGridViewButtonCell.cs
- ActivityTypeCodeDomSerializer.cs
- DrawingAttributesDefaultValueFactory.cs
- SqlBulkCopyColumnMapping.cs
- NavigationHelper.cs
- DbParameterCollection.cs
- CodeTypeParameterCollection.cs
- XmlSigningNodeWriter.cs
- PopupRoot.cs
- ForceCopyBuildProvider.cs
- KeyToListMap.cs
- WindowsClaimSet.cs
- ToolStripDropDownItem.cs
- FileDialog.cs
- StrictModeSecurityHeaderElementInferenceEngine.cs
- VersionConverter.cs
- UnsafeCollabNativeMethods.cs
- ResourceExpression.cs
- ProfilePropertySettings.cs
- PartitionedStreamMerger.cs
- AssociationSetMetadata.cs
- ToolStripRendererSwitcher.cs
- CodeThrowExceptionStatement.cs
- isolationinterop.cs
- Trace.cs
- TreeViewImageKeyConverter.cs
- ListItemParagraph.cs
- PrintDialog.cs
- BamlLocalizableResource.cs
- ReceiveReply.cs
- MsmqIntegrationReceiveParameters.cs
- ClickablePoint.cs
- PerformanceCounterLib.cs
- DocumentGridContextMenu.cs
- Clause.cs
- HttpListenerElement.cs
- FileSystemInfo.cs
- RequestUriProcessor.cs
- DefaultBindingPropertyAttribute.cs
- MergablePropertyAttribute.cs