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
- relpropertyhelper.cs
- CodeDelegateInvokeExpression.cs
- HotSpotCollection.cs
- XmlMembersMapping.cs
- DynamicRendererThreadManager.cs
- DocumentReference.cs
- FontFamilyValueSerializer.cs
- ReceiveMessageRecord.cs
- UserPreferenceChangingEventArgs.cs
- SoapAttributes.cs
- DecoderFallback.cs
- KnownBoxes.cs
- BitmapFrameEncode.cs
- CrossSiteScriptingValidation.cs
- MailBnfHelper.cs
- LayoutDump.cs
- FolderBrowserDialog.cs
- ObjectListComponentEditor.cs
- SchemaNotation.cs
- Model3D.cs
- SecurityRuntime.cs
- SubMenuStyle.cs
- PrtCap_Base.cs
- FontStretch.cs
- InvalidComObjectException.cs
- FormattedText.cs
- ConnectionOrientedTransportBindingElement.cs
- CodeDomSerializerException.cs
- sqlmetadatafactory.cs
- SchemaImporterExtensionElement.cs
- DataServiceResponse.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- MarkupCompilePass1.cs
- DecimalStorage.cs
- RuntimeConfigurationRecord.cs
- xdrvalidator.cs
- FileUtil.cs
- Substitution.cs
- CollectionConverter.cs
- HttpModuleActionCollection.cs
- RankException.cs
- TimeSpan.cs
- DirectoryNotFoundException.cs
- MissingMethodException.cs
- CookielessData.cs
- CompModSwitches.cs
- XsltException.cs
- EventLogEntry.cs
- HostUtils.cs
- ToolStripContainer.cs
- WindowsStatic.cs
- TextTreeFixupNode.cs
- DataGridViewSelectedRowCollection.cs
- SafeLocalAllocation.cs
- DocumentGridPage.cs
- JulianCalendar.cs
- Win32SafeHandles.cs
- EmbeddedObject.cs
- Track.cs
- DynamicAttribute.cs
- OrthographicCamera.cs
- JournalEntry.cs
- ParseElementCollection.cs
- COM2ColorConverter.cs
- UshortList2.cs
- DecimalConstantAttribute.cs
- SecurityAlgorithmSuiteConverter.cs
- StringUtil.cs
- CodeObjectCreateExpression.cs
- WebCategoryAttribute.cs
- FormViewInsertedEventArgs.cs
- OletxTransactionManager.cs
- ModelTypeConverter.cs
- CodeArrayCreateExpression.cs
- ConnectionPoolManager.cs
- OutputCacheModule.cs
- SafePipeHandle.cs
- CallSiteBinder.cs
- SHA384.cs
- XmlUtf8RawTextWriter.cs
- DiscoveryReference.cs
- IPAddressCollection.cs
- SelectedGridItemChangedEvent.cs
- BuildProviderAppliesToAttribute.cs
- CultureMapper.cs
- ArcSegment.cs
- XmlSchema.cs
- XdrBuilder.cs
- EncryptedKeyIdentifierClause.cs
- TypeLoadException.cs
- XamlPathDataSerializer.cs
- VisualTreeHelper.cs
- LayoutManager.cs
- XmlSerializationReader.cs
- WindowsFormsHost.cs
- IsolatedStorageFileStream.cs
- DayRenderEvent.cs
- InputBuffer.cs
- SqlUtil.cs
- BaseValidatorDesigner.cs