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
- base64Transforms.cs
- Blend.cs
- ForceCopyBuildProvider.cs
- ExpandCollapsePattern.cs
- UIElement3D.cs
- GridEntryCollection.cs
- NativeMethodsOther.cs
- QuestionEventArgs.cs
- InternalSafeNativeMethods.cs
- RijndaelManagedTransform.cs
- DropShadowEffect.cs
- MethodExpression.cs
- ConfigWriter.cs
- Point3DAnimation.cs
- HWStack.cs
- WsatTransactionHeader.cs
- AttachedPropertyInfo.cs
- Int32Converter.cs
- TypeValidationEventArgs.cs
- OpacityConverter.cs
- SQLString.cs
- UshortList2.cs
- DBCSCodePageEncoding.cs
- SmtpSection.cs
- HyperLinkStyle.cs
- DetailsViewActionList.cs
- AdapterUtil.cs
- PersistencePipeline.cs
- Math.cs
- EnumConverter.cs
- UpDownEvent.cs
- XmlSchemaAll.cs
- MailSettingsSection.cs
- FragmentQuery.cs
- GridViewRowEventArgs.cs
- ModuleBuilderData.cs
- metadatamappinghashervisitor.cs
- Point4DValueSerializer.cs
- ColorMatrix.cs
- StylusPlugin.cs
- AsyncPostBackErrorEventArgs.cs
- WebZone.cs
- TabletDevice.cs
- PrintingPermissionAttribute.cs
- Debug.cs
- ValidatingPropertiesEventArgs.cs
- MsmqActivation.cs
- DataGridViewTopRowAccessibleObject.cs
- SystemBrushes.cs
- StateWorkerRequest.cs
- Int16AnimationUsingKeyFrames.cs
- RankException.cs
- AmbientLight.cs
- CodeGeneratorOptions.cs
- HeaderCollection.cs
- GlyphShapingProperties.cs
- Clipboard.cs
- TextTreeInsertElementUndoUnit.cs
- BinaryParser.cs
- AssemblyHash.cs
- Mouse.cs
- PropertyKey.cs
- CodeCompileUnit.cs
- SafeLibraryHandle.cs
- QueryCacheKey.cs
- ValueUtilsSmi.cs
- InvalidDataException.cs
- DropDownList.cs
- ArcSegment.cs
- TabItemWrapperAutomationPeer.cs
- Int32Rect.cs
- SoapIgnoreAttribute.cs
- CreateUserWizardStep.cs
- Listbox.cs
- DesignerTransaction.cs
- Triangle.cs
- MetadataUtil.cs
- XmlDataSourceView.cs
- Annotation.cs
- XmlNodeReader.cs
- ScriptServiceAttribute.cs
- Item.cs
- DummyDataSource.cs
- FamilyTypefaceCollection.cs
- Application.cs
- graph.cs
- SyntaxCheck.cs
- AssociationProvider.cs
- PackagePart.cs
- _LoggingObject.cs
- PromptBuilder.cs
- AstTree.cs
- SoapClientMessage.cs
- XmlException.cs
- WebMessageEncodingBindingElement.cs
- PlatformCulture.cs
- FusionWrap.cs
- PLINQETWProvider.cs
- AesCryptoServiceProvider.cs
- ChangesetResponse.cs