Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. //------------------------------------------------------------------------------ //[To be supplied.] ///// 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.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LogLogRecord.cs
- MarkupCompilePass1.cs
- TextUtf8RawTextWriter.cs
- TypeSource.cs
- EventLogPropertySelector.cs
- StaticResourceExtension.cs
- Debugger.cs
- VirtualizingPanel.cs
- MessageQueueInstaller.cs
- PrivateFontCollection.cs
- _OSSOCK.cs
- TextMetrics.cs
- ToolStripControlHost.cs
- NotFiniteNumberException.cs
- XmlSerializerOperationGenerator.cs
- DataServiceHostWrapper.cs
- Geometry3D.cs
- DBBindings.cs
- ControlIdConverter.cs
- FixedFindEngine.cs
- WebPartConnectionsCancelEventArgs.cs
- XmlWhitespace.cs
- IntegerFacetDescriptionElement.cs
- CultureTableRecord.cs
- SmtpSection.cs
- TrackingLocation.cs
- WbemProvider.cs
- CacheForPrimitiveTypes.cs
- ModifiableIteratorCollection.cs
- ObjectQueryExecutionPlan.cs
- HtmlInputCheckBox.cs
- DbgCompiler.cs
- TraceHandler.cs
- ProviderConnectionPoint.cs
- DownloadProgressEventArgs.cs
- CoTaskMemUnicodeSafeHandle.cs
- Site.cs
- __Error.cs
- SpoolingTaskBase.cs
- RegularExpressionValidator.cs
- WebPartPersonalization.cs
- ReceiveMessageRecord.cs
- UnsafeNativeMethods.cs
- PersonalizableTypeEntry.cs
- M3DUtil.cs
- NativeMethods.cs
- RuleSettingsCollection.cs
- CodeGeneratorOptions.cs
- KnownBoxes.cs
- ProcessStartInfo.cs
- SamlConditions.cs
- DataTableReader.cs
- CollaborationHelperFunctions.cs
- HelloOperation11AsyncResult.cs
- MethodBuilderInstantiation.cs
- Transform.cs
- Page.cs
- _UriTypeConverter.cs
- StreamResourceInfo.cs
- MessageSecurityTokenVersion.cs
- FigureParagraph.cs
- CompatibleIComparer.cs
- BindingEntityInfo.cs
- Transform3DGroup.cs
- ContravarianceAdapter.cs
- HwndSourceParameters.cs
- WebPartManagerInternals.cs
- SQLMembershipProvider.cs
- ToolStripComboBox.cs
- StackBuilderSink.cs
- PasswordRecovery.cs
- PermissionListSet.cs
- RouteValueExpressionBuilder.cs
- StateChangeEvent.cs
- GroupByQueryOperator.cs
- DbFunctionCommandTree.cs
- WrappedOptions.cs
- DrawingContextWalker.cs
- AutoResizedEvent.cs
- NullableDoubleMinMaxAggregationOperator.cs
- DrawingImage.cs
- TrustManagerPromptUI.cs
- TextTrailingCharacterEllipsis.cs
- _NtlmClient.cs
- GeneratedView.cs
- ApplicationManager.cs
- DiagnosticSection.cs
- DllNotFoundException.cs
- GridViewColumnHeader.cs
- ReadWriteObjectLock.cs
- CounterCreationDataCollection.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- OverlappedAsyncResult.cs
- Debugger.cs
- DefaultTextStoreTextComposition.cs
- MetadataCollection.cs
- UiaCoreProviderApi.cs
- SessionState.cs
- MemberExpressionHelper.cs
- BuildResultCache.cs