From 577776f30fff0afc8d157dce914040dd8a1c1b28 Mon Sep 17 00:00:00 2001 From: Ibrahim Islam Date: Tue, 20 Oct 2020 06:31:01 +0700 Subject: [PATCH 1/3] shortens unique id generation --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index 7e79f55..df7729d 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -8,7 +8,7 @@ static class PipeHelpers { static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); - public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid(); + public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid("N").Substring(0, 5); public static string GetPipePath(string pipeName) { From 462069cefe0555d14bca8effd4fb205799f5fa7c Mon Sep 17 00:00:00 2001 From: Ibrahim Islam Date: Tue, 20 Oct 2020 06:35:51 +0700 Subject: [PATCH 2/3] refactors to use string interpolation --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index df7729d..67c59bf 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -8,7 +8,7 @@ static class PipeHelpers { static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); - public static string GetUnqiuePipeName() => "FFMpegCore_" + Guid.NewGuid("N").Substring(0, 5); + public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid("N").Substring(0, 5)}"; public static string GetPipePath(string pipeName) { From fc988b3bbe75b32d20aff1700dd2d1cc25e4fb17 Mon Sep 17 00:00:00 2001 From: Ibrahim Islam Date: Tue, 20 Oct 2020 06:53:24 +0700 Subject: [PATCH 3/3] fixes typo --- FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs index 67c59bf..2b4feed 100644 --- a/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs +++ b/FFMpegCore/FFMpeg/Pipes/PipeHelpers.cs @@ -8,7 +8,7 @@ static class PipeHelpers { static readonly string PipePrefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_"); - public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid("N").Substring(0, 5)}"; + public static string GetUnqiuePipeName() => $"FFMpegCore_{Guid.NewGuid().ToString("N").Substring(0, 5)}"; public static string GetPipePath(string pipeName) {