spelling: comments in src/System.Management.Automation/namespaces
This commit is contained in:
parent
7c364575c2
commit
c1f622ac7f
|
@ -19,7 +19,7 @@ namespace System.Management.Automation.Provider
|
|||
/// the use of a set of core commands against the objects that the provider
|
||||
/// gives access to. By deriving from this class users can take advantage of
|
||||
/// all the features of the <see cref="ItemCmdletProvider"/> as well as
|
||||
/// globbing and the following commands when targetting this provider:
|
||||
/// globbing and the following commands when targeting this provider:
|
||||
/// get-childitem
|
||||
/// rename-item
|
||||
/// new-item
|
||||
|
@ -100,7 +100,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object GetChildItemsDynamicParameters(
|
||||
|
@ -181,7 +181,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Providers override this method if they support a native filteing syntax that
|
||||
/// Providers override this method if they support a native filtering syntax that
|
||||
/// can offer performance improvements over wildcard matching done by the PowerShell
|
||||
/// engine.
|
||||
/// If the provider can handle a portion (or all) of the PowerShell wildcard with
|
||||
|
@ -229,7 +229,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object GetChildNamesDynamicParameters(
|
||||
|
@ -701,7 +701,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object GetChildItemsDynamicParameters(string path, bool recurse)
|
||||
{
|
||||
|
@ -785,7 +785,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Providers override this method if they support a native filteing syntax that
|
||||
/// Providers override this method if they support a native filtering syntax that
|
||||
/// can offer performance improvements over wildcard matching done by the PowerShell
|
||||
/// engine.
|
||||
/// If the provider can handle a portion (or all) of the PowerShell wildcard with
|
||||
|
@ -830,7 +830,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object GetChildNamesDynamicParameters(string path)
|
||||
{
|
||||
|
@ -908,7 +908,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object RenameItemDynamicParameters(string path, string newName)
|
||||
{
|
||||
|
@ -995,7 +995,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object NewItemDynamicParameters(
|
||||
string path,
|
||||
|
@ -1077,7 +1077,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object RemoveItemDynamicParameters(
|
||||
string path,
|
||||
|
@ -1205,7 +1205,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object CopyItemDynamicParameters(
|
||||
string path,
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace System.Management.Automation
|
|||
/// This allows the providers to be called in a variety of situations.
|
||||
/// The most common will be from the core cmdlets themselves but they
|
||||
/// can also be called programmatically either by having the results
|
||||
/// accumulated or by providing delgates for the various streams.
|
||||
/// accumulated or by providing delegates for the various streams.
|
||||
///
|
||||
/// NOTE: USER Feedback mechanism are only enabled for the CoreCmdlet
|
||||
/// case. This is because we have not seen a use-case for them in the
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object NewDriveDynamicParameters()
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
///
|
||||
/// <remarks>
|
||||
/// Note, this class does no specific error handling. All errors are allowed to
|
||||
/// propogate to the caller so that they can be written to the error pipeline
|
||||
/// propagate to the caller so that they can be written to the error pipeline
|
||||
/// if necessary.
|
||||
/// </remarks>
|
||||
///
|
||||
|
@ -556,7 +556,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
// If the delimiter is at the end of the file, we need to read one more
|
||||
// to get to the right position. For example:
|
||||
// ua123ua456ua -- -Tail 1
|
||||
// If we read backward only once, we get 'ua', and cannot get to the rigth position
|
||||
// If we read backward only once, we get 'ua', and cannot get to the right position
|
||||
// So we read one more time, get 'ua456ua', and then we can get the right position
|
||||
lastDelimiterMatch = (string)blocks[0];
|
||||
if (currentBlock == 0 && lastDelimiterMatch.Equals(actualDelimiter, StringComparison.Ordinal))
|
||||
|
@ -643,7 +643,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
// dealing with a "find the substring" algorithm, but with
|
||||
// the additional restriction that we cannot read past the
|
||||
// end of the delimiter. If we read past the end of the delimiter,
|
||||
// then we'll eat up bytes that we nede from the filestream.
|
||||
// then we'll eat up bytes that we need from the filestream.
|
||||
// The solution is a modified Boyer-Moore string search algorithm.
|
||||
// This version retains the sub-linear search performance (via the
|
||||
// lookup tables,) but offloads much of the dirty work to the
|
||||
|
@ -1469,7 +1469,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
// The BufferSize will be a multiple of 4, so we can just read toRead number of bytes
|
||||
// if the current file is encoded by any of these formatting
|
||||
|
||||
// If IsSignleByteCharacterSet() reutrns true, we are sure that the given encoding is OEM
|
||||
// If IsSingleByteCharacterSet() returns true, we are sure that the given encoding is OEM
|
||||
// or Default, and it is SBCS(single byte character set) code page -- one byte per character
|
||||
_currentPosition = _stream.Position;
|
||||
_byteCount = _stream.Read(_byteBuff, 0, toRead);
|
||||
|
|
|
@ -484,7 +484,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// <summary>
|
||||
/// MapNetworkDrive facilitates to map the newly created PS Drive to a network share.
|
||||
/// </summary>
|
||||
/// <param name="drive">The PSDrive infor that would be used to create a new PS drive.</param>
|
||||
/// <param name="drive">The PSDrive info that would be used to create a new PS drive.</param>
|
||||
private void MapNetworkDrive(PSDriveInfo drive)
|
||||
{
|
||||
// Porting note: mapped network drives are only supported on Windows
|
||||
|
@ -509,7 +509,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
const int RESOURCEDISPLAYTYPE_GENERIC = 0x00000000;
|
||||
const int RESOURCEUSAGE_CONNECTABLE = 0x00000001;
|
||||
|
||||
// By deafult the connection is not persisted.
|
||||
// By default the connection is not persisted.
|
||||
int CONNECT_TYPE = CONNECT_NOPERSIST;
|
||||
|
||||
string driveName = null;
|
||||
|
@ -572,7 +572,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
finally
|
||||
{
|
||||
// Clear the passward in the memory.
|
||||
// Clear the password in the memory.
|
||||
if (passwd != null)
|
||||
{
|
||||
Array.Clear(passwd, 0, passwd.Length - 1);
|
||||
|
@ -694,7 +694,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
// By default buffer size is set to 300 which would generally be sufficient in most of the cases.
|
||||
int bufferSize = 300;
|
||||
#if DEBUG
|
||||
// In Debug mode buffer size is initially set to 3 and if additial buffer is required, the
|
||||
// In Debug mode buffer size is initially set to 3 and if additional buffer is required, the
|
||||
// required buffer size is allocated and the WNetGetConnection API is executed with the newly
|
||||
// allocated buffer size.
|
||||
bufferSize = 3;
|
||||
|
@ -749,7 +749,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
string associatedPath = null;
|
||||
if (!string.IsNullOrEmpty(driveName) && driveName.Length == 1)
|
||||
{
|
||||
// By default buffer size is set to 300 which would generatlly be sufficient in most of the cases.
|
||||
// By default buffer size is set to 300 which would generally be sufficient in most of the cases.
|
||||
int bufferSize = 300;
|
||||
var pathInfo = new StringBuilder(bufferSize);
|
||||
driveName += ':';
|
||||
|
@ -1237,7 +1237,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
|
||||
bool filterHidden = false; // "Hidden" is specified somewhere in the expression
|
||||
bool switchFilterHidden = false; // "Hidden" is specified somewhere in the paramters
|
||||
bool switchFilterHidden = false; // "Hidden" is specified somewhere in the parameters
|
||||
|
||||
if (null != evaluator)
|
||||
{
|
||||
|
@ -1248,7 +1248,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
switchFilterHidden = switchEvaluator.ExistsInExpression(FileAttributes.Hidden);
|
||||
}
|
||||
|
||||
// if "Hidden" is specified in the attribute filter dynamic paramters
|
||||
// if "Hidden" is specified in the attribute filter dynamic parameters
|
||||
// also return the object
|
||||
if (exists && !directory && (!hidden || Force || showHidden || filterHidden || switchFilterHidden))
|
||||
{
|
||||
|
@ -1274,7 +1274,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
directoryObj.FullName,
|
||||
StringComparison.OrdinalIgnoreCase) == 0;
|
||||
|
||||
// if "Hidden" is specified in the attribute filter dynamic paramters
|
||||
// if "Hidden" is specified in the attribute filter dynamic parameters
|
||||
// also return the object
|
||||
if (exists && (isRootPath || !hidden || Force || showHidden || filterHidden || switchFilterHidden))
|
||||
{
|
||||
|
@ -1531,7 +1531,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
bool attributeFilter = true;
|
||||
bool switchAttributeFilter = true;
|
||||
bool filterHidden = false; // "Hidden" is specified somewhere in the expression
|
||||
bool switchFilterHidden = false; // "Hidden" is specified somewhere in the paramters
|
||||
bool switchFilterHidden = false; // "Hidden" is specified somewhere in the parameters
|
||||
|
||||
if (null != evaluator)
|
||||
{
|
||||
|
@ -1540,7 +1540,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
if (null != switchEvaluator)
|
||||
{
|
||||
switchAttributeFilter = switchEvaluator.Evaluate(fileInfo.Attributes); // switch paramters
|
||||
switchAttributeFilter = switchEvaluator.Evaluate(fileInfo.Attributes); // switch parameters
|
||||
switchFilterHidden = switchEvaluator.ExistsInExpression(FileAttributes.Hidden);
|
||||
}
|
||||
|
||||
|
@ -1661,7 +1661,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
}
|
||||
if (null != switchEvaluator)
|
||||
{
|
||||
switchAttributeFilter = switchEvaluator.Evaluate(filesystemInfo.Attributes); // switch paramters
|
||||
switchAttributeFilter = switchEvaluator.Evaluate(filesystemInfo.Attributes); // switch parameters
|
||||
switchFilterHidden = switchEvaluator.ExistsInExpression(FileAttributes.Hidden);
|
||||
}
|
||||
|
||||
|
@ -1758,7 +1758,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
/// <summary>
|
||||
/// Create an enum expression evaluator for user-specified attribute filtering
|
||||
/// switch paramters.
|
||||
/// switch parameters.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// If any attribute filtering switch parameters are set,
|
||||
|
@ -3269,7 +3269,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected override object ItemExistsDynamicParameters(string path)
|
||||
{
|
||||
|
@ -4117,7 +4117,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
{
|
||||
bool result = PerformCopyFileFromRemoteSession(sourceFileFullName, destinationFile, destinationPath, force, ps, fileSize, false, null);
|
||||
|
||||
// Copying the file from the remote session completed sucessfully
|
||||
// Copying the file from the remote session completed successfully
|
||||
if (result)
|
||||
{
|
||||
// Check if the remote source file has any alternate data streams
|
||||
|
@ -4610,7 +4610,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
bool targetSupportsAlternateStreams = RemoteTargetSupportsAlternateStreams(ps, remoteFilePath);
|
||||
|
||||
// Once the file is copied sucessfully, check if the file has any alternate data streams
|
||||
// Once the file is copied successfully, check if the file has any alternate data streams
|
||||
if (result && targetSupportsAlternateStreams)
|
||||
{
|
||||
foreach (AlternateStreamData stream in AlternateDataStreamUtilities.GetStreams(file.FullName))
|
||||
|
@ -4737,7 +4737,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
// Since UNC paths must have "\\server\share" as the base of
|
||||
// the path, you cannot get a parent path higher than this.
|
||||
// So this looks for the path separator between server\share and
|
||||
// ensures that it is in a position where it is preceeded by
|
||||
// ensures that it is in a position where it is preceded by
|
||||
// "\\s" at a minimum.
|
||||
|
||||
int indexOfLastPathSeparator = parentPath.LastIndexOf('\\');
|
||||
|
@ -5058,9 +5058,9 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// is encouraged that the provider actually use the path to lookup in its store
|
||||
/// and create a relative path that matches the casing, and standardized path syntax.
|
||||
///
|
||||
/// Note, the base class implemenation uses GetParentPath, GetChildName, and MakePath
|
||||
/// Note, the base class implementation uses GetParentPath, GetChildName, and MakePath
|
||||
/// to normalize the path and then make it relative to basePath. All string comparisons
|
||||
/// are done using StringComparison.InvariantCultureIngoreCase.
|
||||
/// are done using StringComparison.InvariantCultureIgnoreCase.
|
||||
/// </remarks>
|
||||
///
|
||||
private string NormalizeRelativePathHelper(string path, string basePath)
|
||||
|
@ -5291,7 +5291,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
///
|
||||
/// <returns>
|
||||
/// A stack containing the tokenized path with leaf elements on the bottom
|
||||
/// of the stack and the most ancestoral parent at the top.
|
||||
/// of the stack and the most ancestral parent at the top.
|
||||
/// </returns>
|
||||
///
|
||||
private Stack<string> TokenizePathToStack(string path, string basePath)
|
||||
|
@ -5344,7 +5344,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // TokenizePathToStack
|
||||
|
||||
/// <summary>
|
||||
/// Given the tokenized path, the relative pathing elements are removed.
|
||||
/// Given the tokenized path, the relative path elements are removed.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="basepath">
|
||||
|
@ -5353,13 +5353,13 @@ namespace Microsoft.PowerShell.Commands
|
|||
///
|
||||
/// <param name="tokenizedPathStack">
|
||||
/// A stack containing path elements where the leaf most element is at
|
||||
/// the bottom of the stack and the most ancestoral parent is on the top.
|
||||
/// the bottom of the stack and the most ancestral parent is on the top.
|
||||
/// Generally this stack comes from TokenizePathToStack().
|
||||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// A stack in reverse order with the path elements normalized and all relative
|
||||
/// pathing tokens removed.
|
||||
/// path tokens removed.
|
||||
/// </returns>
|
||||
///
|
||||
private Stack<string> NormalizeThePath(string basepath, Stack<string> tokenizedPathStack)
|
||||
|
@ -6115,7 +6115,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // GetProperty
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the get-itemproperty cmdlet.
|
||||
/// Gets the dynamic property parameters required by the get-itemproperty cmdlet.
|
||||
/// This feature is not required by the File System provider.
|
||||
/// </summary>
|
||||
///
|
||||
|
@ -6317,7 +6317,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // SetProperty
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the set-itemproperty cmdlet.
|
||||
/// Gets the dynamic property parameters required by the set-itemproperty cmdlet.
|
||||
/// This feature is not required by the File System provider.
|
||||
/// </summary>
|
||||
///
|
||||
|
@ -6450,7 +6450,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // ClearProperty
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the clear-itemproperty cmdlet.
|
||||
/// Gets the dynamic property parameters required by the clear-itemproperty cmdlet.
|
||||
/// This feature is not required by the File System provider.
|
||||
/// </summary>
|
||||
///
|
||||
|
@ -6622,7 +6622,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // GetContentReader
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the get-content cmdlet.
|
||||
/// Gets the dynamic property parameters required by the get-content cmdlet.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="path">
|
||||
|
@ -6744,7 +6744,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // GetContentWriter
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the set-content and
|
||||
/// Gets the dynamic property parameters required by the set-content and
|
||||
/// add-content cmdlets.
|
||||
/// </summary>
|
||||
///
|
||||
|
@ -6894,7 +6894,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
FileStream fileStream = new FileStream(path, FileMode.Truncate, FileAccess.Write, FileShare.Write);
|
||||
fileStream.Dispose();
|
||||
|
||||
//For filesystem once content is cleare
|
||||
//For filesystem once content is cleared
|
||||
WriteItemObject("", path, false);
|
||||
}
|
||||
catch (UnauthorizedAccessException failure)
|
||||
|
@ -6915,7 +6915,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
} // ClearContent
|
||||
|
||||
/// <summary>
|
||||
/// Gets the dynamic propery parameters required by the clear-content cmdlet.
|
||||
/// Gets the dynamic property parameters required by the clear-content cmdlet.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="path">
|
||||
|
@ -7054,20 +7054,20 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// <summary>
|
||||
/// WNetAddConnection2 API makes a connection to a network resource
|
||||
/// and can redirect a local device to the network resource.
|
||||
/// This API simulates the "new Use" funcationality used to connect to
|
||||
/// This API simulates the "new Use" functionality used to connect to
|
||||
/// network resource.
|
||||
/// </summary>
|
||||
/// <param name="netResource">
|
||||
/// The The netResource structure contains information
|
||||
/// about a network resource.</param>
|
||||
/// <param name="password">
|
||||
/// The passward used to get connected to network resource.
|
||||
/// The password used to get connected to network resource.
|
||||
/// </param>
|
||||
/// <param name="username">
|
||||
/// The username used to get connected to network resource.
|
||||
/// </param>
|
||||
/// <param name="flags">
|
||||
/// The flags paramter is used to indicate if the created network
|
||||
/// The flags parameter is used to indicate if the created network
|
||||
/// resource has to be persisted or not.
|
||||
/// </param>
|
||||
/// <returns>If connection is established to the network resource
|
||||
|
@ -7211,7 +7211,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
/// <param name="name">Path of the symbolic link.</param>
|
||||
/// <param name="destination">Path of the target of the symbolic link.</param>
|
||||
/// <param name="destinationType">0 for destionation as file and 1 for destination as directory.</param>
|
||||
/// <param name="destinationType">0 for destination as file and 1 for destination as directory.</param>
|
||||
/// <returns>1 on successful creation.</returns>
|
||||
[DllImport(PinvokeDllNames.CreateSymbolicLinkDllName, CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
internal static extern int CreateSymbolicLink(string name, string destination, int destinationType);
|
||||
|
@ -8299,7 +8299,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
if (reparseDataBuffer.ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
|
||||
{
|
||||
//Since this is a junction we need to unmarshall to the correct structure.
|
||||
//Since this is a junction we need to unmarshal to the correct structure.
|
||||
REPARSE_DATA_BUFFER_MOUNTPOINT reparseDataBufferMountPoint = ClrFacade.PtrToStructure<REPARSE_DATA_BUFFER_MOUNTPOINT>(outBuffer);
|
||||
|
||||
targetDir = Encoding.Unicode.GetString(reparseDataBufferMountPoint.PathBuffer, reparseDataBufferMountPoint.SubstituteNameOffset, reparseDataBufferMountPoint.SubstituteNameLength);
|
||||
|
@ -8898,7 +8898,7 @@ namespace System.Management.Automation.Internal
|
|||
return $op
|
||||
}}
|
||||
|
||||
# Retuns a hashtable with the following members:
|
||||
# Returns a hashtable with the following members:
|
||||
# BytesWritten - number of bytes written to an alternate file stream
|
||||
#
|
||||
function PSCopyFileAlternateStreamToRemoteSession
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object GetContentReaderDynamicParameters(string path);
|
||||
|
||||
|
@ -113,7 +113,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object GetContentWriterDynamicParameters(string path);
|
||||
|
||||
|
@ -154,7 +154,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object ClearContentDynamicParameters(string path);
|
||||
} // IContentCmdletProvider
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </param>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The implemenation of this method moves the content reader <paramref name="offset"/>
|
||||
/// The implementation of this method moves the content reader <paramref name="offset"/>
|
||||
/// number of blocks from the specified <paramref name="origin"/>. See <see cref="IContentReader.Read"/>
|
||||
/// for a description of what a block is.
|
||||
/// </remarks>
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </param>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The implemenation of this method moves the content writer <paramref name="offset"/>
|
||||
/// The implementation of this method moves the content writer <paramref name="offset"/>
|
||||
/// number of blocks from the specified <paramref name="origin"/>. See <see cref="System.Management.Automation.Provider.IContentWriter.Write(IList)"/>
|
||||
/// for a description of what a block is.
|
||||
/// </remarks>
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object NewPropertyDynamicParameters(
|
||||
string path,
|
||||
|
@ -157,7 +157,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object RemovePropertyDynamicParameters(
|
||||
string path,
|
||||
|
@ -224,7 +224,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object RenamePropertyDynamicParameters(
|
||||
string path,
|
||||
|
@ -301,7 +301,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object CopyPropertyDynamicParameters(
|
||||
string sourcePath,
|
||||
|
@ -378,7 +378,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object MovePropertyDynamicParameters(
|
||||
string sourcePath,
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace System.Management.Automation.Provider
|
|||
///
|
||||
/// <returns>
|
||||
/// Nothing. Write the security descriptor to the context's pipeline for
|
||||
/// the item specifed by the path using the WriteSecurityDescriptorObject
|
||||
/// the item specified by the path using the WriteSecurityDescriptorObject
|
||||
/// method.
|
||||
/// </returns>
|
||||
void GetSecurityDescriptor(
|
||||
|
@ -63,7 +63,7 @@ namespace System.Management.Automation.Provider
|
|||
/// <returns>
|
||||
/// Nothing. After setting the security descriptor to the value passed in,
|
||||
/// write the new security descriptor to the context's pipeline for the
|
||||
/// item specifed by the path using the WriteSecurityDescriptorObject method.
|
||||
/// item specified by the path using the WriteSecurityDescriptorObject method.
|
||||
/// </returns>
|
||||
///
|
||||
void SetSecurityDescriptor(
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object GetPropertyDynamicParameters(
|
||||
string path,
|
||||
|
@ -152,7 +152,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object SetPropertyDynamicParameters(
|
||||
string path,
|
||||
|
@ -213,7 +213,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
object ClearPropertyDynamicParameters(
|
||||
string path,
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object GetItemDynamicParameters(string path, CmdletProviderContext context)
|
||||
|
@ -139,7 +139,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object SetItemDynamicParameters(
|
||||
|
@ -197,7 +197,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object ClearItemDynamicParameters(
|
||||
|
@ -255,7 +255,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object InvokeDefaultActionDynamicParameters(
|
||||
|
@ -325,7 +325,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
///
|
||||
internal object ItemExistsDynamicParameters(
|
||||
|
@ -356,7 +356,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// This test should not verify the existance of the item at the path. It should
|
||||
/// This test should not verify the existence of the item at the path. It should
|
||||
/// only perform syntactic and semantic validation of the path. For instance, for
|
||||
/// the file system provider, that path should be canonicalized, syntactically verified,
|
||||
/// and ensure that the path does not refer to a device.
|
||||
|
@ -455,7 +455,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object GetItemDynamicParameters(string path)
|
||||
{
|
||||
|
@ -526,7 +526,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object SetItemDynamicParameters(string path, object value)
|
||||
{
|
||||
|
@ -588,7 +588,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object ClearItemDynamicParameters(string path)
|
||||
{
|
||||
|
@ -611,7 +611,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// The default implemenation does nothing.
|
||||
/// The default implementation does nothing.
|
||||
///
|
||||
/// Providers override this method to give the user the ability to invoke provider objects using
|
||||
/// the invoke-item cmdlet. Think of the invocation as a double click in the Windows Shell. This
|
||||
|
@ -651,7 +651,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object InvokeDefaultActionDynamicParameters(string path)
|
||||
{
|
||||
|
@ -685,7 +685,7 @@ namespace System.Management.Automation.Provider
|
|||
/// of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those
|
||||
/// requirements by accessing the appropriate property from the base class.
|
||||
///
|
||||
/// The implemenation of this method should take into account any form of access to the object that may
|
||||
/// The implementation of this method should take into account any form of access to the object that may
|
||||
/// make it visible to the user. For instance, if a user has write access to a file in the file system
|
||||
/// provider bug not read access, the file still exists and the method should return true. Sometimes this
|
||||
/// may require checking the parent to see if the child can be enumerated.
|
||||
|
@ -717,7 +717,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object ItemExistsDynamicParameters(string path)
|
||||
{
|
||||
|
@ -742,7 +742,7 @@ namespace System.Management.Automation.Provider
|
|||
/// </returns>
|
||||
///
|
||||
/// <remarks>
|
||||
/// This test should not verify the existance of the item at the path. It should
|
||||
/// This test should not verify the existence of the item at the path. It should
|
||||
/// only perform syntactic and semantic validation of the path. For instance, for
|
||||
/// the file system provider, that path should be canonicalized, syntactically verified,
|
||||
/// and ensure that the path does not refer to a device.
|
||||
|
|
|
@ -1053,7 +1053,7 @@ namespace System.Management.Automation
|
|||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// A provider specifc path that the Msh path represents.
|
||||
/// A provider specific path that the Msh path represents.
|
||||
/// </returns>
|
||||
///
|
||||
/// <exception cref="ArgumentNullException">
|
||||
|
@ -1114,7 +1114,7 @@ namespace System.Management.Automation
|
|||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// A provider specifc path that the Msh path represents.
|
||||
/// A provider specific path that the Msh path represents.
|
||||
/// </returns>
|
||||
///
|
||||
/// <exception cref="ArgumentNullException">
|
||||
|
@ -1198,7 +1198,7 @@ namespace System.Management.Automation
|
|||
/// </param>
|
||||
///
|
||||
/// <returns>
|
||||
/// A provider specifc path that the Msh path represents.
|
||||
/// A provider specific path that the Msh path represents.
|
||||
/// </returns>
|
||||
///
|
||||
/// <exception cref="ArgumentNullException">
|
||||
|
@ -1330,7 +1330,7 @@ namespace System.Management.Automation
|
|||
/// Returns a provider specific path for given PowerShell path.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to resolve</param>
|
||||
/// <param name="context">Cmdlet contet</param>
|
||||
/// <param name="context">Cmdlet context</param>
|
||||
/// <param name="isTrusted">When true bypass trust check</param>
|
||||
/// <param name="provider">Provider</param>
|
||||
/// <param name="drive">Drive</param>
|
||||
|
@ -1794,7 +1794,7 @@ namespace System.Management.Automation
|
|||
private SessionState _sessionState;
|
||||
|
||||
/// <summary>
|
||||
/// Removs the back tick "`" from any of the glob characters in the path.
|
||||
/// Removes the back tick "`" from any of the glob characters in the path.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="path">
|
||||
|
@ -2009,7 +2009,7 @@ namespace System.Management.Automation
|
|||
|
||||
// This will resolve $GLOBAL, and $LOCAL as needed.
|
||||
// This throws DriveNotFoundException if a drive of the specified
|
||||
// name does not exist. Just let the exception propogate out.
|
||||
// name does not exist. Just let the exception propagate out.
|
||||
try
|
||||
{
|
||||
workingDriveForPath = _sessionState.Drive.Get(driveName);
|
||||
|
|
|
@ -582,9 +582,9 @@ namespace System.Management.Automation.Provider
|
|||
/// is encouraged that the provider actually use the path to lookup in its store
|
||||
/// and create a relative path that matches the casing, and standardized path syntax.
|
||||
///
|
||||
/// Note, the base class implemenation uses GetParentPath, GetChildName, and MakePath
|
||||
/// Note, the base class implementation uses GetParentPath, GetChildName, and MakePath
|
||||
/// to normalize the path and then make it relative to basePath. All string comparisons
|
||||
/// are done using StringComparison.InvariantCultureIngoreCase.
|
||||
/// are done using StringComparison.InvariantCultureIgnoreCase.
|
||||
/// </remarks>
|
||||
protected virtual string NormalizeRelativePath(
|
||||
string path,
|
||||
|
@ -952,7 +952,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object MoveItemDynamicParameters(
|
||||
string path,
|
||||
|
@ -1047,7 +1047,7 @@ namespace System.Management.Automation.Provider
|
|||
///
|
||||
/// <returns>
|
||||
/// A stack containing the tokenized path with leaf elements on the bottom
|
||||
/// of the stack and the most ancestoral parent at the top.
|
||||
/// of the stack and the most ancestral parent at the top.
|
||||
/// </returns>
|
||||
///
|
||||
private Stack<string> TokenizePathToStack(string path, string basePath)
|
||||
|
@ -1087,12 +1087,12 @@ namespace System.Management.Automation.Provider
|
|||
} // TokenizePathToStack
|
||||
|
||||
/// <summary>
|
||||
/// Given the tokenized path, the relative pathing elements are removed.
|
||||
/// Given the tokenized path, the relative path elements are removed.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="tokenizedPathStack">
|
||||
/// A stack containing path elements where the leaf most element is at
|
||||
/// the bottom of the stack and the most ancestoral parent is on the top.
|
||||
/// the bottom of the stack and the most ancestral parent is on the top.
|
||||
/// Generally this stack comes from TokenizePathToStack().
|
||||
/// </param>
|
||||
///
|
||||
|
@ -1110,7 +1110,7 @@ namespace System.Management.Automation.Provider
|
|||
///
|
||||
/// <returns>
|
||||
/// A stack in reverse order with the path elements normalized and all relative
|
||||
/// pathing tokens removed.
|
||||
/// path tokens removed.
|
||||
/// </returns>
|
||||
///
|
||||
private static Stack<string> NormalizeThePath(
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace System.Management.Automation.Provider
|
|||
|
||||
/// <summary>
|
||||
/// Checks whether the filter of the provider is set.
|
||||
/// Can be overriden by derived class when additional filters are defined.
|
||||
/// Can be overridden by derived class when additional filters are defined.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// Whether the filter of the provider is set.
|
||||
|
@ -226,7 +226,7 @@ namespace System.Management.Automation.Provider
|
|||
Context = cmdletProviderContext;
|
||||
|
||||
return StartDynamicParameters();
|
||||
} // StartDynamicParmaters
|
||||
} // StartDynamicParameter
|
||||
|
||||
/// <summary>
|
||||
/// Called when the provider is being removed. It sets the context
|
||||
|
@ -1713,7 +1713,7 @@ namespace System.Management.Automation.Provider
|
|||
/// parsing attributes similar to a cmdlet class or a
|
||||
/// <see cref="System.Management.Automation.RuntimeDefinedParameterDictionary"/>.
|
||||
///
|
||||
/// The default implemenation returns null. (no additional parameters)
|
||||
/// The default implementation returns null. (no additional parameters)
|
||||
/// </returns>
|
||||
protected virtual object StartDynamicParameters()
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace System.Management.Automation.Provider
|
|||
///
|
||||
/// <returns>
|
||||
/// Nothing. An instance of an object that represents the security descriptor
|
||||
/// for the item specifed by the path should be written to the context.
|
||||
/// for the item specified by the path should be written to the context.
|
||||
/// </returns>
|
||||
///
|
||||
internal void GetSecurityDescriptor(
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace System.Management.Automation.Provider
|
|||
///
|
||||
/// <remarks>
|
||||
/// When this attribute is specified a provider specific filter can be passed from
|
||||
/// the Core Commands to the provider. This filter string is not interpretted in any
|
||||
/// the Core Commands to the provider. This filter string is not interpreted in any
|
||||
/// way by the Monad engine.
|
||||
/// </remarks>
|
||||
Filter = 0x4,
|
||||
|
|
|
@ -1109,7 +1109,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </param>
|
||||
///
|
||||
/// <param name="recurse">
|
||||
/// Ignored. All removes are recursive becuase the
|
||||
/// Ignored. All removes are recursive because the
|
||||
/// registry provider does not support filters.
|
||||
/// </param>
|
||||
protected override void RemoveItem(
|
||||
|
@ -3519,7 +3519,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
// If the main path existed, we must do a semantic analysis
|
||||
// to find the parent -- since path elements may contain
|
||||
// path delemiters. We only need to do this comparison
|
||||
// path delimiters. We only need to do this comparison
|
||||
// if the base implementation returns something in our namespace.
|
||||
if (!String.Equals(parentPath, root, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
@ -4048,7 +4048,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
|
||||
switch (valueKind)
|
||||
{
|
||||
// NOTICE: we assume that an unkown type is treated as
|
||||
// NOTICE: we assume that an unknown type is treated as
|
||||
// the same as a binary blob
|
||||
case RegistryValueKind.Binary:
|
||||
case RegistryValueKind.Unknown:
|
||||
|
@ -4877,7 +4877,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
/// </summary>
|
||||
/// <param name="key">RegistryKey containing property</param>
|
||||
/// <param name="valueName">Property for which RegistryValueKind is requested</param>
|
||||
/// <returns>RegistryValueKind of the property. If the property does not exit,returns RegsitryValueKind.Unknown</returns>
|
||||
/// <returns>RegistryValueKind of the property. If the property does not exit,returns RegistryValueKind.Unknown</returns>
|
||||
private static RegistryValueKind GetValueKindForProperty(IRegistryWrapper key, string valueName)
|
||||
{
|
||||
try
|
||||
|
@ -4995,7 +4995,7 @@ namespace Microsoft.PowerShell.Commands
|
|||
///
|
||||
/// <param name="kind"> output for the RegistryValueKind for the string</param>
|
||||
/// <returns>
|
||||
/// true if the conversion succeded
|
||||
/// true if the conversion succeeded
|
||||
/// </returns>
|
||||
private bool ParseKind(string type, out RegistryValueKind kind)
|
||||
{
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
|||
throw new InvalidOperationException(RegistryProviderStrings.InvalidOperation_NeedTransaction);
|
||||
}
|
||||
|
||||
// MSDTC is not avaliable on WinPE machine.
|
||||
// MSDTC is not available on WinPE machine.
|
||||
// CommitableTransaction will use DTC APIs under the covers to get KTM transaction manager interface.
|
||||
// KTM is kernel Transaction Manager to handle file, registry etc and MSDTC provides an integration support
|
||||
// with KTM to handle transaction across kernel resources and MSDTC resources like SQL, MSMQ etc.
|
||||
|
|
|
@ -854,7 +854,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
|||
// Return null if we didn't find the key.
|
||||
if (ret == Win32Native.ERROR_ACCESS_DENIED || ret == Win32Native.ERROR_BAD_IMPERSONATION_LEVEL)
|
||||
{
|
||||
// We need to throw SecurityException here for compatiblity reason,
|
||||
// We need to throw SecurityException here for compatibility reason,
|
||||
// although UnauthorizedAccessException will make more sense.
|
||||
throw new SecurityException(RegistryProviderStrings.Security_RegistryPermission);
|
||||
}
|
||||
|
@ -1907,7 +1907,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
|||
{
|
||||
if (_checkMode == RegistryKeyPermissionCheck.Default)
|
||||
{
|
||||
// only need to check for default mode (dynamice check)
|
||||
// only need to check for default mode (dynamic check)
|
||||
new RegistryPermission(RegistryPermissionAccess.Read, _keyName + "\\" + valueName).Demand();
|
||||
}
|
||||
}
|
||||
|
@ -1918,7 +1918,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
|||
{
|
||||
if (_checkMode == RegistryKeyPermissionCheck.Default)
|
||||
{
|
||||
// only need to check for default mode (dynamice check)
|
||||
// only need to check for default mode (dynamic check)
|
||||
new RegistryPermission(RegistryPermissionAccess.Read, _keyName + "\\.").Demand();
|
||||
}
|
||||
}
|
||||
|
@ -2037,7 +2037,7 @@ namespace Microsoft.PowerShell.Commands.Internal
|
|||
{
|
||||
if (0 != (rights & ~((int)RegistryRights.FullControl)))
|
||||
{
|
||||
// We need to throw SecurityException here for compatiblity reason,
|
||||
// We need to throw SecurityException here for compatibility reason,
|
||||
// although UnauthorizedAccessException will make more sense.
|
||||
throw new SecurityException(RegistryProviderStrings.Security_RegistryPermission);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue