Skip to content

Commit

Permalink
remove memoryStream usage
Browse files Browse the repository at this point in the history
  • Loading branch information
standeren committed Jan 2, 2025
1 parent c3d4282 commit e523c6c
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -905,12 +905,8 @@ public Stream GetProcessDefinitionFile()
public Definitions GetDefinitions()
{
using Stream processDefinitionStream = GetProcessDefinitionFile();
using MemoryStream memoryStream = new MemoryStream();
processDefinitionStream.CopyTo(memoryStream);
memoryStream.Position = 0;

XmlSerializer serializer = new(typeof(Definitions));
Definitions definitions = (Definitions)serializer.Deserialize(memoryStream);
Definitions definitions = (Definitions)serializer.Deserialize(processDefinitionStream);

return definitions;
}
Expand Down

0 comments on commit e523c6c

Please sign in to comment.