예제 #1
0
 /// <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();
     }
 }
예제 #2
0
 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);
 }