Minor fixes to build

nullableenabled
David Hall 2023-06-29 08:12:57 -06:00
parent 83c64b7082
commit a5b9405b8e
2 changed files with 4 additions and 3 deletions

View File

@ -2,11 +2,12 @@ global using System;
global using System.Runtime.InteropServices;
global using Vanara.InteropServices;
global using SCARDCONTEXT = nuint;
using System.Linq;
using System.Text;
using Vanara.Extensions;
using SCARDCONTEXT = System.UIntPtr;
namespace Vanara.PInvoke;
/// <summary>

View File

@ -196,7 +196,7 @@ public static class PathEx
/// </summary>
/// <param name="path">The UNC path.</param>
/// <returns>On success, the server portion of the UNC path. On failure, <see langword="null"/> is returned.</returns>
public static string GetUNCServer(string path) => PathIsUNCEx(path, out var ptr) ? ptr.ToString() : null;
public static string? GetUNCServer(string path) => PathIsUNCEx(path, out var ptr) ? ptr.ToString() : null;
/// <summary>
/// Searches a path to determine if it contains a valid prefix of the type passed by <paramref name="prefix"/>. A prefix is one of
@ -214,7 +214,7 @@ public static class PathEx
/// A string with the matching suffix if successful, or <see langword="null"/> if <paramref name="path"/> does not end with one of
/// the specified suffixes.
/// </returns>
public static string HasSuffix(string path, string[] suffixes) => Vanara.Extensions.StringHelper.GetString(PathFindSuffixArray(path, suffixes, suffixes.Length));
public static string HasSuffix(string path, string[] suffixes) => PathFindSuffixArray(path, suffixes, suffixes.Length).ToString();
/// <summary>Compares two paths to determine if they have a common root component.</summary>
/// <param name="path1">A string of maximum length MAX_PATH that contains the first path to be compared.</param>