コード例 #1
0
ファイル: LicenseManager.cs プロジェクト: Algoryx/AGXUnity
 /// <summary>
 /// Predefined license file name given license type.
 /// </summary>
 /// <param name="type">License type.</param>
 /// <returns>Predefined license filename for given license type.</returns>
 public static string GetLicenseExtension(LicenseInfo.LicenseType type)
 {
     return(s_licenseExtensions[(int)type]);
 }
コード例 #2
0
ファイル: LicenseManager.cs プロジェクト: Algoryx/AGXUnity
 /// <summary>
 /// Searches all directories from application/project root for
 /// license files of given license type.
 /// </summary>
 /// <param name="type">License type to check for.</param>
 /// <returns>Array of license files (absolute path).</returns>
 public static string[] FindLicenseFiles(LicenseInfo.LicenseType type)
 {
     return(Directory.GetFiles(".",
                               $"*{GetLicenseExtension( type )}",
                               SearchOption.AllDirectories).Select(filename => filename.PrettyPath()).ToArray());
 }