ExternalReference Constructor (String, ContentIdentity)

Note

This constructor is available only when developing for Windows.

Initializes a new instance of ExternalReference, specifying the file path relative to another content item.

Syntax

'Declaration
Public Sub New ( _
         filename As String, _
         relativeToContent As ContentIdentity _
)
public ExternalReference (
         string filename,
         ContentIdentity relativeToContent
)
public:
ExternalReference(
         String filename,
         ContentIdentity relativeToContent
)

Parameters

  • filename
    Type: String
    The name of the referenced file.
  • relativeToContent
    Type: ContentIdentity
    The content that the path specified in filename is relative to.

Exceptions

Exception type Condition
ArgumentNullException filename, relativeToContent, or the SourceFilename property of relativeToContent is null.

Remarks

This method constructs a reference to the specified file. If the file name contains a relative path, it is made absolute based on the SourceFilename property of relativeToContent. This can be useful in a custom content processor for constructing references to texture or effect files relative to the Identity property of the mesh being processed.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline

Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

See Also

Reference

ExternalReference Generic Class
ExternalReference Members
Microsoft.Xna.Framework.Content.Pipeline Namespace

Platforms

Windows 7, Windows Vista, Windows XP