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
- TCEAdapterGenerator.cs
- WsatAdminException.cs
- LookupNode.cs
- IChannel.cs
- LogicalMethodInfo.cs
- WindowsBrush.cs
- CompiledIdentityConstraint.cs
- Content.cs
- LabelExpression.cs
- XmlEntity.cs
- JournalEntryStack.cs
- DesignBindingPropertyDescriptor.cs
- DynamicMethod.cs
- Keyboard.cs
- XslCompiledTransform.cs
- CodeAssignStatement.cs
- LineMetrics.cs
- AppDomainGrammarProxy.cs
- UnsafeNativeMethods.cs
- CodeGenerator.cs
- EmbeddedMailObjectsCollection.cs
- DesignBindingConverter.cs
- CodeSnippetExpression.cs
- Style.cs
- UntypedNullExpression.cs
- WebServiceResponse.cs
- DetailsViewDeletedEventArgs.cs
- XmlSchemaSequence.cs
- SiteMembershipCondition.cs
- ChildTable.cs
- UDPClient.cs
- CalendarDay.cs
- CodeMethodReturnStatement.cs
- BaseUriHelper.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- PlanCompilerUtil.cs
- ArrayExtension.cs
- TextTreeInsertElementUndoUnit.cs
- CommandLibraryHelper.cs
- HostingEnvironmentSection.cs
- counter.cs
- _NegoState.cs
- Decorator.cs
- LoginCancelEventArgs.cs
- HttpCapabilitiesSectionHandler.cs
- RequestUriProcessor.cs
- CanExecuteRoutedEventArgs.cs
- RestHandler.cs
- MimePart.cs
- AppSettingsSection.cs
- ActivationArguments.cs
- QueryStringHandler.cs
- SchemaMapping.cs
- DoubleCollection.cs
- CookieParameter.cs
- PictureBox.cs
- TextMetrics.cs
- SQLSingle.cs
- SoapFault.cs
- PeerCollaborationPermission.cs
- XPathAncestorQuery.cs
- ConfigXmlAttribute.cs
- InputDevice.cs
- ComplexPropertyEntry.cs
- MSHTMLHost.cs
- SchemaDeclBase.cs
- EndpointDiscoveryMetadata.cs
- Point3D.cs
- Events.cs
- TreeWalkHelper.cs
- FlagPanel.cs
- MemoryMappedFileSecurity.cs
- METAHEADER.cs
- _StreamFramer.cs
- TransformationRules.cs
- XmlFormatWriterGenerator.cs
- GridViewSelectEventArgs.cs
- ResXResourceReader.cs
- GACMembershipCondition.cs
- WorkflowOperationInvoker.cs
- ADConnectionHelper.cs
- AddInBase.cs
- BinaryConverter.cs
- MetaTable.cs
- CommandValueSerializer.cs
- PublisherMembershipCondition.cs
- RequestCachePolicyConverter.cs
- TypePropertyEditor.cs
- ADConnectionHelper.cs
- DiscoveryClientRequestChannel.cs
- OutputScope.cs
- MonitoringDescriptionAttribute.cs
- ConfigurationPropertyAttribute.cs
- IdentityModelDictionary.cs
- AsymmetricSignatureDeformatter.cs
- GreenMethods.cs
- BuildManagerHost.cs
- handlecollector.cs
- InstancePersistence.cs
- ConfigurationManagerInternalFactory.cs