# Create the service tokens folder $SERVICE_TOKENS_FOLDER_RELATIVE_PATH = Join-Path -Path $PSScriptRoot -ChildPath "..\samples\ComputeSharp.SwapChain.Uwp\Assets\Generated" if(!(Test-Path -Path $SERVICE_TOKENS_FOLDER_RELATIVE_PATH)) { New-Item -ItemType directory -Path $SERVICE_TOKENS_FOLDER_RELATIVE_PATH } $SERVICE_TOKENS_FOLDER_PATH = Resolve-Path -Path $SERVICE_TOKENS_FOLDER_RELATIVE_PATH # Service tokens $SERVICE_TOKENS_NAME = "ServiceTokens.g.cs" $SERVICE_TOKENS_PATH = Join-Path -Path $SERVICE_TOKENS_FOLDER_PATH -ChildPath $SERVICE_TOKENS_NAME if (!(Test-Path -Path $SERVICE_TOKENS_PATH)) { # Prepare the generated source $SERVICE_TOKENS_TEXT = @" // #pragma warning disable #nullable enable namespace ComputeSharp.SwapChain.Uwp; /// /// A with some secret service tokens. /// public static class ServiceTokens { /// /// The secret token for the AppService connection. /// #if RELEASE internal const string AppService = ""; #else internal const string AppService = ""; #endif } "@.Trim() # Output the source to the target file Add-Content $SERVICE_TOKENS_TEXT -Path $SERVICE_TOKENS_PATH -NoNewline }