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
- CodeGenerationManager.cs
- XmlQueryCardinality.cs
- RawStylusInputCustomDataList.cs
- CopyAttributesAction.cs
- UnauthorizedAccessException.cs
- TokenBasedSetEnumerator.cs
- AuthenticationModuleElement.cs
- PermissionSet.cs
- NameNode.cs
- AuthenticateEventArgs.cs
- StorageAssociationTypeMapping.cs
- MasterPage.cs
- InvalidOleVariantTypeException.cs
- DataGridCommandEventArgs.cs
- DynamicDocumentPaginator.cs
- TrustVersion.cs
- HtmlInputControl.cs
- GuidelineSet.cs
- ConsoleCancelEventArgs.cs
- TextAction.cs
- HttpPostProtocolImporter.cs
- AuthorizationRuleCollection.cs
- VersionPair.cs
- PropertyGrid.cs
- RelOps.cs
- TableLayoutPanel.cs
- StringBuilder.cs
- SchemaElementLookUpTable.cs
- SafeFindHandle.cs
- nulltextnavigator.cs
- DbConnectionInternal.cs
- SmtpFailedRecipientException.cs
- XmlAttributeProperties.cs
- datacache.cs
- SchemaHelper.cs
- NameTable.cs
- Formatter.cs
- Int16Animation.cs
- ControlBuilderAttribute.cs
- ModelChangedEventArgsImpl.cs
- InteropBitmapSource.cs
- ComplexPropertyEntry.cs
- DeviceContext.cs
- SqlCharStream.cs
- SequenceNumber.cs
- ConstNode.cs
- ListViewCancelEventArgs.cs
- EntityAdapter.cs
- TrackingDataItem.cs
- FixedBufferAttribute.cs
- StateMachineTimers.cs
- MultipartContentParser.cs
- Trace.cs
- TraceSection.cs
- WorkflowMarkupElementEventArgs.cs
- GridViewColumnHeader.cs
- WebResourceAttribute.cs
- Storyboard.cs
- ConfigurationConverterBase.cs
- ResourceExpression.cs
- FixedPage.cs
- XmlQualifiedName.cs
- CompoundFileReference.cs
- ChangePassword.cs
- RoleManagerSection.cs
- AnnotationResourceChangedEventArgs.cs
- WithParamAction.cs
- Clock.cs
- CodeSnippetStatement.cs
- Adorner.cs
- PublishLicense.cs
- MultitargetUtil.cs
- OdbcConnectionStringbuilder.cs
- AudioFormatConverter.cs
- XmlSchemaAttributeGroup.cs
- WebServiceHandlerFactory.cs
- ByteFacetDescriptionElement.cs
- InsufficientMemoryException.cs
- XmlDataSourceView.cs
- BlobPersonalizationState.cs
- Double.cs
- ProcessModuleCollection.cs
- ExclusiveCanonicalizationTransform.cs
- ReadOnlyCollection.cs
- WebPartCollection.cs
- AudioBase.cs
- AdRotator.cs
- ManipulationCompletedEventArgs.cs
- FormattedText.cs
- EmptyEnumerator.cs
- AuthenticationServiceManager.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- AspNetSynchronizationContext.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DocumentPageHost.cs
- Keywords.cs
- Animatable.cs
- CodeTypeDeclaration.cs
- NodeCounter.cs
- xamlnodes.cs