Files
linker/cmonitor.share.lib/ShareMemoryFactory.cs
2024-05-09 10:58:56 +08:00

18 lines
464 B
C#

using System.Runtime.InteropServices;
namespace cmonitor.share.lib
{
public static class ShareMemoryFactory
{
public static IShareMemory Create(string key, int length, int itemSize)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return new ShareMemoryWindows(key, length, itemSize);
}
return new ShareMemoryWindows(key, length, itemSize);
}
}
}