public void AddOutput(IContentRef resource, IEnumerable <string> inputPaths) { // If this is not a preparation step, require all output Resources to be actually available. if (!this.isPrepareStep && !resource.IsAvailable) { throw new ArgumentException("Can't add a non-existent output Resource", "resource"); } this.output.Add(new AssetImportOutput(resource.As <Resource>(), inputPaths)); }
/// <summary> /// Submits the specified <see cref="Duality.Resource"/> as a generated output of the current importer. /// </summary> /// <param name="resource">A reference to the generated output <see cref="Duality.Resource"/>.</param> /// <param name="inputPaths">An enumeration of input paths that are used to generate this output <see cref="Duality.Resource"/>.</param> public void AddOutput(IContentRef resource, IEnumerable <string> inputPaths) { // Make sure that the provided input paths aren't null or whitespace. if (inputPaths == null) { throw new ArgumentNullException("inputPaths"); } if (inputPaths.Any(p => string.IsNullOrWhiteSpace(p))) { throw new ArgumentException("Input paths enumerable may not contain null or whitespace items.", "inputPaths"); } // If this is not a preparation step, require all output Resources to be actually available. if (!this.isPrepareStep && !resource.IsAvailable) { throw new ArgumentException("Can't add a non-existent output Resource", "resource"); } this.output.Add(new AssetImportOutput(resource.As <Resource>(), inputPaths)); }