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
- XhtmlTextWriter.cs
- Compiler.cs
- TextLineBreak.cs
- ArglessEventHandlerProxy.cs
- ZoneIdentityPermission.cs
- CssStyleCollection.cs
- AtlasWeb.Designer.cs
- AuthorizationRule.cs
- SecurityContextSecurityTokenResolver.cs
- SynthesizerStateChangedEventArgs.cs
- ExpandCollapseIsCheckedConverter.cs
- XmlSerializerNamespaces.cs
- ScriptIgnoreAttribute.cs
- BinaryReader.cs
- EntityDataSourceReferenceGroup.cs
- ConnectionInterfaceCollection.cs
- WhereQueryOperator.cs
- ChoiceConverter.cs
- DrawingCollection.cs
- CollectionCodeDomSerializer.cs
- NumericUpDown.cs
- MemoryStream.cs
- ButtonColumn.cs
- DBConcurrencyException.cs
- ContentPosition.cs
- CorrelationResolver.cs
- HttpPostProtocolImporter.cs
- SqlDataSourceSelectingEventArgs.cs
- IisTraceListener.cs
- OdbcStatementHandle.cs
- DbSourceCommand.cs
- ContextStack.cs
- PropertyManager.cs
- DataGridViewComponentPropertyGridSite.cs
- ShaderEffect.cs
- DirectoryObjectSecurity.cs
- HttpInputStream.cs
- PolyQuadraticBezierSegment.cs
- ActionFrame.cs
- AutomationAttributeInfo.cs
- TableLayout.cs
- ArrangedElementCollection.cs
- QueryCreatedEventArgs.cs
- Visitor.cs
- SqlClientWrapperSmiStream.cs
- DrawingGroup.cs
- SharedHttpTransportManager.cs
- DesignerFrame.cs
- SafeRegistryHandle.cs
- UnmanagedMemoryStreamWrapper.cs
- PointHitTestParameters.cs
- ProvideValueServiceProvider.cs
- FormViewUpdateEventArgs.cs
- ConfigurationStrings.cs
- XamlSerializerUtil.cs
- UnsafeNativeMethods.cs
- NavigatorInput.cs
- DelimitedListTraceListener.cs
- MinimizableAttributeTypeConverter.cs
- TextMetrics.cs
- NetworkInformationException.cs
- HeaderedItemsControl.cs
- TypeDescriptorFilterService.cs
- BinaryObjectWriter.cs
- RelatedPropertyManager.cs
- SmiMetaData.cs
- XmlDeclaration.cs
- RegexCompiler.cs
- RegistrationProxy.cs
- TextRangeEdit.cs
- AsyncDataRequest.cs
- TreeNodeCollectionEditor.cs
- CssClassPropertyAttribute.cs
- DataGridViewTextBoxEditingControl.cs
- Funcletizer.cs
- OpCellTreeNode.cs
- MaskedTextBox.cs
- ConfigurationValue.cs
- shaper.cs
- Crypto.cs
- DiscoveryMessageProperty.cs
- BitmapData.cs
- StreamInfo.cs
- InstanceDataCollection.cs
- EntityRecordInfo.cs
- ReferenceConverter.cs
- SplitterEvent.cs
- FileLoadException.cs
- ApplicationServicesHostFactory.cs
- Int16Animation.cs
- DataView.cs
- WindowsTitleBar.cs
- LocatorPartList.cs
- PropertyTab.cs
- WebPartZoneBase.cs
- XXXOnTypeBuilderInstantiation.cs
- X509InitiatorCertificateServiceElement.cs
- OverflowException.cs
- DecimalAnimationUsingKeyFrames.cs
- DataServiceConfiguration.cs