MegaBites-AI/Windows-powershell
0372
1// Copyright (c) Microsoft Corporation.2// Licensed under the MIT License.3 4namespace System.Management.Automation5{6 /// <summary>7 /// Holds the #defines for any special strings used in session state.8 /// </summary>9 internal static class StringLiterals10 {11 // constants12 13 /// <summary>14 /// The separator used in provider base paths. The format is15 /// providerId::providerPath.16 /// </summary>17 internal const string ProviderPathSeparator = "::";18 19 /// <summary>20 /// The default path separator used by the base implementation of the providers.21 ///22 /// Porting note: IO.Path.DirectorySeparatorChar is correct for all platforms. On Windows,23 /// it is '\', and on Linux, it is '/', as expected.24 /// </summary>25 internal static readonly char DefaultPathSeparator = System.IO.Path.DirectorySeparatorChar;26 internal static readonly string DefaultPathSeparatorString = DefaultPathSeparator.ToString();27 28 /// <summary>29 /// The alternate path separator used by the base implementation of the providers.30 ///31 /// Porting note: we do not use .NET's AlternatePathSeparatorChar here because it correctly32 /// states that both the default and alternate are '/' on Linux. However, for PowerShell to33 /// be "slash agnostic", we need to use the assumption that a '\' is the alternate path34 /// separator on Linux.35 /// </summary>36 internal static readonly char AlternatePathSeparator = Platform.IsWindows ? '/' : '\\';37 internal static readonly string AlternatePathSeparatorString = AlternatePathSeparator.ToString();38 39 /// <summary>40 /// The default path prefix for remote paths. This is to mimic41 /// UNC paths in the file system.42 /// </summary>43 internal const string DefaultRemotePathPrefix = "\\\\";44 45 /// <summary>46 /// The alternate path prefix for remote paths. This is to mimic47 /// UNC paths in the file system.48 /// </summary>49 internal const string AlternateRemotePathPrefix = "//";50 51 /// <summary>52 /// The character used in a path to indicate the home location.53 /// </summary>54 internal const string HomePath = "~";55 56 /// <summary>57 /// Name of the global variable table in Variable scopes of session state.58 /// </summary>59 internal const string Global = "GLOBAL";60 61 /// <summary>62 /// Name of the current scope variable table of session state.63 /// </summary>64 internal const string Local = "LOCAL";65 66 /// <summary>67 /// When prefixing a variable "private" makes the variable68 /// only visible in the current scope.69 /// </summary>70 internal const string Private = "PRIVATE";71 72 /// <summary>73 /// When prefixing a variable "script" makes the variable74 /// global to the script but not global to the entire session.75 /// </summary>76 internal const string Script = "SCRIPT";77 78 /// <summary>79 /// Session state string used as resource name in exceptions.80 /// </summary>81 internal const string SessionState = "SessionState";82 83 /// <summary>84 /// The file extension (including the dot) of an PowerShell script file.85 /// </summary>86 internal const string PowerShellScriptFileExtension = ".ps1";87 88 /// <summary>89 /// The file extension (including the dot) of an PowerShell module file.90 /// </summary>91 internal const string PowerShellModuleFileExtension = ".psm1";92 93 /// <summary>94 /// The file extension (including the dot) of an Mof file.95 /// </summary>96 internal const string PowerShellMofFileExtension = ".mof";97 98 /// <summary>99 /// The file extension (including the dot) of a PowerShell cmdletization file.100 /// </summary>101 internal const string PowerShellCmdletizationFileExtension = ".cdxml";102 103 /// <summary>104 /// The file extension (including the dot) of a PowerShell declarative session configuration file.105 /// </summary>106 internal const string PowerShellDISCFileExtension = ".pssc";107 108 /// <summary>109 /// The file extension (including the dot) of a PowerShell role capability file.110 /// </summary>111 internal const string PowerShellRoleCapabilityFileExtension = ".psrc";112 113 /// <summary>114 /// The file extension (including the dot) of an PowerShell data file.115 /// </summary>116 internal const string PowerShellDataFileExtension = ".psd1";117 118 /// <summary>119 /// The file extension (including the dot) of an workflow dependent assembly.120 /// </summary>121 internal const string PowerShellILAssemblyExtension = ".dll";122 123 /// <summary>124 /// The file extension (including the dot) of an workflow dependent Ngen assembly.125 /// </summary>126 internal const string PowerShellNgenAssemblyExtension = ".ni.dll";127 128 /// <summary>129 /// The file extension (including the dot) of an executable file.130 /// </summary>131 internal const string PowerShellILExecutableExtension = ".exe";132 133 internal const string PowerShellConsoleFileExtension = ".psc1";134 135 /// <summary>136 /// The default verb/noun separator for a command. verb-noun or verb/noun.137 /// </summary>138 internal const char CommandVerbNounSeparator = '-';139 140 /// <summary>141 /// The default verb to try if the command was not resolved.142 /// </summary>143 internal const string DefaultCommandVerb = "get";144 145 /// <summary>146 /// The default extension for a help file relative to its code assembly name.147 /// </summary>148 internal const string HelpFileExtension = "-Help.xml";149 150 /// <summary>151 /// The language representation of null.152 /// </summary>153 internal const string DollarNull = "$null";154 155 /// <summary>156 /// The language representation of null.157 /// </summary>158 internal const string Null = "null";159 160 /// <summary>161 /// The language representation of false.162 /// </summary>163 internal const string False = "false";164 165 /// <summary>166 /// The language representation of true.167 /// </summary>168 internal const string True = "true";169 170 /// <summary>171 /// The escape character used in the language.172 /// </summary>173 internal const char EscapeCharacter = '`';174 175 /// <summary>176 /// The default cmdlet adapter for cmdletization / cdxml modules.177 /// </summary>178 internal const string DefaultCmdletAdapter = "Microsoft.PowerShell.Cmdletization.Cim.CimCmdletAdapter, Microsoft.PowerShell.Commands.Management, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";179 }180}181 