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
- RtfToXamlReader.cs
- ObjectHelper.cs
- IIS7UserPrincipal.cs
- GeneralTransform2DTo3DTo2D.cs
- _CookieModule.cs
- ColorConvertedBitmap.cs
- _NestedSingleAsyncResult.cs
- tooltip.cs
- TextEffect.cs
- SystemIcmpV6Statistics.cs
- MailMessage.cs
- Rect3D.cs
- InputProcessorProfiles.cs
- UIElementPropertyUndoUnit.cs
- Merger.cs
- DispatcherOperation.cs
- FusionWrap.cs
- WebPartMovingEventArgs.cs
- querybuilder.cs
- FormsAuthenticationConfiguration.cs
- DataGridViewRowsRemovedEventArgs.cs
- XmlIlTypeHelper.cs
- ClockGroup.cs
- IdleTimeoutMonitor.cs
- TypeConstant.cs
- TransactionBridge.cs
- Hash.cs
- ThreadSafeList.cs
- SettingsContext.cs
- PreviewPageInfo.cs
- PerformanceCounterManager.cs
- DefaultValidator.cs
- ListParaClient.cs
- InspectionWorker.cs
- WindowsBrush.cs
- DoubleLinkListEnumerator.cs
- BitmapImage.cs
- FacetChecker.cs
- Attribute.cs
- Binding.cs
- MessageDescriptionCollection.cs
- AsyncDataRequest.cs
- ActivityExecutor.cs
- AspCompat.cs
- CodeSubDirectory.cs
- FormsAuthentication.cs
- HttpCachePolicyElement.cs
- ImageEditor.cs
- HtmlShimManager.cs
- SystemException.cs
- DashStyle.cs
- DBCSCodePageEncoding.cs
- FrameworkTemplate.cs
- ColorConverter.cs
- XamlGridLengthSerializer.cs
- StrongNameMembershipCondition.cs
- Util.cs
- HTMLTagNameToTypeMapper.cs
- InputBinding.cs
- DecimalAverageAggregationOperator.cs
- AuthenticationModulesSection.cs
- DocumentAutomationPeer.cs
- CodeRemoveEventStatement.cs
- Util.cs
- unitconverter.cs
- TrackingStringDictionary.cs
- GridViewUpdatedEventArgs.cs
- DbDataReader.cs
- DbModificationCommandTree.cs
- PropertyCollection.cs
- SineEase.cs
- ConfigurationElement.cs
- DiscoveryServerProtocol.cs
- DataGridViewAdvancedBorderStyle.cs
- PersonalizationAdministration.cs
- DefaultEventAttribute.cs
- DBCommandBuilder.cs
- ToolStripPanel.cs
- X509Certificate2Collection.cs
- ApplicationServicesHostFactory.cs
- CompilerErrorCollection.cs
- ControlBuilderAttribute.cs
- SpanIndex.cs
- Column.cs
- SqlWriter.cs
- StylusPointPropertyUnit.cs
- CodeDelegateCreateExpression.cs
- WbemProvider.cs
- TreeNodeCollection.cs
- _UriSyntax.cs
- InputReport.cs
- PointCollectionValueSerializer.cs
- EdmItemCollection.cs
- DataTemplate.cs
- ResXDataNode.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- OracleEncoding.cs
- WebPartUtil.cs
- SpeakProgressEventArgs.cs
- WeakEventManager.cs