Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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
- ImageCodecInfoPrivate.cs
- RemoteWebConfigurationHostStream.cs
- CodeExpressionCollection.cs
- SimpleWorkerRequest.cs
- MeshGeometry3D.cs
- MaskInputRejectedEventArgs.cs
- EntityViewGenerationAttribute.cs
- ServerValidateEventArgs.cs
- CodeIndexerExpression.cs
- MemberHolder.cs
- WebEncodingValidatorAttribute.cs
- _BufferOffsetSize.cs
- ProcessHostServerConfig.cs
- _NativeSSPI.cs
- IpcPort.cs
- EventMap.cs
- GregorianCalendar.cs
- ActivityExecutionContextCollection.cs
- TablePattern.cs
- TemplateInstanceAttribute.cs
- BindingMAnagerBase.cs
- DataServiceRequestOfT.cs
- CallbackHandler.cs
- ConnectionOrientedTransportChannelFactory.cs
- SchemaImporterExtensionElementCollection.cs
- Message.cs
- VisualProxy.cs
- ResXDataNode.cs
- BindMarkupExtensionSerializer.cs
- CodeIterationStatement.cs
- XsdBuilder.cs
- WindowsGraphics.cs
- TimeoutException.cs
- ReflectionUtil.cs
- Source.cs
- DateTimeValueSerializerContext.cs
- DataBinder.cs
- Point3DKeyFrameCollection.cs
- MulticastOption.cs
- LogFlushAsyncResult.cs
- WebEncodingValidatorAttribute.cs
- IntegerValidator.cs
- OutputCacheModule.cs
- ObjectDataSourceSelectingEventArgs.cs
- Lasso.cs
- ReadContentAsBinaryHelper.cs
- SqlDataSourceSelectingEventArgs.cs
- MembershipPasswordException.cs
- RotateTransform.cs
- BitmapFrame.cs
- HwndHostAutomationPeer.cs
- ToolStripItemDataObject.cs
- SmtpSection.cs
- VScrollBar.cs
- SqlGatherProducedAliases.cs
- Stopwatch.cs
- ByteConverter.cs
- UmAlQuraCalendar.cs
- PathFigureCollectionValueSerializer.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- IIS7UserPrincipal.cs
- BufferedWebEventProvider.cs
- _SslStream.cs
- recordstatefactory.cs
- PropertyManager.cs
- ConfigXmlAttribute.cs
- StorageRoot.cs
- InvariantComparer.cs
- CodeSnippetExpression.cs
- ListBox.cs
- ChangeInterceptorAttribute.cs
- RadioButtonList.cs
- DataError.cs
- WindowsSlider.cs
- StateRuntime.cs
- DefaultTextStore.cs
- IntranetCredentialPolicy.cs
- SchemaObjectWriter.cs
- Rect3D.cs
- Privilege.cs
- XPathNode.cs
- SelectionChangedEventArgs.cs
- PeerName.cs
- JapaneseLunisolarCalendar.cs
- ImmutableObjectAttribute.cs
- MessageSecurityOverMsmqElement.cs
- WindowsRichEditRange.cs
- Button.cs
- ChildTable.cs
- TimeoutConverter.cs
- SQLBinary.cs
- TransformDescriptor.cs
- ModuleBuilderData.cs
- ItemAutomationPeer.cs
- DbConnectionPoolOptions.cs
- PersonalizationProvider.cs
- TextDecorations.cs
- TranslateTransform.cs
- StrokeFIndices.cs
- AttributeCollection.cs