/// <summary> /// Creates a new Symbolic Link Creator /// </summary> public Linker() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { linker = new WindowsSymLinkCreator(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { linker = new LinuxSymLinkCreator(); } else { linker = new OSXSymLinkCreator(); } }
public static ISymLinkCreator GetSymLinkCreator() { if (linker == null) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { linker = new WindowsSymLinkCreator(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { linker = new LinuxSymLinkCreator(); } else { linker = new OSXSymLinkCreator(); } } return(linker); }