예제 #1
0
 /// <summary>
 /// Write the content to a XNB file.
 /// </summary>
 /// <param name="stream">The stream to write the XNB file to.</param>
 /// <param name="content">The content to write to the XNB file.</param>
 /// <param name="targetPlatform">The platform the XNB is intended for.</param>
 /// <param name="targetProfile">The graphics profile of the target.</param>
 /// <param name="compressContent">True if the content should be compressed.</param>
 /// <param name="rootDirectory">The root directory of the content.</param>
 /// <param name="referenceRelocationPath">The path of the XNB file, used to calculate relative paths for external references.</param>
 public void Compile(Stream stream, object content, TargetPlatform targetPlatform, GraphicsProfile targetProfile, bool compressContent, string rootDirectory, string referenceRelocationPath)
 {
     using (var writer = new ContentWriter(this, stream, targetPlatform, targetProfile, compressContent, rootDirectory, referenceRelocationPath))
     {
         writer.WriteObject(content);
         writer.Flush();
     }
 }