Class SyndicationDiscoveryUtility
Provides methods for extracting peer-to-peer auto-discovery and resource information from syndicated content. This class cannot be inherited.
Inheritance
Inherited Members
Namespace: Argotic.Common
Assembly: Argotic.Common.dll
Syntax
public static class SyndicationDiscoveryUtility
Properties
| Improve this Doc View SourceFrameworkUserAgent
Gets the raw user agent string used by the framework when sending web requests.
Declaration
public static string FrameworkUserAgent { get; }
Property Value
Type | Description |
---|---|
System.String | A string that represents information such as the client application name, version, host operating system, and language. |
Methods
| Improve this Doc View SourceConditionalGet(Uri, DateTime, String)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime and entity tag.
Declaration
public static HttpWebResponse ConditionalGet(Uri source, DateTime lastModified, string entityTag)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
Returns
Type | Description |
---|---|
System.Net.HttpWebResponse | A System.Net.HttpWebResponse for the |
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ConditionalGet(Uri, DateTime, String, WebRequestOptions)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static HttpWebResponse ConditionalGet(Uri source, DateTime lastModified, string entityTag, WebRequestOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
WebRequestOptions | options | A WebRequestOptions that holds options that should be applied to web requests. |
Returns
Type | Description |
---|---|
System.Net.HttpWebResponse | A System.Net.HttpWebResponse for the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ConditionalGet(Uri, DateTime, String, ICredentials)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static HttpWebResponse ConditionalGet(Uri source, DateTime lastModified, string entityTag, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Net.HttpWebResponse | A System.Net.HttpWebResponse for the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ConditionalGet(Uri, DateTime, String, ICredentials, IWebProxy)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static HttpWebResponse ConditionalGet(Uri source, DateTime lastModified, string entityTag, ICredentials credentials, IWebProxy proxy)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
System.Net.IWebProxy | proxy | A System.Net.IWebProxy that provides proxy access to the |
Returns
Type | Description |
---|---|
System.Net.HttpWebResponse | A System.Net.HttpWebResponse for the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ExtractDiscoverableSyndicationEndpoints(Stream)
Extracts auto-discoverable syndication endpoints from the supplied System.IO.Stream.
Declaration
public static Collection<DiscoverableSyndicationEndpoint> ExtractDiscoverableSyndicationEndpoints(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | A System.IO.Stream that represents the HTML markup to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<DiscoverableSyndicationEndpoint> | A collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints contained within the |
Remarks
See http://www.rssboard.org/rss-autodiscovery for further information about the auto-discovery of syndicated content.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ExtractDiscoverableSyndicationEndpoints(String)
Extracts auto-discoverable syndication endpoints from the supplied HTML markup.
Declaration
public static Collection<DiscoverableSyndicationEndpoint> ExtractDiscoverableSyndicationEndpoints(string content)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | The HTML markup to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<DiscoverableSyndicationEndpoint> | A collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints contained within the |
Remarks
See http://www.rssboard.org/rss-autodiscovery for further information about the auto-discovery of syndicated content.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
ExtractPingbackNotificationServer(String)
Extracts a HtmlAnchor that represents a pingback auto-discovery link from the supplied HTML markup.
Declaration
public static HtmlAnchor ExtractPingbackNotificationServer(string content)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | The HTML markup to parse. |
Returns
Type | Description |
---|---|
HtmlAnchor | A HtmlAnchor that represents the pingback auto-discovery link extracted from the |
Remarks
Pingback enabled resources that utilize the link mechanism will contain a <link rel="pingback" href="{Absolute URI of the pingback XML-RPC server}" /> element.
The HtmlAnchor that is returned will have an Href property that points to the absolute URI of the pingback XML-RPC server, and a rel attribute of pingback. The Title property and type attribute will also be extracted if available.
See http://www.hixie.ch/specs/pingback/pingback for more information about the pingback notification mechanism.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
ExtractTrackbackNotificationServers(Stream)
Extracts embedded RDF Trackback discovery meta-data from the supplied System.IO.Stream.
Declaration
public static Collection<TrackbackDiscoveryMetadata> ExtractTrackbackNotificationServers(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | A System.IO.Stream that represents the HTML markup to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<TrackbackDiscoveryMetadata> | A collection of TrackbackDiscoveryMetadata objects that represent embedded Trackback ping URLs contained within the |
Remarks
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
ExtractTrackbackNotificationServers(String)
Extracts embedded RDF Trackback discovery meta-data from the supplied HTML markup.
Declaration
public static Collection<TrackbackDiscoveryMetadata> ExtractTrackbackNotificationServers(string content)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | The HTML markup to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<TrackbackDiscoveryMetadata> | A collection of TrackbackDiscoveryMetadata objects that represent embedded Trackback ping URLs contained within the |
Remarks
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
ExtractUrls(String)
Returns a collection of System.Uri instances that represent HTML header links and/or anchor tags in the supplied HTML markup.
Declaration
public static Collection<Uri> ExtractUrls(string content)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | The HTML markup to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<System.Uri> | A collection of System.Uri instances that represent HTML anchor elements and header links in the supplied HTML markup. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
IsPingbackEnabled(Uri)
Returns a value indicating if the supplied System.Uri is a pingback enabled web resource.
Declaration
public static bool IsPingbackEnabled(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
There are two mechanisms used when determining if a web resource is pingback enabled; the presence of an HTML/XHTML <link> element with a rel attribute value of pingback or an HTTP header named X-Pingback. A web resource is considered pingback enabled if it utilizes either or both of these mechanisms.
To conform to the Pingback 1.0 specification, the following information should apply to a pingback enabled resource:
- Pingback enabled resources that utilize the link mechanism will contain a <link rel="pingback" href="{Absolute URI of the pingback XML-RPC server}" /> element.
- Pingback enabled resources that utilize the HTTP header mechanism will contain an HTTP header named X-Pingback whose value is the absolute URI of the pingback XML-RPC server.
This method is optimized to determine pingback enablement by examining the HTTP headers before attempting to parse the response data for an pingback XML-RPC server link.
See http://www.hixie.ch/specs/pingback/pingback for more information about the pingback notification mechanism.
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
IsPingbackEnabled(Uri, ICredentials)
Returns a value indicating if the supplied System.Uri is a pingback enabled web resource using the specified System.Net.ICredentials.
Declaration
public static bool IsPingbackEnabled(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
There are two mechanisms used when determining if a web resource is pingback enabled; the presence of an HTML/XHTML <link> element with a rel attribute value of pingback or an HTTP header named X-Pingback. A web resource is considered pingback enabled if it utilizes either or both of these mechanisms.
To conform to the Pingback 1.0 specification, the following information should apply to a pingback enabled resource:
- Pingback enabled resources that utilize the link mechanism will contain a <link rel="pingback" href="{Absolute URI of the pingback XML-RPC server}" /> element.
- Pingback enabled resources that utilize the HTTP header mechanism will contain an HTTP header named X-Pingback whose value is the absolute URI of the pingback XML-RPC server.
This method is optimized to determine pingback enablement by examining the HTTP headers before attempting to parse the response data for an pingback XML-RPC server link.
See http://www.hixie.ch/specs/pingback/pingback for more information about the pingback notification mechanism.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
IsTrackbackEnabled(Uri)
Returns a value indicating if the supplied System.Uri is a trackback enabled web resource.
Declaration
public static bool IsTrackbackEnabled(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
The auto-discovery mechanism for trackback utilizes embedded RDF meta-data elements within the web resource.
To conform to the Trackback 1.2 specification, the following information should apply to a trackback enabled resource:
- Trackback enabled resources will contain one or more embedded RDF elements that describe where to send pings for web log entries.
-
A sample embedded RDF element looks like this:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <rdf:Description rdf:about="http://www.foo.com/archive.html#foo" dc:identifier="http://www.foo.com/archive.html#foo" dc:title="Foo Bar" trackback:ping="http://www.foo.com/tb.cgi/5" /> </rdf:RDF>
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
IsTrackbackEnabled(Uri, ICredentials)
Returns a value indicating if the supplied System.Uri is a trackback enabled web resource using the specified System.Net.ICredentials.
Declaration
public static bool IsTrackbackEnabled(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
The auto-discovery mechanism for trackback utilizes embedded RDF meta-data elements within the web resource.
To conform to the Trackback 1.2 specification, the following information should apply to a trackback enabled resource:
- Trackback enabled resources will contain one or more embedded RDF elements that describe where to send pings for web log entries.
-
A sample embedded RDF element looks like this:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <rdf:Description rdf:about="http://www.foo.com/archive.html#foo" dc:identifier="http://www.foo.com/archive.html#foo" dc:title="Foo Bar" trackback:ping="http://www.foo.com/tb.cgi/5" /> </rdf:RDF>
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocateDiscoverableSyndicationEndpoints(Uri)
Returns a collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints for the supplied System.Uri.
Declaration
public static Collection<DiscoverableSyndicationEndpoint> LocateDiscoverableSyndicationEndpoints(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | A System.Uri that represents the URL of the web resource to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<DiscoverableSyndicationEndpoint> | A collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints for the web resource located at the |
Remarks
See http://www.rssboard.org/rss-autodiscovery for further information about the auto-discovery of syndicated content.
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocateDiscoverableSyndicationEndpoints(Uri, ICredentials)
Returns a collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints for the supplied System.Uri using the specified System.Net.ICredentials.
Declaration
public static Collection<DiscoverableSyndicationEndpoint> LocateDiscoverableSyndicationEndpoints(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | A System.Uri that represents the URL of the web resource to parse. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<DiscoverableSyndicationEndpoint> | A collection of DiscoverableSyndicationEndpoint objects that represent auto-discoverable syndicated content endpoints for the web resource located at the |
Remarks
See http://www.rssboard.org/rss-autodiscovery for further information about the auto-discovery of syndicated content.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocatePingbackNotificationServer(Uri)
Returns a System.Uri that represents a pingback XML-RPC server endpoint using the Pingback server auto-discovery mechanisms for the supplied System.Uri.
Declaration
public static Uri LocatePingbackNotificationServer(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri of a web resource to perform pingback auto-discovery against. |
Returns
Type | Description |
---|---|
System.Uri | A System.Uri that represents the absolute URI of the pingback XML-RPC server. If pingback server auto-discovery fails to locate a pingback XML-RPC server endpoint, returns null. |
Remarks
There are two mechanisms used when determining if a web resource is pingback enabled; the presence of an HTML/XHTML <link> element with a rel attribute value of pingback or an HTTP header named X-Pingback. A web resource is considered pingback enabled if it utilizes either or both of these mechanisms.
To conform to the Pingback 1.0 specification, the following information should apply to a pingback enabled resource:
- Pingback enabled resources that utilize the link mechanism will contain a <link rel="pingback" href="{Absolute URI of the pingback XML-RPC server}" /> element.
- Pingback enabled resources that utilize the HTTP header mechanism will contain an HTTP header named X-Pingback whose value is the absolute URI of the pingback XML-RPC server.
This method is optimized to locate the pingback XML-RPC server endpoint within the HTTP headers before attempting to parse the response data for an pingback XML-RPC server link.
See http://www.hixie.ch/specs/pingback/pingback for more information about the pingback notification mechanism.
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocatePingbackNotificationServer(Uri, ICredentials)
Returns a System.Uri that represents a pingback XML-RPC server endpoint using the Pingback server auto-discovery mechanisms for the supplied System.Uri using the specified System.Net.ICredentials.
Declaration
public static Uri LocatePingbackNotificationServer(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri of a web resource to perform pingback auto-discovery against. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Uri | A System.Uri that represents the absolute URI of the pingback XML-RPC server. If pingback server auto-discovery fails to locate a pingback XML-RPC server endpoint, returns null. |
Remarks
There are two mechanisms used when determining if a web resource is pingback enabled; the presence of an HTML/XHTML <link> element with a rel attribute value of pingback or an HTTP header named X-Pingback. A web resource is considered pingback enabled if it utilizes either or both of these mechanisms.
To conform to the Pingback 1.0 specification, the following information should apply to a pingback enabled resource:
- Pingback enabled resources that utilize the link mechanism will contain a <link rel="pingback" href="{Absolute URI of the pingback XML-RPC server}" /> element.
- Pingback enabled resources that utilize the HTTP header mechanism will contain an HTTP header named X-Pingback whose value is the absolute URI of the pingback XML-RPC server.
This method is optimized to locate the pingback XML-RPC server endpoint within the HTTP headers before attempting to parse the response data for an pingback XML-RPC server link.
See http://www.hixie.ch/specs/pingback/pingback for more information about the pingback notification mechanism.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocateTrackbackNotificationServers(Uri)
Returns a collection of TrackbackDiscoveryMetadata objects that represent trackback ping URL endpoints for the supplied System.Uri.
Declaration
public static Collection<TrackbackDiscoveryMetadata> LocateTrackbackNotificationServers(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | A System.Uri that represents the URL of the web resource to parse. |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<TrackbackDiscoveryMetadata> | A collection of TrackbackDiscoveryMetadata objects that represent embedded Trackback ping URLs for the web resource located at the |
Remarks
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
LocateTrackbackNotificationServers(Uri, ICredentials)
Returns a collection of TrackbackDiscoveryMetadata objects that represent trackback ping URL endpoints for the supplied System.Uri using the specified System.Net.ICredentials.
Declaration
public static Collection<TrackbackDiscoveryMetadata> LocateTrackbackNotificationServers(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | A System.Uri that represents the URL of the web resource to parse. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Collections.ObjectModel.Collection<TrackbackDiscoveryMetadata> | A collection of TrackbackDiscoveryMetadata objects that represent embedded Trackback ping URLs for the web resource located at the |
Remarks
See http://www.sixapart.com/pronet/docs/trackback_spec for further information about the auto-discovery of Trackback ping URLs.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SourceReferencesTarget(Uri, Uri)
Returns a value indicating if the source System.Uri references the target System.Uri.
Declaration
public static bool SourceReferencesTarget(Uri source, Uri target)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | A System.Uri that represents the source web resource that will be searched. |
System.Uri | target | A System.Uri that represents the target web resource being searched for. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
SourceReferencesTarget(Uri, Uri, ICredentials)
Returns a value indicating if the source System.Uri references the target System.Uri, using the specifed System.Net.ICredentials.
Declaration
public static bool SourceReferencesTarget(Uri source, Uri target, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | A System.Uri that represents the source web resource that will be searched. |
System.Uri | target | A System.Uri that represents the target web resource being searched for. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
SyndicationContentFormatByName(String)
Returns the SyndicationContentFormat enumeration value that corresponds to the specified format name.
Declaration
public static SyndicationContentFormat SyndicationContentFormatByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of the syndication content format. |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value that corresponds to the specified string, otherwise returns SyndicationContentFormat.None. |
Remarks
This method disregards case of specified format name.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
System.ArgumentNullException | The |
SyndicationContentFormatGet(Stream)
Returns the SyndicationContentFormat of the syndicated resource represented by the supplied System.IO.Stream.
Declaration
public static SyndicationContentFormat SyndicationContentFormatGet(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | A System.IO.Stream that represents the XML data for the syndicated resource. |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value indicating the format of the syndicated resource. If unable to determine format, returns None. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SyndicationContentFormatGet(Uri)
Returns the SyndicationContentFormat of the syndicated resource located at the specified System.Uri.
Declaration
public static SyndicationContentFormat SyndicationContentFormatGet(Uri source)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri of the syndication resource to determine syndication content format for. |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value indicating the format of the syndicated resource. If unable to determine format, returns None. |
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SyndicationContentFormatGet(Uri, ICredentials)
Returns the SyndicationContentFormat of the syndicated resource located at the specified System.Uri using the supplied System.Net.ICredentials.
Declaration
public static SyndicationContentFormat SyndicationContentFormatGet(Uri source, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri of the syndication resource to determine syndication content format for. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value indicating the format of the syndicated resource. If unable to determine format, returns None. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SyndicationContentFormatGet(XmlReader)
Returns the SyndicationContentFormat of the syndicated resource represented by the supplied System.Xml.XmlReader.
Declaration
public static SyndicationContentFormat SyndicationContentFormatGet(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | A System.Xml.XmlReader that represents the XML data for the syndicated resource. |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value indicating the format of the syndicated resource. If unable to determine format, returns None. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
SyndicationContentFormatGet(XPathNavigator)
Returns the SyndicationContentFormat of the syndicated resource represented by the supplied System.Xml.XPath.XPathNavigator.
Declaration
public static SyndicationContentFormat SyndicationContentFormatGet(XPathNavigator navigator)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XPath.XPathNavigator | navigator | A System.Xml.XPath.XPathNavigator that represents the XML data for the syndicated resource. |
Returns
Type | Description |
---|---|
SyndicationContentFormat | A SyndicationContentFormat enumeration value indicating the format of the syndicated resource. If unable to determine format, returns None. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TryConditionalGet(Uri, DateTime, String, WebRequestOptions, out HttpWebResponse)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static bool TryConditionalGet(Uri source, DateTime lastModified, string entityTag, WebRequestOptions options, out HttpWebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
WebRequestOptions | options | A WebRequestOptions that holds options that should be applied to web requests. |
System.Net.HttpWebResponse | response | When this method returns, contains the System.Net.HttpWebResponse for the supplied |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TryConditionalGet(Uri, DateTime, String, out HttpWebResponse)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime and entity tag.
Declaration
public static bool TryConditionalGet(Uri source, DateTime lastModified, string entityTag, out HttpWebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
System.Net.HttpWebResponse | response | When this method returns, contains the System.Net.HttpWebResponse for the supplied |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Examples
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TryConditionalGet(Uri, DateTime, String, ICredentials, out HttpWebResponse)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static bool TryConditionalGet(Uri source, DateTime lastModified, string entityTag, ICredentials credentials, out HttpWebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
System.Net.HttpWebResponse | response | When this method returns, contains the System.Net.HttpWebResponse for the supplied |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
TryConditionalGet(Uri, DateTime, String, ICredentials, IWebProxy, out HttpWebResponse)
Performs a conditional get operation against the supplied System.Uri using the specified System.DateTime, entity tag and System.Net.ICredentials.
Declaration
public static bool TryConditionalGet(Uri source, DateTime lastModified, string entityTag, ICredentials credentials, IWebProxy proxy, out HttpWebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | source | The System.Uri to perform a conditional GET operation against. |
System.DateTime | lastModified | A System.DateTime object that represents the date and time at which the |
System.String | entityTag | The entity tag provided by the |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
System.Net.IWebProxy | proxy | A System.Net.IWebProxy that provides proxy access to the |
System.Net.HttpWebResponse | response | When this method returns, contains the System.Net.HttpWebResponse for the supplied |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
UriExists(Uri)
Returns a value indicating if the supplied System.Uri exists.
Declaration
public static bool UriExists(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
This method will return false if the uri
is a null reference or the uri
is otherwise inaccessible.
Examples
| Improve this Doc View Source
UriExists(Uri, ICredentials)
Returns a value indicating if the supplied System.Uri exists using the specified System.Net.ICredentials.
Declaration
public static bool UriExists(Uri uri, ICredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uri | The System.Uri to validate. |
System.Net.ICredentials | credentials | A System.Net.ICredentials that provides the proper set of credentials to the web resource when required.
If |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Remarks
This method will return false if the uri
is a null reference or the uri
is otherwise inaccessible.