ExternalReference Constructor (String, ContentIdentity)

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

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

Syntax

public ExternalReference (
         string filename,
         ContentIdentity relativeToContent
)

Parameters

  • filename
    The name of the referenced file.
  • relativeToContent
    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.

See Also

Reference

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

Platforms

Windows XP SP2, Windows Vista