Microsoft.VisualStudio.Utilities.Internal Namespace

Classes

AsyncHttpWebRequest

HttpWeb request wrapper

CodeContract

CodeContract is used for validate input parameters

DictionaryExtensions

Several dictionary extension methods.

FileBasedRegistry
FileBasedRegistryTools

File based implementation of IRegistryTools that uses the FileBasedRegistry for Unix/MacOS. Machine level registry is not supported.

MacNativeMethods

Class containing all PInvoke definitions we use in the Telemetry Library that are used on macOS.

ObjectExtensions

Object extensions methods

Platform

Determines which platform the process is running on.

RegistryTools

Helper class to get information from the Registry

RegistryValue

Contains a registry value that is serializable for the Mono compatible FileBasedRegistry

RegistryValues

Contains registry values that are serializable for the Mono compatible FileBasedRegistry

ReparsePointAware

Collection of File and Directory utility functions that ensure the files and folders being interacted upon have no Windows reparse points on their paths and that the paths in code match the actual paths on disk.

Reparse point injection is a known/common vector of security exploits. See here for more general information about them: https://docs.microsoft.com/en-us/windows/win32/fileio/reparse-points

The goal of this set of functions is to get a Windows file handle, verify that it is in the expected path and then do all file operations with the same handle. It is NOT a safe pattern to verify the file and then perform any additional operations using the file path as an attacker can exploit the race between the check of the file and the file operation based on the file path. This class of attack is known as Time-of-Check/Time-of-Use (TOCTOU). To avoid this, this class will hold the file handle and perform all operations on the handle once it has been deemed to be in the correct location. Since all operations are based on the file handle, we know we're modifying the file that we verified to be correct.

StreamedHttpWebResponse

HttpWeb response wrapper with stream implementation.

StringExtensions

Extend several strings methods

TaskExtensions

Task extensions

Structs

MacNativeMethods.OSVersionInfo
MacNativeMethods.SystemInfo

Interfaces

IAsyncHttpWebRequest

HttpWeb request wrapper interface.

IRegistryTools

Helper class to get information from the Registry

IRegistryTools2
IRegistryTools3
IRegistryTools4
IStreamedHttpWebResponse

HttpWeb response wrapper interface.

Enums

ErrorCode

Possible error codes for response.