Show / Hide Table of Contents

Class UriFactory

A static helper class for interning URIs to reduce memory usage.

Inheritance
object
UriFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
public static class UriFactory

Fields

| Edit this page View Source

Root

Get or set the root URI factory for this app domain.

Declaration
public static IUriFactory Root
Field Value
Type Description
IUriFactory
Remarks

Internally, the root URI factory is used as the default factory when no other factory is specified in constructors/method parameters.

Properties

| Edit this page View Source

InternUris

Get / set the flag that controls the caching of Uri instances constructed by this factory.

Declaration
public static bool InternUris { get; set; }
Property Value
Type Description
bool
Remarks

When InternUris is set to true, the factory will cache each constructed URI against the original string value used for construction and return a cached Uri where available in preference to calling the Uri constructor.

Methods

| Edit this page View Source

Clear()

Clears all interned URIs.

Declaration
public static void Clear()
| Edit this page View Source

Create(string)

Creates a URI interning it if interning is enabled via the InternUris property.

Declaration
public static Uri Create(string uri)
Parameters
Type Name Description
string uri

String URI.

Returns
Type Description
Uri
Remarks

When URI interning is disabled this is equivalent to just invoking the constructor of the Uri class.

  • Edit this page
  • View Source
In this article
  • Fields
    • Root
  • Properties
    • InternUris
  • Methods
    • Clear()
    • Create(string)
Back to top Generated by DocFX