Code:
/ DotNET / DotNET / 8.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
- WindowsUpDown.cs
- CollectionContainer.cs
- EnumMemberAttribute.cs
- Item.cs
- WebPermission.cs
- ListViewGroupItemCollection.cs
- ExpressionVisitorHelpers.cs
- GenericParameterDataContract.cs
- RootBuilder.cs
- FileInfo.cs
- DecoderBestFitFallback.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- DatagridviewDisplayedBandsData.cs
- LicenseContext.cs
- DataPagerFieldCommandEventArgs.cs
- PathFigureCollection.cs
- FileDetails.cs
- EventArgs.cs
- ByteStreamMessageUtility.cs
- XmlSchemaDocumentation.cs
- SwitchCase.cs
- FaultConverter.cs
- OdbcInfoMessageEvent.cs
- RouteUrlExpressionBuilder.cs
- RequestQueryParser.cs
- SecurityTokenTypes.cs
- RuntimeCompatibilityAttribute.cs
- _SslSessionsCache.cs
- PlatformCulture.cs
- SqlInternalConnection.cs
- RoutedEvent.cs
- DataGridItem.cs
- SqlSelectStatement.cs
- ExpressionNode.cs
- XmlSerializerSection.cs
- NamespaceList.cs
- PenLineJoinValidation.cs
- TableLayoutStyleCollection.cs
- BindingValueChangedEventArgs.cs
- CorrelationValidator.cs
- ObjectQueryExecutionPlan.cs
- MethodAccessException.cs
- EnumUnknown.cs
- XmlSchemaAnyAttribute.cs
- OdbcReferenceCollection.cs
- ScopedMessagePartSpecification.cs
- ToolTipAutomationPeer.cs
- EntityDataSourceDesignerHelper.cs
- NativeMethods.cs
- Msec.cs
- NotificationContext.cs
- AssemblyCache.cs
- UntypedNullExpression.cs
- BufferBuilder.cs
- ExpressionBuilder.cs
- InkCanvas.cs
- _SslSessionsCache.cs
- StrokeNodeData.cs
- cryptoapiTransform.cs
- SplayTreeNode.cs
- UdpChannelFactory.cs
- DateTimeValueSerializerContext.cs
- Popup.cs
- DetailsViewDeletedEventArgs.cs
- DoubleConverter.cs
- UseManagedPresentationBindingElementImporter.cs
- CounterCreationDataCollection.cs
- FontNamesConverter.cs
- InputLanguageCollection.cs
- DoubleAnimation.cs
- XPathAncestorIterator.cs
- XmlTextReader.cs
- CaseInsensitiveComparer.cs
- Quad.cs
- LightweightCodeGenerator.cs
- PromptStyle.cs
- DisableDpiAwarenessAttribute.cs
- Int32Converter.cs
- ToolStripComboBox.cs
- SwitchAttribute.cs
- ContentPresenter.cs
- PathFigureCollection.cs
- mansign.cs
- UnsupportedPolicyOptionsException.cs
- ThreadExceptionEvent.cs
- DbDataRecord.cs
- As.cs
- XmlIlTypeHelper.cs
- Expression.cs
- RequiredAttributeAttribute.cs
- ScriptMethodAttribute.cs
- ToolStripButton.cs
- SchemaObjectWriter.cs
- BuilderPropertyEntry.cs
- MinimizableAttributeTypeConverter.cs
- BCLDebug.cs
- EtwTrackingBehaviorElement.cs
- DataBindingCollection.cs
- SafeSecurityHelper.cs
- rsa.cs