public void Write(MaterialCollection collection, Stream stream) { if (stream == default) { throw new ArgumentNullException(nameof(stream)); } using (var writer = new StreamWriter(stream)) { new ObjMaterialWriter().Write(collection, writer); } }
public void Write(MaterialCollection collection, string path) { if (path == default) { throw new ArgumentNullException(nameof(path)); } if (string.IsNullOrWhiteSpace(path)) { throw new ArgumentException(string.Format("{0} cannot be empty.", nameof(path)), nameof(path)); } using (var writer = new StreamWriter(path)) { new ObjMaterialWriter().Write(collection, writer); } }