Microsoft.VisualStudio.Utilities
Extensions to for activity tracing.
Starts a new activity scope.
A value to dispose to end the activity.
In order for activity tracing to happen, the needs to
have enabled.
Initializes a new instance of the struct
and applies the new activity to the .
The that will receive the , start and stop activity logs.
Activity tracing requires that the property of this object must have its property set to include .
The activity name.
The format for the activity name.
Formatting args for the string.
Gets the display name for this activity.
Gets the activity ID which is set to when this activity is on the top of the activity stack.
Base type for all platform-specific API attributes.
Records the operating system (and minimum version) that supports an API. Multiple attributes can be
applied to indicate support on multiple operating systems.
Callers can apply a
or use guards to prevent calls to APIs on unsupported operating systems.
A given platform should only be specified once.
Reserved to be used by the compiler for tracking metadata.
This class should not be used by developers in source code.
This definition is provided by the IsExternalInit NuGet package (https://www.nuget.org/packages/IsExternalInit).
Please see https://github.com/manuelroemer/IsExternalInit for more information.
Utility methods for dealing with keyboard accelerators.
Strips non-escaped accelerator markers ('&') from the given string
using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:
Strip odd '&' chars from the string. As per DrawText,
consecutive pairs of '&'s will leave a real '&' character, and all
odd '&'s are removed even though only the last may be underlined.
If an '&' occurs inside of parens then the parens and the character following
the '&' are also stripped out. This is useful to remove accelarator strings of
format (&N) which are appended to label in some FE language versions.
NOTE: We do not check for language to do this i.e. we assume that there isn't
any realistic label in other languages with (&N) stuck in.
String to strip.
stripped of accelerators.
Strips non-escaped accelerator markers from the given string
using the same algorithm used by MsoPwchStripWtz (bugs and all), to wit:
Strip odd chars that match from the string.
As per DrawText, consecutive pairs of characters matching
will leave a single character matching , and all odd
characters matching are removed even though only the last
may be underlined.
If a character matching occurs inside of parens then the parens
and the character following the matching character are also
stripped out. This is useful to remove accelarator strings of format (%accessSpecifier%N) which
are appended to label in some FE language versions.
NOTE: We do not check for language to do this i.e. we assume that there isn't
any realistic label in other languages with (%accessSpecifier%N) stuck in.
String to strip.
Specifies the character to treat as an access key specifier.
stripped of accelerators.
Returns the input string with the specified access key specifier stripped
String to strip of access key specifiers
Character to strip
Converts the input object into an access key specifier. Objects
of type char or single-character strings can be converted. If an
object of a different type is passed in, & is returned.
Object to convert
Access key specifier from
Rotates the bits of a signed byte value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned byte value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed byte value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned byte value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed short value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned short value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed short value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned short value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed int value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned int value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed int value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned int value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed long value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned long value to the left
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of a signed long value to the right
The value to rotate
The number of positions to rotate
The rotated value
Rotates the bits of an unsigned long value to the right
The value to rotate
The number of positions to rotate
The rotated value
Circular buffer. Given a fixed size, fills to capacity and
then overwrites earliest item.
Copies the buffer contents to an array
A new array with a copy of the buffer contents.
A metadata attribute identifying a Visual Studio command by its GUID and ID.
A command set the command belongs to.
A command ID in the command set.
Creates a new instance of the .
A string comparer that performs a case-sensitive logical string comparison.
A logical comparison treats consecutive digits in the string as numerical
content rather than text.
See https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-strcmplogicalw.
A string comparer that performs a case-insensitive logical string comparison.
A logical comparison treats consecutive digits in the string as numerical
content rather than text.
See https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-strcmplogicalw.
A static helper class that contains APIs for performing various DPI scaling and context
switching operations.
Get whether or not Per-Monitor DPI awareness is enabled.
Gets the process's DPI awareness context.
The x-coordinate (or horizontal) DPI of the system's primary display.
The y-coordinate (or vertical) DPI of the system's primary display.
The x-coordinate (or horizontal) DPI scale of the system's primary display.
The y-coordinate (or vertical) DPI scale of the system's primary display.
Determines if is a valid DPI value.
Gets the System DPI from the DeviceCaps.
Private version of the Validate class from MS.VS.Utilities, reproduced for use in
so we don't have to pull the full Validate class into
Microsoft.VisualStudio.DpiAwareness.dll and risk introducing redundant types
Enters a scope during which the current thread's DPI awareness context is set to
.
The new DPI awareness for the current thread.
An object that, when disposed, will reset the current thread's DPI awareness to the
value it had when the object was created.
Enters a scope during which the current thread's DPI awareness context is set to
match the DPI awareness context of the given .
The window whose DPI awareness to match.
An object that, when disposed, will reset the current thread's DPI awareness to the
value it had when the object was created.
A helper class used to change the current thread's DPI awareness context upon creation
and to restore the previous DPI awareness context upon disposal.
Identifies the DPI awareness context for a window.
The values for this enum come from:
https://docs.microsoft.com/en-us/windows/desktop/hidpi/dpi-awareness-context
This window does not scale for DPI changes and is always assumed to have a scale factor of
100% (96 DPI). It will be automatically scaled by the system on any other DPI setting.
This window does not scale for DPI changes. It will query for the DPI once and use that
value for the lifetime of the process. If the DPI changes, the process will not adjust to
the new DPI value. It will be automatically scaled up or down by the system when the DPI
changes from the system value.
This window checks for the DPI when it is created and adjusts the scale factor whenever the
DPI changes. These processes are not automatically scaled by the system.
An advancement over the original Per-Monitor DPI awareness mode, which enables applications
to access new DPI-related scaling behaviors on a per top-level window basis. This mode should
almost always be preferred over PerMonitorAware.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to The DPI awareness context must be restored on the same thread on which it was set..
Looks up a localized string similar to The DPI must be greater than zero..
Looks up a localized string similar to The DPI scale must be greater than zero..
Looks up a localized string similar to The DpiScale object cannot be null..
Looks up a localized string similar to Cannot get the DPI of an invalid window..
The HMONITOR for the monitor that was passed to the Win32 DPI-awareness API
The HRESULT returned by the Win32 DPI-awareness API.
The HWND for the window that was passed to the Win32 DPI-awareness API
A generic implementation of stream storage in the file system.
Stores files in a directory. The files it recognizes and accepts for creation can be
all files in the directory or only files with a specific extension.
The type of the stream key
Get or set the Directory that will contain the stored files
Get or set the extension for contained files.
If set to AllExtensions, the storage will recognize all files in the storage directory.
Get a full file path from a key.
Indicates whether the file represented by the given key belongs to the storage.
Open an existing Stream in storage.
The key for the stream
The desired access for the stream
The stream for , or null if it doesn't exist
Open a new Stream for writing, adding it to storage.
Delete from storage the Stream identified by the given key.
Indicates whether storage contains a Stream with the given key.
Open an existing Stream in storage for reading.
Gets the timestamp for an existing Stream in the storage.
Key to the existing stream.
The kind of timestamp to return
The timestamp
Sets the timestamp for an existing Stream in the storage.
Key to the existing stream.
The kind of timestamp to set
The timestamp to set on the stream
Gets the number of bytes actually used by an existing Stream in the storage.
Key to the existing stream.
Get an enumerator for keys in storage.
Get an enumerator for keys in storage.
Controls whether events are raised when changes occur in the storage
Raised when a stream is created
Raised when a stream is deleted
Raised when a stream is changed
The FileSystemWatcher for the object (internal visibility for unit testing).
Handler for the FileSystemWatcher.Created event
Handler for the FileSystemWatcher.Deleted event
Handler for the FileSystemWatcher.CHanged event
Handler for the FileSystemWatcher.Renamed event
Raises a stream event if tnere are event sinks for it.
The event to raise
The name of the stream the event is for
Enumerator for storage Keys
Find all appropriate files at construction
Get the current enumerated element
Defines a color value to be used in font/color category entries
Gets or sets the color type
Gets or sets the color value if applicable
Gets if color value is valid
Contains font and color information for an option category
Gets the category identifier
Gets the font assigned to category if one is set
Gets list of colors defined in this category
Creates a new category with provided identifier
Category identifier
Creates a new category from a binary reader. The reader must be in correct position
reader instance to use
schema version to use
Defines a single font & color entry in a theme category, defining the color and font style of the entry
Flags to indicate availability of some options
Line style options if entry supports line style
Canonical name of the font/color entry
Pointer to localized description resource, can be null if not available
Pointer to localized name resource, can be null if not available
Background color of the font/color entry
Foreground color of the font/color entry
App specific font/color options
Under Visual Studio context, this represents _FCITEMFLAGS
Line style to use if this entry is used as a line color
Marker style to use if this entry is used as a marker color
Automatic background color of the item
Automatic foreground color of the item
App specific options for font options
Under Visual Studio context, this represents FONTFLAGS and/or _FCFONTFLAGS
Merge priority when entry is shared between components
Uses FontColorEntry.DefaultMergePriority if not specified
Create a new font and color entry
Canonical name of the entry
Theme entry describing both font and color information.
Theme data can be read or written from/to a versioned binary stream for serialization
Gets font and color categories defined in this theme
Creates a new empty theme instance
Creates a new font and color theme from a versioned reader
Versioned reader wrapping the data stream
Gets the category for a given identifier
Category identifier
a FontColorCategory instance if category is defined or null otherwise
Adds a new category definition to this theme
Cateogry to add, the category identifier must be unique in the theme
Serializes font and color data to a versioned writer. By default latest version will be used
a VersionedBinaryWriter instance
set to false if previous version should be used omitting font and extended color information
Contains information regarding font assigned to a category
Gets or sets the font typeface
Gets or sets the size of the font
Gets or sets the character set of the font
Gets if the font information is valid
Methods for compressing / decompressing a byte array using the GZip algorithm.
Compress a byte array using the GZip algorithm.
Array to compress.
Compressed byte array.
Decompress a byte array that was compressed using the GZip algorithm.
Array to decompress.
Size of the intermediate buffer used to decompress data.
Decompressed byte array.
Interface to an ordered storage of Streams. Each stream is identified by a key,
and is located at a given position (represented as an index) in storage.
Type of the key that identifes a Stream in storage
Get the Count of Streams in storage.
Open an existing Stream in storage for reading, at the given index.
Index of the existing stream.
An open stream for reading. It is the responsibility of the caller to dispose the Stream.
Open a new Stream for writing at the given index, adding it to storage.
Index of the new stream.
Key of the new stream to be added to storage.
A new Stream for writing. It is the responsibility of the caller to dispose the Stream.
Delete from storage the Stream at the given index.
Index of the stream to delete from storage.
True if deleting was successful, false otherwise.
Reset storage with the given enumeration of keys.
New keys will be enumerated and compared against existing keys in storage. The new keys enumeration will
determine the position of existing keys in storage: that is, if they exist in both storage and newKeys they
will be moved to the position in the newKeys enumeration.
Existing keys in storage that do not exist in the newKeys enumeration will be removed from storage.
Keys that exist in the newKeys enumeration but do not exist in storage will be added to storage, and an empty
Stream will be created for them.
Interface to a storage of Streams. Each Stream in storage is identified
by a key.
Type of the key that identifies a Stream in storage.
Open an existing Stream in storage for reading.
Key to the existing stream.
Requested access for the stream
An open stream for reading. It is the responsibility of the caller to dispose the Stream.
Open a new Stream for writing, adding it to storage.
Key of the new stream to be added to storage.
A new Stream for writing. It is the responsibility of the caller to dispose the Stream.
Delete from storage the Stream identified by the given key.
Key of the stream to delete from storage.
True if deleting was successful, false otherwise.
Indicates whether storage contains a Stream with the given key.
Key whose existence in storage will be verified.
True if the Stream with the given key was found, false otherwise.
Open an existing Stream in storage for reading.
Key to the existing stream.
An open stream for reading. It is the responsibility of the caller to dispose the Stream.
Gets the timestamp for an existing Stream in the storage.
Key to the existing stream.
The kind of timestamp to return
The timestamp
Sets the timestamp for an existing Stream in the storage.
Key to the existing stream.
The kind of timestamp to set
The timestamp to set on the stream
Gets the number of bytes used by an existing Stream in the storage.
Key to the existing stream.
Number of used bytes.
Number of reserved bytes.
An interface that defines events to notify of changes to streams in an IStreamStorage.
If a class that implements can support change notifications, it should also implement
IStreamStorageEvents.
Type of the key that identifies a Stream in storage.
Controls whether events are raised when changes occur in the storage
Raised when a stream is created
Raised when a stream is deleted
Raised when a stream is changed
Interface for an IStreamStorage key object factory that takes as parameter a stream name.
A string comparer that performs a logical string comparison. A logical comparison
treats consecutive digits in the string as numerical content rather than text.
See https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-strcmplogicalw.
Initializes a instance.
Indicates whether the comparer will ignore case when comparing strings.
Performs a logical comparison between two strings.
The first string to compare.
The second string to compare.
A signed integer that indicates the relative values of x and y, as shown in the
following table:
ValueMeaningLess than zero precedes in the sort order.
Zero occurs in the same position as in the sort order.
Greater than zero follows in the sort order.
Determines whether two strings are logically equal.
The first string to compare.
The second string to compare.
true if the strings are logically equal, false if they are not.
Gets the hash code for the specified string.
A string
A 32-bit signed hash code calculated from the value of the parameter.
Performs a logical comparison between substrings of two strings.
The first string to use in the comparison.
The position of the substring within .
The length of the substring within .
The second string to use in the comparison.
The position of the substring within .
The length of the substring within .
A signed integer that indicates the relative values of x and y, as shown in the
following table:
ValueMeaningLess than zero
The substring in precedes the substring in in the sort order.
Zero
The substring in occurs in the same position as the substring in in the sort order.
Greater than zero
The substring in follows the substring in in the sort order.
Determines whether two strings are logically equal.
The first string to use in the comparison.
The position of the substring within .
The length of the substring within .
The second string to use in the comparison.
The position of the substring within .
The length of the substring within .
true if the strings are logically equal, false if they are not.
Finds a digit character within a substring.
The string to search.
The position from which to begin seasrching.
The maximum number of characters to search.
The distance between and the first character found.
Finds a non-digit character within a substring.
Finds a character matching a predicate within a substring.
The predicate used for character matching.
Computes the numeric value of a sequence of digit characters '0' - '9' within a string.
The string
The index of the first digit character.
The number of characters in the sequence.
The numeric value of the sequence.
A utility class that provides an implementation of IDisposable that executes a client-supplied
action upon disposal.
Initializes a new instance of an object that invokes
on disposal.
Action to run on dipose
Thrown if is null.Catching any exceptions thrown by is left to the caller.
A collection of that is optimized for minimal space in the case of a single element.
Elemental type which must be a reference type. Note: null may not be used as a value in the collection.
While this type has a method, it does not implement . This
is to eliminate any unintentional boxing that will happen if a value type is passed to or returned from a method
via its interface. The collection may still be enumerated in foreach statements (since the compiler uses pattern
matching for that), but not elsewhere such as LINQ expressions.
May be null, a single instance of T or a List{T}
Creates an instance of that will use the given capacity
to create its internal list.
Creates an instance of using the given list as the content.
Creates an instance of using the given object as the content.
Struct based enumerator. Just enough is implemented to satisfy the foreach pattern.
Note that the enumerator is not invalidated by updates to the underlying collection.
Construct a new Enumerator over the given data.
The collection.
Access the current element.
Advance the enumerator to the next position.
False if the end of the collection has been reached.
Get an efficient enumerator for the collection
The enumerator
Add a new value to the collection.
The value to add.
Returns the count of the number of elements in the collection.
Gets the element at the specified index in the collection.
The zero-based index of the item requested.
The item at position in the collection.The is negative or off the end of the collection.
Remove the item at the specified index from the collection.
The zero-based index of the item to be removed.
The is negative or off the end of the collection.
Returns the underlying list if this object contains > 1 item, otherwise null.
Name Release version (major.minor)
Win10 / Server 2016 10.0
Win8.1 / Server 2012 R2 6.3
Win8 / Server 2012 6.2
Win7 / Server 2008 R2 6.1
This allows for the request of a pooled array that can be used in a using scope to reduce allocations in hot paths.
This allows for the request of a pooled array that can be used in a using scope to reduce allocations in hot paths.
The type of array to create.
Request a pooled array that is of the specified size.
The required size of the array.
If the elements in the array should be set to their default value once the pooled array is returned.
The pool to request the array from.
Request a pooled array that copies elements from the provided
The enumerable to copy elements from.
If the elements in the array should be set to their default value once the pooled array is returned.
The pool to request the array from.
The pool to request arrays from.
A representing a pooled instance.
The enumerator for the pooled instance.
Returns the array to the pool.
Simple wrapper for ReaderWriterLockSlim that provides helpers for entering the
various modes of the lock that return disposable objects that will exit the
entered mode when disposed.
The wrapped lock can be accessed via the InnerLock property.
The ReaderWriterLockSlim that is wrapped by this object.
Tries to enter the lock in read mode.
Tries to enter the lock in upgradeable mode.
Tries to enter the lock in write mode.
Tries to enter the lock in read mode, with an optional integer time-out.
The number of milliseconds to wait, or -1 (System.Threading.Timeout.Infinite)
to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
Tries to enter the lock in read mode, with an optional integer time-out.
The interval to wait, or -1 milliseconds to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
Tries to enter the lock in upgradeable mode, with an optional integer time-out.
The number of milliseconds to wait, or -1 (System.Threading.Timeout.Infinite)
to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
Tries to enter the lock in upgradeable mode, with an optional integer time-out.
The interval to wait, or -1 milliseconds to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
Tries to enter the lock in write mode, with an optional integer time-out.
The number of milliseconds to wait, or -1 (System.Threading.Timeout.Infinite)
to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
Tries to enter the lock in write mode, with an optional integer time-out.
The interval to wait, or -1 milliseconds to wait indefinitely.
If the lock was successfully entered, the return value is an object that will
exit the lock when disposed. If the lock was not entered, null is returned.
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to There is a circular property dependency: {0}.
Looks up a localized string similar to {0}: {1} is not defined for this converter..
Looks up a localized string similar to {0}.{1} depends on a property that couldn't be found: {2}.
Looks up a localized string similar to The delegate didn't read the amount of data that was written.
Looks up a localized string similar to Could not get access to the cross process mutex '{0}'.
Looks up a localized string similar to Internal version mismatch detected when updating component versions in current context..
Looks up a localized string similar to Only feature flags that have been registered may be set.
Looks up a localized string similar to {0}.{1}: Converter requires {2} source parameters, {3} source parameters provided..
Looks up a localized string similar to {0}.{1}: Converter requires {2} type parameters, {3} type parameters provided..
Looks up a localized string similar to The first character of the extension must be a period ('.')..
Looks up a localized string similar to The extension can only contain a single period ('.')..
Looks up a localized string similar to {0} '{1}' was not provided in the service request or it did not contain a valid PID..
Looks up a localized string similar to Zero is an invalid value for the maximum storage size.
Looks up a localized string similar to Zero is an invalid value for the maximum stream count.
Looks up a localized string similar to Message version header is invalid based on current state..
Looks up a localized string similar to The name filter must be a valid LogId with only '?' and '*' as wild card characters..
Looks up a localized string similar to Invalid nullable type code {0}..
Looks up a localized string similar to Must be of the form {0}.
Looks up a localized string similar to This may not be the root path..
Looks up a localized string similar to Invalid stream access: {0}.
Looks up a localized string similar to Invalid timestamp kind: {0}.
Looks up a localized string similar to Maximum object identifier exceeded..
Looks up a localized string similar to Metadata map for {0} should have size {1}..
Looks up a localized string similar to At least one of maxStreamCount or maxStorageSize must be greater than zero.
Looks up a localized string similar to The parameter {0} indicates a failure..
Looks up a localized string similar to Cannot monitor a storage that doesn't implement IStreamStorageEvents<TKey>.
Looks up a localized string similar to The value of a SerializerFieldCode.Nullable field cannot be null, null values should be encoded with SerializerFieldCode.NullableType or Nil instead..
Looks up a localized string similar to The private-to-shared name translator returned null or an empty string for shared setting {0}..
Looks up a localized string similar to {1}.{2}: unexpected target type at offset {5}:{0}Expected target type: {3}{0}Actual target type: {4}.
Looks up a localized string similar to {1}.{2}: unexpected target type:{0}Expected target type: {3}{0}Actual target type: {4}.
Looks up a localized string similar to {0} only supports a target type of {1}.
Looks up a localized string similar to {0} requires 1, 2, or 4 input values.
Looks up a localized string similar to Unexpected stream version: expected version={0}, actual version={1}.
Looks up a localized string similar to {1}.{2}: unexpected value type at offset {5}:{0}Expected type: {3}{0}Actual type: {4}.
Looks up a localized string similar to {1}.{2}: unexpected value type:{0}Expected type: {3}{0}Actual type: {4}.
Looks up a localized string similar to Failed to serialize object as JSON..
Looks up a localized string similar to Wildcards are allowed only at the end of property names..
Looks up a localized string similar to The path contains an invalid character..
Looks up a localized string similar to The {0} service is unavailable..
Looks up a localized string similar to The supplied bitmap bits do not represent a complete BGRA32 bitmap..
Looks up a localized string similar to The Guid is empty..
Looks up a localized string similar to The operation cannot be executed at this time. The object {0} is not null..
Looks up a localized string similar to The argument value {0} is not the expected value {1}..
Looks up a localized string similar to The value {0} is outside the acceptable range of [{1},{2}]..
Looks up a localized string similar to The path \"{0}\" is not normalized..
Looks up a localized string similar to The string is empty..
Looks up a localized string similar to The string cannot be null or contain only whitespace characters..
Looks up a localized string similar to The value {0} is unexpected for argument {1}..
Stores a reusable array. The size of the array returned can either
be exactly a requested size or a buffer of at least a requested size
depending on the value of the requiresExactSize parameter.
The type of array to construct.
Creates a new reusable array.
True if the array returned
from Acquire must have an exactly-matching length, false if
the array returned from Acquire can have any equal or longer
length than the length requested.
The maximum length of array
that should be cached when returning arrays to the resource store.
Stores a reusable MemoryStream. The MemoryStream will only be stored
for reuse if its Capacity does not exceed the maximumStreamCapacity used
when constructing the ReusableMemoryStream.
Constructs a new ReusableMemoryStream.
The maximum capacity for the MemoryStream
to be stored for reuse. Streams exceeding the capacity will be not be stored
for reuse.
Holds a reference to a shared resource allocated by a ReusableResourceStoreBase, and releases
the resource back to the ReusableResourceStoreBase upon dispose.
The type of resource stored in the holder.This MUST be a value type for ReusableResourceStore to be efficient.
Returning a reference type would require an allocation on each call to
Acquire, which would defeat the memory allocation savings of using
ReusableResourceStore and ReusableResourceHolder in the first place.
Disposes of the resource, releasing it back to the ReusableResourceStore it came from.
Gets the resource stored by this resource holder. After this object is disposed,
returns null.
Stores a resource that requires no constructor parameters for instantiation. See ReusableResourceStoreBase
for more information.
The type of resource to store.
Acquires a cached instance of the resource, or allocates a new instance if none
are currently available.
A disposable object that should be disposed when usage of the resource is complete.
Allocates a new instance of the resource when one is not available in the cache.
A new instance of the resource.
Validates that an already-cached resource value is safe to reuse when Acquire is called.
The cached value that is about to be reused during Acquire.
True if the object is in a reusable state, otherwise false.
Stores a resource that requires a single constructor parameter for instantiation. See ReusableResourceStoreBase
for more information.
The type of resource to store.The type of the first constructor parameter for the resource.
Acquires a cached instance of the resource, or allocates a new instance if none
are currently available.
The parameter to pass when constructing the object.
A disposable object that should be disposed when usage of the resource is complete.
Allocates a new instance of the resource when one is not available in the cache.
The parameter to pass when constructing the object.
A new instance of the resource.
Validates that an already-cached resource value is safe to reuse when Acquire is called.
The cached value that is about to be reused during Acquire.
The parameter that would be used to construct a new value.
True if the object is in a reusable state, otherwise false.
Provides a base class for storing a frequently-used object that can be reused
instead of reallocated, such as StringBuilders or small arrays.
The type of object stored by this store.
Gets access to the resource stored by this object, and removes the resource
so that subsequent callers cannot be handed the same resource at the same time.
A currently-stored instance of the resource, or null if there are no
instances currently available in the store.
Releases a value previously acquired with AcquireCore, cleaning up the value
if possible and returning it to the store. If cleanup of the object is not possible,
it is thrown away.
The value previously acquired by AcquireCore.
Immediately before releasing an object, performs cleanup on that object. This might
be necessary to clean up state stored in the object to prevent leaking memory.
The value to clean up.
True if the object was able to be cleaned up and is ready for reuse, otherwise false.
Represents a reusable StringBuilder. The StringBuilder is cleared after each cleanup
to remove content from the previous usage.
Reads a Guid struct from
The reader to read from
Writes a Guid struct to
The writer to write to
The Guid to write
Reads a string with UTF8 encoding that was written via WriteUTF8String method from a reader
The reader to read from
the string read from stream
Writes a string with UTF8 encoding and prefixed with length.
Writer to write to
String to be written
Reads a bool? from
The reader to read from
Writes a bool? to
The writer to write to
The value to write
Reads a char? from
The reader to read from
Writes a char? to
The writer to write to
The value to write
Reads a double? from
The reader to read from
Writes a double? to
The writer to write to
The value to write
Reads a short? from
The reader to read from
Writes a short? to
The writer to write to
The value to write
Reads a int? from
The reader to read from
Writes a int? to
The writer to write to
The value to write
Reads a long? from
The reader to read from
Writes a long? to
The writer to write to
The value to write
Reads a float? from
The reader to read from
Writes a float? to
The writer to write to
The value to write
Reads a ushort? from
The reader to read from
Writes a ushort? to
The writer to write to
The value to write
Reads a uint? from
The reader to read from
Writes a uint? to
The writer to write to
The value to write
Reads a ulong? from
The reader to read from
Writes a ulong? to
The writer to write to
The value to write
A dictionary mapping service monikers to a union bitmask of for which the monikers have had posted telemetry events.
A simple cache of instances. If adding an item to the cache would
cause it exceed its maximum size, the least recently accessed item is removed from the cache.
The type of value stored in the cache
Initializes the instance
The IEqualityComparer{T} implementation to use when comparing values in the cache,
or null to use the default EqualityComparer{T} implementation for the cache type.
The maximum size of the cache. If adding an item to the cache would cause the
cache size to exceed this value, the least recently accessed item in the cache
is removed.
Attempts to fetch a value from the cache.
The value to fetch
The cached value, that the equality comparer determined was equal to
True if an item equal to was returned from the cache, otherwise false.
The number of items in the cache
Indicates whether the cache is read-only
Adds an item to the cache. If adding the item would cause the cache to exceed its
maximum size, the least recently accessed item is removed from the cache.
The value to add
Clears the cache
Determines whether the cache contains
The value to search for
Copies the elements of the cache to an array
The array to write to
The zero-based index in at which copying begins
Removes an item from the cache
The value to remove
True if , or false if was not in the cache
Sets the last access time for this entry to the current time
Allows limited dynamically typed access to instance properties.
Attempts to get a value of a property of given object .
Return type of the property.
Object instance whose property is being gotten.
The case sensitive name of the property.
Return value of the property.
Specifies read access to the stream
Specifies write access to the stream
Specifies read/write access to the stream
Represents an error that occured when trying to access a Stream in storage.
Represents errors that occur when accessing Stream storage.
Represents the error that occurs when a Stream is not found in storage.
Monitors the size of an IStreamStorage via its IStreamStorageEvents interface.
If the number of streams or the collective size of streams in the storage
exceed given target thresholds, streams are deleted from the storage until
the number/size of streams falls below the target thresholds.
Creates a StreamStorageMonitor
The stream storage object to monitor. The storage object must implement
IStreamStorageEvents<>.
The maximum number of streams permitted in the storage. If the number of
streams exceeds , streams are deleted in
least-recently-accessed order. If is -1,
there is no limit on the number of streams.
The maximum cumulative size of the streams permitted in the storage. If
cumulative size of the streams exceeds , streams
are deleted in least-recently-accessed order. If
is -1, there is no limit on the cumulative size of the streams.
Indicates whether the monitor will be initially enabled.
The equality comparer used to compare the keys in the storage. If this value
is null, the default equality comparer for is used.
Validates the maxStreamCount and maxStorageSize parameters for the constructor.
Public visibility so VS can pre-validate the parameters before sending them off
to the VsHub service module, where invalid arguments will be much less visible.
Disposes managed resources for this object
Indicates whether the monitor is enabled
The number of streams in the storage
The cumulative size of all the streams in the storage
Indicates whether the object is monitoring the number of streams in the storage
Indicates whether the object is monitoring the cumulative size of the streams in the storage
Indicates whether the storage's contents exceed either the stream count or size
limitations imposed at startup.
The most recently scheduled task that will scrub the storage.
Internal visibility for unit testing.
Initializes the table of streams
Adds a StreamInfo for the stream identified by to the stream table
The key for the stream to add
Removes a StreamInfo for the stream identified by from the stream table
The key for the stream to remove
Updates a StreamInfo for the stream identified by
The key for the stream to update
Schedules a task to scrub the storage
Scrubs the streams in the storage if the storage exceeds the monitor's constraints
Returns the StreamInfo for a stream
The key for the stream whose info is requested
Returns the size of the stream in the storage
The key for the stream whose size is requested
Hooks interesting events on the storage events interface
Unhooks interesting events on the storage events interface
Handles the StreamCreated event from the storage
Handles the StreamCreated event from the storage
Handles the StreamCreated event from the storage
The size of the stream
The time the stream was lasted accessed
Replaces %-delimited spans with the matching environment variable values, returning the result.
If no matching environment variable is found, the span is replaced by an empty string.
"%%" is replaced by a single %.
Describes a timestamp the represents the creation time of an object
Describes a timestamp the represents the last access time of an object
Describes a timestamp the represents the last write time of an object
Event wrapper that keeps the history of whether the event has fired before.
Gets a value indicating whether the event has fired before.
Use instead of using this property if you want to attach an event handler only if the event has not fired before.
Fire the event.
Attach the event handler.
The event handler to attach, not null.
Remove the event handler.
The event handler to remove, not null.
Attach the event handler only if the event has not fired before.
You may specify = true if you want to invoke the right away
if the event has fired before.
The event handler to attach, not null.
A value indicating whether to invoke the if the event has fired before.
True if the handler is attached; Otherwise, false.
Extension methods for making it easier to use TraceSource instances.
The TraceSource for the tracer
The verbosity level of the tracer
The indentation level of the tracer
Traces an event.
Type type of the event being traced
The message to display
The arguments to format into the message
Traces an Error event.
The message to display
The arguments to format into the message
Traces a warning event.
The message to display
The arguments to format into the message
Traces an information event.
The message to display
The arguments to format into the message
Traces a verbose event.
The message to display
The arguments to format into the message
Traces an exception.
The exception to trace
The type of event to trace
Determines if trace listeners should be called, based on the trace event type.
The type of event to test
True if the trace listeners should be called; otherwise, false.
Increases the indent level by
The number of levels by which is increased
An object whose lifetime controls the indentation increase. When it is
disposed, is decreased by .
The TraceSource for the tracer
The verbosity level of the tracer
The indentation level of the tracer
Traces an event.
Type type of the event being traced
The message to display
The arguments to format into the message
Traces an Error event.
The message to display
The arguments to format into the message
Traces a warning event.
The message to display
The arguments to format into the message
Traces an information event.
The message to display
The arguments to format into the message
Traces a verbose event.
The message to display
The arguments to format into the message
Traces an exception.
The exception to trace
The type of event to trace
Determines if trace listeners should be called, based on the trace event type.
The type of event to test
True if the trace listeners should be called; otherwise, false.
Increases the indent level by
The number of levels by which is increased
An object whose lifetime controls the indentation increase. When it is
disposed, is decreased by .
Formats the trace message string for alignment and indentaion before output
The event type being traced
The format string
The arguments to substitute into the format string
The formatted string
Builds a string for the exception chain rooted at
The root exception
The string representation of the exception chain
Returns a StringBuilder for the Tracer to use.
Returns the string needed to ensure that output from the tracer is nicely aligned, like so:
ImageLibrary Error: 0 : Error trace
ImageLibrary Warning: 0 : Warning trace
ImageLibrary Information: 0 : Information trace
ImageLibrary Verbose: 0 : Verbose trace
The event type being traced
The content of an array setting.
Array item property values. Null means "revert to default". If non-null, this is a list containing one
element per item in the array. Each element is a dictionary with array item property monikers as keys
and array item property values as values. The dictionary may be incomplete, missing some properties that
are registered for items of this array; those properties will retain their default values for that item.
The zero-based index of the user-selected "default item" in the array. Ignored if this array
doesn't support a user-selectable default item. -1 means "revert to default".
The content of an array setting.
Array item property values. Null means "revert to default". If non-null, this is a list containing one
element per item in the array. Each element is a dictionary with array item property monikers as keys
and array item property values as values. The dictionary may be incomplete, missing some properties that
are registered for items of this array; those properties will retain their default values for that item.
The zero-based index of the user-selected "default item" in the array. Ignored if this array
doesn't support a user-selectable default item. -1 means "revert to default".
Array item property values. Null means "revert to default". If non-null, this is a list containing one
element per item in the array. Each element is a dictionary with array item property monikers as keys
and array item property values as values. The dictionary may be incomplete, missing some properties that
are registered for items of this array; those properties will retain their default values for that item.
The zero-based index of the user-selected "default item" in the array. Ignored if this array
doesn't support a user-selectable default item. -1 means "revert to default".
Migration support for array settings in Unified Settings. This is invoked if array settings include a migrationCallback
property indicating the package and/or service ID to invoke. It should be implemented by the setting owner.
Reads a persisted array setting from its legacy location and returns it in a form Unified Settings can
understand.
The registered moniker of the array setting
The content of the array read from the legacy location
Returns a Boolean value indicating whether this migrator's
method supports "incomplete" items: items that are missing some properties (because those properties
haven't been customized from the default). If this returns false, the caller will add default values
in place of missing properties before calling that method.
The registered moniker of the array setting
Writes an array setting into the legacy store at its old location and persistence format.
The registered moniker of the array setting
The content of the array.
If is null, that means
"revert to default". Otherwise, it is an ordered list of items. Each item in the array is a dictionary of item
properties, with property monikers (from the array setting's registration) as keys and property values
as values. If returns true for this setting, the property
dictionaries will be missing properties that haven't been customized from their defaults.
If is -1, that means "revert to default".
Otherwise, it is the zero-based index of the user-selected default item.
Thrown on setting retrieval when the stored value can't be converted to the target type.
The main entry point for Unified Settings, available as a VS service (via service SVsUnifiedSettingsManager).
Gets a reader/writer for the given caller.
The name of the component doing the writing, in human readable form. Examples: "Live Share", "Database Tools".
Thrown if is null.Thrown if is empty.
Gets a reader/writer for the given caller with a specified event source.
The name of the component doing the writing, in human readable form. Examples: "Live Share", "Database Tools".
Sets the value of for change events from this writer.
Thrown if is null.Thrown if is empty.
This exposes the "effective value" of settings: the value from the highest priority scope where each setting is customized.
Registers a callback to be invoked when settings' effective values change. Note that a setting can change without affecting its
effective value if the setting is overridden in a higher-priority scope -- e.g. if a setting change is applied to "user" scope
(lower priority) but the same setting is also customized at "workspace" scope (higher priority), the change will not affect the
effective value.
The callback to be invoked when settings change.
A collection of setting monikers (like "environment.general.visualExperience.colorTheme") or prefixes + wildcard (like "environment.general.*")
representing the setting(s) that will trigger this callback.
An object that will unregister this handler when disposed.Thrown if or is null.Thrown if is empty.
Gets an array setting's effective value, or the default value if it isn't customized.
The array element type. This can be a simple type like string/int or a caller-defined class with properties.
The moniker of the array setting.
Flags specifying the conditions required for success.
An object containing the setting value if successful or error information if unsuccessful.Thrown if is null.Thrown if is empty.
Gets a non-array setting's effective value, or the default value if it isn't customized.
The setting type.
The moniker of the setting.
Flags specifying the conditions required for success.
An object containing the setting value if successful or error information if unsuccessful.Thrown if is null.Thrown if is empty.
Gets an array setting. If there is no persisted value, the persisted value is invalid,
or the persisted value can't be converted to an array of , returns the default value.
Thrown if isn't compatible with the persisted value or the default value.Thrown if the setting isn't registered and there's no persisted value.Thrown if is null.Thrown if is empty.
Gets a non-array setting. If there is no persisted value, the persisted value is invalid,
or the persisted value can't be converted to , returns the default value.
Thrown if isn't compatible with the persisted value or the default value.Thrown if the setting isn't registered and there's no persisted value.Thrown if is null.Thrown if is empty.
Changes made via this API don't take effect until is called.
At that point, they may be immediately approved/rejected or they may need to wait for user approval.
The scope at which the changes are persisted may be user-determined.
can be called multiple times.
Enqueues a change to the value of a setting. The target scope may be selected by the user during the approval process.
Validation will be performed unless the setting is not registered. This is equivalent to calling
with .
The new setting value. Can be any numeric type, bool, or string. If the setting is registered, this must match the registered data type.
Thrown if or is null.Thrown if is empty or is an unsupported type.
Enqueues a change to the value of a setting. The target scope may be selected by the user during the approval process.
Validation will be performed unless the setting is not registered.
The new setting value. Can be any numeric type, bool, or string. If the setting is registered, this must match the registered data type.
Flags controlling how the change is persisted
Thrown if or is null.Thrown if is empty or is an unsupported type.
Enqueues a change to the value of an array setting. The target scope may be selected by the user during the approval process.
Validation will be performed unless the setting is not registered.
The new setting value.
Thrown if or is null.Thrown if is empty.
Requests a commit of all queued changes. This may require user approval to complete. In that case, this method will return immediately
and the commit will complete later once the user has approved it. Changes will be applied in the scope selected by the user.
A human-readable, localized description of the change. Example: "migration from a previous version".
Thrown if is null.Thrown if is empty.
This method is deprecated. Use instead.
Commits all queued changes. This may require user approval to complete. In that case, this method will return immediately
and the commit will complete later once the user has approved it.
A human-readable, localized description of the change. Example: "migration from a previous version".
Thrown if is null.Thrown if is empty.
The outcome of a call to one of 's Enqueue*Change methods.
The change was queued successfully. It will be applied when is called (if the user approves it).
The change was queued successfully. It will be applied when is called (if the user approves it).
Validation was not performed on the value. (Validation will always be performed unless the setting is not registered.)
The change was denied, e.g. by user preference or group policy.
The supplied value was an incompatible type or failed validation.
was specified but no migration is registered for the setting.
was specified but the supplied value couldn't be migrated.
An unexpected error occurred. See the error message for details.
The result of a call to one of 's Enqueue*Change methods.
An optional message with more details in case of failure. Useful for debugging or logging.
The result of a call to one of 's Enqueue*Change methods.
An optional message with more details in case of failure. Useful for debugging or logging.
An optional message with more details in case of failure. Useful for debugging or logging.
The outcome of a call to .
No changes were queued when was called.
The changes were applied successfully.
The changes are waiting for user approval.
An unexpected error occurred. See the error message for details.
The result of a call to .
An optional message with more details in case of failure. Useful for debugging or logging.
The result of a call to .
An optional message with more details in case of failure. Useful for debugging or logging.
An optional message with more details in case of failure. Useful for debugging or logging.
Thrown from 's Get*OrThrow methods when the setting has no stored value (or the stored value
can't be converted to the target type) and the setting isn't registered.
Defines the requirements for reading settings via .
Return the stored value without performing any checks.
Fail if the setting is not registered.
Fail if the setting is not registered or not valid according to the registration.
Return an error rather than the default value if the persisted value can't be
converted to the target type or if validation is requested and the persisted
value doesn't pass validation criteria.
Apply the "migration" transform from the setting registration, returning a value
compatible with the legacy schema. Fails if the setting isn't registered, the
registration doesn't include migration, or the migration can't be applied to the
current setting value.
The result of a call to one of 's Get* methods.
Success/failure type.
An optional message with more details in case of failure. Useful for debugging or logging.
The setting value, or null if retrieval failed.
The result of a call to one of 's Get* methods.
Success/failure type.
An optional message with more details in case of failure. Useful for debugging or logging.
The setting value, or null if retrieval failed.
Success/failure type.An optional message with more details in case of failure. Useful for debugging or logging.The setting value, or null if retrieval failed.
The outcome of a call to one of 's Get* methods.
Failed because was set and the setting value failed validation.
Failed because was set and the setting wasn't registered.
Failed because the setting has no registered default value and no persisted value.
Failed because the persisted value can't be converted to the specified type.
An unexpected error occurred. See the error message for details.
was specified but the registration doesn't include migration.
was specified but the migration failed.
Setting change event payload.
The eventSource parameter to , or if not supplied.
The monikers of settings that were changed or removed.
Setting change event payload.
The eventSource parameter to , or if not supplied.
The monikers of settings that were changed or removed.
The eventSource parameter to , or if not supplied.The monikers of settings that were changed or removed.
Defines the requirements for write settings via .
z
Apply the "migration" transform from the setting registration. This means the caller of
must supply a legacy-compatible value and Unified Settings will translate it into a Unified Settings
compatible value.
Compares two dictionaries as equal if they contain the same key-value pairs, independent
of their order when enumerated.
Variant is the basic COM type for late-binding. It can contain any other COM data type.
This type definition precisely matches the unmanaged data layout so that the struct can be passed
to and from COM calls.
Specialization of BinaryReader that reads a versioned byte stream.
Delegate that will read the body of the stream.
The VersionedBinaryReader
Delegate that will read the body of the stream. It explicitly
handles the case where does not
equal .
The VersionedBinaryReader
The expected stream version
The actual stream version
Reads from the base stream, with version checking.
The expected version of the stream.
If the actual version doesn't match the expected version, the
stream position is advanced beyond the content but
is not invoked.
The delegate that will read the body of the stream
Reads from the base stream, with version checking.
is invoked regardless of the version of the stream. Use this overload if you
want to support reading stream versions other than the expected version.
The expected version of the stream.
The delegate that will read the body of the stream
Reads the header of the versioned stream.
Specialization of BinaryWriter that writes a versioned byte stream.
The length in bytes of the version header written to the VersionedBinaryWriter's stream
Delegate that will write the body of the stream.
The VersionedBinaryWriter
The version of the stream. It is for
reference only; the delegate does not have to write it to
the stream.
Writes versioning header to a stream, the calls a delegate to write
the meat of the data.
Version number to write
The delegate that will write the body of the stream
An observable object that can raise its
events asynchronously, on the main thread.
If .SetProperty is called to set a property's value, the
event is raised on the ambient thread.
If .SetPropertyNotifyAsync is called to set a property's
value, the event is raised on the
main thread.
Initializes a new instance of the class.
The task factory used to change threads before raising the
event.
Notifies of a change to a property on this object. The
event is raised on the main thread.
The cancellation token.
The name of the property that changed.
A task that will complete once the event
has been raised.
Checks for a change to a value, and if the value is different, stores the value
and asynchronously notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
If the property hasn't changed, this will be .
If the property has changed, this will be a task that will complete once the
event has been raised.
The cancellation token.
The name of the property that is changing.
true if the property value changed, false if it did not change.
Checks for a change to a value, and if the value is different, stores the value
and asynchronously notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
An action to call if the value changes, before notifying property changes.
If the property hasn't changed, this will be null. If the property has changed, this will
be a task that will complete once the event
has been raised.
The cancellation token.
The name of the property that is changing.
true if the property value changed, false if it did not change.
Checks for a change to a value, and if the value is different, stores the value
and asynchronously notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
An action to call if the value changes, before notifying property changes.
If the property hasn't changed, this will be null. If the property has changed, this will
be a task that will complete once the event
has been raised.
The cancellation token.
The name of the property that is changing.
true if the property value changed, false if it did not change.
Checks for a change to an value, and if the value is different, stores the value
and asynchronously notifies of property changes.
The storage location for the field behind the property.
The new value to store in the field.
If the property hasn't changed, this will be null. If the property has changed, this will
be a task that will complete once the event
has been raised.
The cancellation token.
The name of the property that is changing.
true if the property value changed, false if it did not change.
Checks for a change to a value, and if the value is different, stores the value
and asynchronously notifies of property changes.
The storage location for the field behind the property.
The new value to store in the field.
If the property hasn't changed, this will be null. If the property has changed, this will
be a task that will complete once the event
has been raised.
The cancellation token.
The name of the property that is changing.
true if the property value changed, false if it did not change.
The color has highest contrast with black.
The color has highest contrast with white.
Both contrasts are equal.
Creates an exception for "value not of expected type"
Creates an exception for "value at offset not of expected type"
Creates an exception for "target type not extending type"
Creates an exception for "target type at offset not extending type"
Creates an exception for "converter function not defined"
Creates an exception for "insufficient source parameters"
Creates an exception for "insufficient type parameters"
This type is forwarded from MS.VS.Shell.xx.dll
Disposes the current object then suppresses further finalization.
Returns whether the object has been disposed once, protects against double disposal
Raised when the event is being disposed, while it is still accessible.
Throws an ObjectDisposedException if this object has been disposed
Standard virtual overload for pattern
True means this is a call to .
False means it has been called from the finalizer.
Allows derived classes to provide custom dispose handling for managed resources
Derived classes are expected to override this method to dispose their managed resources, then call the base class.
Allows derived classes to provide custom dispose handling for native resources
Derived classes are expected to override this method to dispose their native resources, then call the base class.
A disposable that disposes wrapped IDisposable
Extension methods for non-VS types. Extensions for VS types should be placed in
env\shell\PackageFramework\Current\Shell\UI\Common\ExtensionMethods.cs
This type is forwarded from MS.VS.Shell.xx.dll
Helper method to perform the null check necessary to raise an event safely.
The EventArgs-derived event argument.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The name of the property which changed.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The name of the property which is changing.
Helper method to perform the null check necessary to raise an event safely.
The event.
The event's source parameter.
The event's argument parameter.
Helper method to call each target of an async event sequentially, awaiting each until it completes.
The argument type
A delegate taking (object, T) and returning Task
The event's source parameter
The event's argument parameter
The scaling mode to use for WinForms/Win32 images
DEV NOTE: The image scaling modes available here for WinForms and WPF match the similar scaling modes for Win32 from
vscommon\vsuilib\VsUIDpiHelper.h
If changes are made to algorithms in this managed DpiHelper class, matching changes will have to be made to the native class, too.
Let the shell pick what looks best depending on the current DPI zoom factor
Keep the actual image unscaled, add a border around the image
Sharp results, but pixelated, and possibly distorted unless multiple of 100% scaling
Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.Bilinear)
Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.Bicubic)
Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.HighQualityBilinear)
Smooth results, without distorsions, but fuzzy (uses GDI+ InterpolationMode.HighQualityBicubic)
Sharper results than Bicubic for large zoom levels, without distorsions, but fuzzy (2 steps-scaling, uses NearestNeighbor up to the closest multiple of 100%, then GDI+ InterpolationMode.HighQualityBicubic from there)
This type is forwarded from MS.VS.Shell.xx.dll
Initializes a new instance of the class.
Returns a value indicating whether this object's
event has any subscriptions
Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
The property name to notify of changes if the values are different.
True if the property value was changed.
Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
An action to call if the value changes, before notifying property changes.
The property name to notify of changes if the values are different.
True if the property value was changed.
Checks for a change to a value, and if the value is different, stores the value and notifies of property changes.
The type of field changing.
The storage location for the field behind the property.
The new value to store in the field.
An action to call if the value changes, before notifying property changes.
The property name to notify of changes if the values are different.
True if the property value was changed.
Builds a dictionary of properties that are referenced by a
to the properties that reference them.
The type for which property dependencies are to be built
A dictionary of property dependencies, or null if none of the type's properties are marked with a
Returns a collection of the properties that are (recursively) dependent on
The name of the property whose dependents are to be returned
The (possibly empty) collection of dependent properties
Adds the properties that are dependent on to
.
will be created if needed
The name of the root property for which dependencies are requested
The name of the property
The property dependency map
The properties that depend on True if has dependent properties, otherwise false
Validates that there are no circular property dependencies in the current type
This type is forwarded from MS.VS.Shell.xx.dll
Returns a normalized form of the given path.
What it does:
- Takes pains not to allocate extra temporary strings.
- Verifies that the path contains no invalid path characters, throwing
an exception if any invalid characters are found.
- Strips leading and trailing whitespace.
- Replaces "/" with "\"
- Replaces multiple consecutive "\" with a single "\", except for the
leading "\\" of a UNC path.
- Removes the trailing "\", unless it's part of a root (e.g. "C:\")
- Converts to lowercase
What it doesn't do:
- Fully qualify a non-rooted filename (e.g. "dir\filename.ext")
- Simplify relative pathnames (e.g. "C:\dir\..\FileInDriveRoot.ext").
It's tempting to use Path.GetFullPathName to perform this function,
but that would entail an expensive trip to the disk or network.
- Verify that the path exists.
Path to normalize
Normalized from of
Indicates whether the given path is in normalized form.
Path to test
true if normalized, false if not
Extension method to return a normalized form of the given path.
Path to normalize
Normalized from of
Extension method to check whether the given path is in normalized form.
Path to test
true if normalized, false if not
Indicates whether the a child path is a descendant of a parent directory.
This is a purely textual computation indicating that the child *could be*
a descendant of the parent; there is no file system interaction to determine
whether child actually *is* a descendant of parent.
Parent directory
Prospective child file/directory
True if descendant, false if not
Returns the longest leading string that is common to and .
Case is not considered in the comparison.
The first path to compare
The second path to compare
The longest common prefix, or String.Empty if there is no common prefix
Determines if two paths are equal. This method does not treat Path.DirectorySeparatorChar
and Path.AltDirectorySeparatorChar as equivalent.
First path to compare
Second path to compare
True if two paths are equal, false if they are not.
Determines if the given path represents a root directory.
First path to compare
True if is a root, false if it is not.
Determines if the given path is a Junction.
Path to a directory
True if is a Junction, false otherwise.
Determines if any level in the given path is a Junction, up to
( itself will not be included in the determination)
Path to a directory
Path to a parent directory of True if any directory between and
is a Junction. False otherwise.
Determines if a character is a directory separator
Character to test
True if is a directory separator, false if not
Determines if the given directory is one of the implicit directories
contained in all directories (i.e. "." or "..")
Directory to test
True if is an implicit directory, false if not
Return the extension of the specified path string. This always returns a
non-null string for the extension. It will return if:
* is null
* is empty
* does not contain an extension
Otherwise, 's extension (including the period ".").
The path from which to get the extension
The extension, or if the extension could be not obtained
Returns the path with casing that matches what's on the file system.
Heuristically determines whether the given string "looks like" a local rooted file path --
e.g. begins with a drive letter followed by ":\", contains only valid path characters, etc.
Returns whether contains any invalid path characters.
This method uses a cached array, in contrast to ,
which allocates a new array for each call.
Returns a relative path from to .
The parameters are treated as folders if they end in "\", otherwise as filenames. The
path from c:\foo\bar to c:\cat\dog is ..\cat\dog -- NOT ..\..\cat\dog because "bar" and
"dog" are files, not folders. If "bar" is a folder, you must append "\" to ask for the
path from c:\foo\bar\ to c:\cat\dog -- THEN the answer will be ..\..\cat\dog.
Combines a relative path with a base path to return a rooted version of the relative path, collapsing any
".." segments that appear at the beginning of the relative path.
Advances to the next segment of the parser's path.
True if a segment was found, false if not.
Compares the current segment of this parser to the current segment of another
parser, by ordinal, ignoring case.
Adds a WeakReference to the item to the collection.
The item to add to the collection.
Clears all items from the list.
Removes an item from the underlying collection, if it exists. This
is O(n), where n is the number of WeakReferences currently in the list.
The item to remove from the collection.
True if the item was found and removed, otherwise false.
Gets a list containing strong references to the items in this collection.
A list containing strong references to items in this collection.
Return the number of strong references remaining in the collection.
Note that this is O(n), where n is the number of WeakReferences
currently in the list.
Creates a new inner list copy containing the currently-living
items.
The size that's expected
for the compressed list.
A structure that represents a feature flag which consists of a name and the enabled state
A Boolean value indicating whether the feature should be enabled
A string of the form ^(\w+\.)+\w+$, following a pattern of [AreaPath].[Name]
A string value which will be displayed on the preview pane.
A comma separated list of channels which will control the visibility of the feature flag on the preview pane.
A URL to more information about the feature flag to be displayed on the preview pane.
A description about the feature flag
A string indicating the required action necessary to apply the feature when the user checks the feature flag on the preview pane.
This will be appended with the string "requires" and displayed with the title on the preview pane.
A URL for the Preview Pane for the users to provide feedback on the feature
A string specifying the package guid to lookup localized strings
A comma separated list of channels where the default value will be overriden.
A comma separated list of channels where the feature will be visible on the preview pane to internal users only.
A comma separated list of experiments where the feature will be visible on the preview pane.
Construct a FeatureFlag with all the properties to display it on the Preview Features Pane as well.
A string of the form ^(\w+\.)+\w+$, following a pattern of [AreaPath].[Name]
A Boolean value indicating whether the feature should be enabled.
A string representing the title of the feature flag to be displayed on the preview pane.
A comma separated list of channels for which the feature flag will be showed on the preview pane.
A link to provide more information about the feature flag.
A brief description about the feature flag to be displayed on the preview pane.
A string for ex: restart indicating the action required for the feeature to take effect.
A link for users to provide feedback about the feature.
A string specifying the package guid to lookup localized strings.
A comma separated list of channels where the default value will be overriden.
A comma separated list of channels where the feature will be visible on the preview pane to internal users only.
A comma separated list of experiments where the feature will be visible on the preview pane.
A service that can be used to determine if a feature should be enabled or disabled. It can also
be used to enumerate the current state of feature flags. This service is free-threaded.
This store trumps all other stores, unless is asked to skip it.
This store always trumps the .
This is the store of last resort.
The lock to acquire before accessing mutable fields.
A dictionary of feature flag *paths* (i.e. processed by ) to the result of
as it was returned from or (in that order).
Obtain the lock when accessing this dictionary.
A dictionary of feature flag *paths* (i.e. processed by ) to the result of
as it was returned from .
Obtain the lock when accessing this dictionary.
Creates an instance of the feature flags service that can be used to determine if a feature should be
enabled or disabled as well as enumerate registered flags.
An implementation of that contains the default values for registered flags.
An implementation of that contains the customized values for registered flags.
Creates an instance of the feature flags service that can be used to determine if a feature should be
enabled or disabled as well as enumerate registered flags.
An implementation of that contains the default values for registered flags.
An implementation of that contains the customized values for registered flags.
An implementation of that contains remote overrides for non-customized values for registered flags.
Drops any event handlers added to the objects provided to the constructor.
This method is used to determine whether a feature is enabled. If the flag cannot be
located, or if there is an error processing the request the default value is returned.
A string of the form ^(\w+\.)+\w+$, following a pattern of
[AreaPath].[Name]
The value returned if there is an error processing the request
or if the flag cannot be located.
The current state of the feature flag or the defaultValue if there is an error
processing the request
Do not use this method as it's intended for Telemetry only.
This is used to determine the value of a feature without user customization.
To get the value of Feature flag use
This will check for feature flag value in remote store, if not found, falls back
to default store.
A string of the form ^(\w+\.)+\w+$, following a pattern of
[AreaPath].[Name]
The value returned if there is an error processing the
request or if the flag cannot be located.
The default value or current state of the feature flag if there is an error
processing the request
This method is used to get the value of feature flag from the stores.
If the flag cannot be located, or if there is an error processing
the request the default value is returned.
A string of the form ^(\w+\.)+\w+$, following a pattern of
[AreaPath].[Name]
The value returned if there is an error processing the request
or if the flag cannot be located.
Determines whether the customization store will be checked for value or not.
If it is true then first customization store will be checked,
then remote store and then fall back to default store.
If it is false, then first remote store will be checked,then fall back to default store.
The path of the feature flag if know. Otherwise it will be calculated using the default transform.
The current state of the feature flag or the defaultValue if there is an error
processing the request
A method used to retrieve all feature flags for this user and appid combination.
The values of the flags returned are the currently set values and may differ from
the defaults. This will only return the set of registered flags.
An enumerable collection of
Gets information about a feature flag.
The name of the feature.
If true, will reflect the current enabled state of the feature, taking into account
targeted notifications and user customizations. If false, it will be the hard coded default for this feature. Passing
false when the current enabled state is not needed improves performance.
The retrieved information if the return value is true.
Whether the information was retrieved successfully.
Replaces '.' with '\' characters.
The period-delimited feature flag name.
The backslash-delimited path name to the feature flag.
A recursive function that aggregates all feature flags at the given collection path and below into the specified collection.
The path under which to start searching for feature flags.
The collection to add discovered flags to.
Arguments for the event raised by the event.
Initializes a new instance of the struct.
The name of the feature flag. This value uses '.' as a separator.
true if the feature flag is enabled; false otherwise. Use null to indicate removal of the setting from the store.
Gets the name of the feature flag whose value has changed.
This value uses '.' as a separator.
Gets a value indicating whether the feature flag is enabled.
A service that can be used to determine if a feature should be enabled or disabled. It can also
be used to enumerate the current state of feature flags. This service is free-threaded.
This method is used to determine whether a feature is enabled. If the flag cannot be
located, or if there is an error processing the request the default value is returned.
A string of the form ^(\w+\.)+\w+$, following a pattern of
[AreaPath].[Name]
The value returned if there is an error processing the request
or if the flag cannot be located.
The current state of the feature flag or the defaultValue if there is an error
processing the request
A method used to retrieve all feature flags for this user and appid combination.
The values of the flags returned are the currently set values and may differ from
the defaults. This will only return the set of registered flags.
An enumerable collection of
An abstraction of the repository for feature flags. The collection semantics are modeled after IVsSettingsStore and as such:
Collections can contain properties and sub collections. Sub collection paths are described with the strings
like the directory paths of file systems. Path contains names of all the parent collections. Similarly, separator
used between the names of the parent collections is '\' (back-slash) character. Example of a sub collection path
would be: "Root Collection\Internal Collection\Leaf Collection".
Retrieves a boolean value stored under the with the dictated . If the
or doesn't exist, then null is returned.
The full path, separated by back-slash characters to the collection/subcollection to be queried
The name of the value to read
True or False depending on the state of the value of the name under the collection Path, or null if the value doesn't exist
Retrieves all subcollections under the . These are 'primitive' subCollections in that it is only
the next level of subcollections. For example a query of GetSubCollections with collectionPath 'Root Collection' against a collection
that contained "Root Collection\Internal Collection\Leaf Collection", would return 'Internal Collection'.
The full path, separated by back-slash characters to the collection/subcollection to be queried
The immediate subcollections rooted at the
Retrieves a string value stored under the with the dictated . If the
or doesn't exist, then null is returned.
The full path, separated by back-slash characters to the collection/subcollection to be queried
The name of the value to read
string value of the name under the collection Path, or null if the value doesn't exist
An abstraction of the repository for feature flags. The collection semantics are modeled after IVsSettingsStore and as such:
Collections can contain properties and sub collections. Sub collection paths are described with the strings
like the directory paths of file systems. Path contains names of all the parent collections. Similarly, separator
used between the names of the parent collections is '\' (back-slash) character. Example of a sub collection path
would be: "Root Collection\Internal Collection\Leaf Collection".
Returns an object providing access to the values under a collection.
Provides access to feature flag store values under a single collection path.
Retrieves a boolean value with the given . If the value doesn't exist, then null is returned.
Retrieves the names of all subcollections.
Retrieves a string value with the given . If the value doesn't exist, then null is returned.
Optionally implemented by an in order to invalidate any cached values
from prior calls to .
Occurs when the value of a feature flag changes.
Optionally implemented by an in order to invalidate any cached values
from prior calls to .
Watch for when the value of a feature flag changes.
A testability service to allow changing the state of a feature flag.
This method is used to set the state of a feature flag. Unlike IsFeatureEanbled
this method will throw if any of the flags are unrecognized (i.e. if the flag wasn't
registered with the service). EnableFeature immediately persists the
enabled state to the persistence store.
A string of the form ^(\w+\.)+\w+$, following a pattern of
[AreaPath].[Name]
A value indicating what the result of calling IsFeatureEnabled
with this will return
An abstraction of a writable repository for feature flags. The collection semantics are modeled after IVsSettingsStore and as such:
Collections can contain properties and sub collections. Sub collection paths are described with the strings
like the directory paths of file systems. Path contains names of all the parent collections. Similarly, separator
used between the names of the parent collections is '\' (back-slash) character. Example of a sub collection path
would be: "Root Collection\Internal Collection\Leaf Collection".
Deletes the given property from the collection. Succeeds silently if the property doesn't exist.
The full path, separated by back-slash characters to the collection/subcollection to be used
The name of the property to be deleted
Updates the value of the property to the given bool value. If the previous data type of the property was something else
this method overwrites it. If the property doesn't exist, it will create one. If the colleciton doesn't exist, it will be created.
The full path, separated by back-slash characters to the collection/subcollection to be written to
The name of the property to be written or created
The value to set the new/updated property to
Provides access to a Visual Studio proffered service.
The service identity and interface of the Visual Studio service.
When the service identity and interface are distinct types, use instead.
This service acquiring interface is typically acquired via a MEF import attribute. For example:
rdt;]]>
Gets an instance of the service.
A cancellation token.
An instance of the service.
Repeat calls to this method will return the same instance.
Thrown when the service is not available.
This may be because the service is not registered or because of a fault in the service factory.
An may include details about an activation failure.
Throw when is canceled before the request can be satisfied.
Gets an instance of the service.
A cancellation token.
An instance of the service if available; otherwise .
This method will not throw exceptions for missing services or faulted service factories.
It simply returns for any failure.
Throw when is canceled before the request can be satisfied.
Provides access to a Visual Studio proffered service.
The service identity of the Visual Studio service.The initial interface used to interact with the Visual Studio service.
This service acquiring interface is typically acquired via a MEF import attribute. For example:
rdt;]]>
When and are the same type, the interface is a simpler option.
Creates a new instance.
The search string to match against the names of log files. This parameter can contain a combination of letters (a-z and A-Z), numbers (0-9), underscores (_), and wildcard (* and ?) characters, but it doesn't support regular expressions.
See the remarks section for more details about the wildcard characters.
A valid log name can have any number of segments, and is of the form: Segment1.Segment2.Segment3
The wildcards in refer to path segments, and the following wildcards are permitted:
Question Mark (?)Matches exactly one period-separated segment in the log name.Asterisk (*)Matches one or more period-separated segments in the log name.
Configure configuration for registration of a new log streams with Trace Hub.
Registers a new log stream with the tracing hub and exposes it to requesting clients.
Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.
Logging options for a given log stream.
The
The .
This overload should not be used as it accepts a supplied from the client.
We reserve the ability to return a custom instance of and the result of this method should be used.
This method is being left in-place for scenarios where using a supplied from this API is not possible,
however due to performance reasons this overload should be avoided whenever possible.
Results of calls to register a new trace log stream.
Registers a new log stream with the tracing hub and exposes it to requesting clients.
Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.
Logging options for a given log stream.
The .
This is the preferred overload vs .
This allows the implementer of this interface to provide the TraceSource implementation.
Results of calls to register a new trace log stream.
Registers a new log stream with the tracing hub and exposes it to requesting clients.
Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.
Logging options for a given log stream.
Results of calls to register a new trace log stream.
Registers a new log stream with the tracing hub and exposes it to requesting clients.
Representing the fully-qualified id of a given log stream and all information that can be used to identify the log.
Logging options for a given log stream.
The Results of calls to register a new trace log stream.
This is the default level we will log at when the environment variables that control the log level aren't set.
This is the settings object that is the default when settings are not provided.
A that looks up the of a log
defined by .
A that looks up a set of names
Used to lookup the real in data structure.
Registers a new log stream with this local tracing hub instance.
Id of the log stream within the service, this should be globally unique. The
should be a fully-qualified hierarchical name starting with your team's namespace.
This should be a string like "Microsoft.VisualStudio.Debugger.Concord.DispatcherDiagnosticsLog" where the
last segment is a friendly name of the log. It is important to use a fully-qualified hierarchical name even
when this log stream is also classified by a . This must be unique across
all log streams from all services and components; when a duplicate request is received the method will
return an error code in .
Options describing how the tracing hub can treat this log.
The cancellation token.
A with the of the newly registered log, a status code in
indicating if the log was already registered or this is a new
registration or an error, a from
indicating the current logging
verbosity of the log stream, and a representing the directory and file prefix where
the log should be written to.
Registers a new log stream with this local tracing hub instance.
Id of the log stream within the service, this should be globally unique. The
should be a fully-qualified hierarchical name starting with your team's namespace.
This should be a string like "Microsoft.VisualStudio.Debugger.Concord.DispatcherDiagnosticsLog" where the
last segment is a friendly name of the log. It is important to use a fully-qualified hierarchical name even
when this log stream is also classified by a . This must be unique across
all log streams from all services and components; when a duplicate request is received the method will
return an error code in .
Options describing how the tracing hub can treat this log.
A with the of the newly registered log, a status code in
indicating if the log was already registered or this is a new
registration or an error, a from
indicating the current logging
verbosity of the log stream, and a representing the directory and file prefix where
the log should be written to.
Initializes a new instance of the class.
The fully-qualified id of the log stream. This should be globally unique and is immutable.
The of the log stream, this specifies the options for the log stream
at registration. This is mutable.
The current verbosity being logged for this log stream, specified in .
Gets the fully-qualified id of the given log stream.
Gets or sets the of the log stream.
Gets or sets the being recorded for the log stream.
Gets the prefix for the log file and ensures the directory exists.
representing the path and file name to prepend to the log file being written to or null
if log directory could not be created.
This class will only provide log registration that is not capable of doing cross-process correlation. It is advised to only use this for services that run within the devenv process;
however it should work for all services if you want to use this now.
Check back for a future update of this library.
The name of an environment variable that contains a unique hash that is shared among all ServiceHub processes sharing the same root client
process.
Note: This value must be kept in sync with the name in the DevCore repo.
This will create an instance that can be used to call
.
The handle to access Visual Studio services.
The generated will take ownership of this object.
The .
which may be awaited to retrieve the generated
This will create an instance that can be used to call
.
The handle to access Visual Studio services.
This is used to access a non-local TraceHub.
Indicates whether or not the resulting owns the IServiceBroker provided to it.
When set to the returned will dispose of the provided
when is called.
When set to the provided will not be automatically disposed.
The .
which may be awaited to retrieve the generated
Attaches an to the provided .
The to attach to the listener to.
The result from
.
indicating if the operation succeeded. If true, listener is attached, false otherwise.
Adds ambient context to an . Ambient context is implemented via the
method, which allows the caller to supply properties which will be set on all events emitted within the current execution context until the returned
is disposed. In other words, if two different threads or two different async flows are running concurrently, calling
in one will not affect the logging of the other, even if the other emits log entries while the
return value is active (not yet disposed).
Given a new ambient property, returns a value that is either the new property or a combination of the old and new properties.
Captures the current value of an on construction and restores it on disposal.
Maintains state to support looping while repeatedly attempting to open a file with exclusive access.
Manages "fire and forget" tasks by providing a way to wait until all in-progress tasks have completed.
Escapes strings that will be part of URLs so they won't interfere with URL processing
and won't be blocked as "dangerous".
Clear the settings store when it is initialized rather than download any new shared settings.
Clear the settings store when it is initialized rather than download any new shared settings.
List of settings to be cleared. Use this list to clear only a specific set of settings
as against deleting all the settings when is true.
Logs trace output.
Logs a single message.
The type of message, e.g. information or error.
A format string (as one would pass to ) or a literal string if is empty.
Arguments corresponding to the fields in the format string.
Compares objects based on their serialized JSON representation.
If target is a JValue, gets its underlying .NET object and returns true; otherwise, returns false.
If target is IEnumerable{KeyValuePair{string,JToken}}, returns its contents; otherwise, returns null.
Provides exclusive access to a resource with a guarantee that higher-priority access requests are
serviced first and equal-priority requests are serviced in the order they are made.
The requests currently waiting to acquire the resource, in the order they should be serviced. Lock this when accessing it.
Never acquire while holding a lock on -- that could lead to a deadlock.
This is used in to ensure that processing is serialized.
Acquires the access lock. The caller must dispose the returned object to allow subsequent requests to succeed.
The caller may NOT schedule any UI thread tasks or make any RPC transitions to the UI thread while holding the
lock. Doing so risks deadlock.
Lower priority numbers are serviced first.
This is used to cancel the wait.
Thrown if is canceled before access is granted.
Gets the number of access requests currently pending.
Due to multi-threading, the value may be invalid by the time it's returned.
Wait for to be available and signal the next request in line as
completed.
This method must always run on a background thread and not require the UI thread, to avoid
deadlocks.
Serializes simple, known types using TypeConverter (for perf) and everything else using Json.NET.
This helps avoid perf regressions during VS startup as long as only simple types are used for settings that
must be stored or retrieved during startup.
A JSON value will never begin with this so we can use it to distinguish JSON from specially serialized values.
Stores the Type and TypeConverter associated with each type name. In the static constructor, entries for
all the supported types will be added, but the TypeConverter values will be null. They will be changed
to non-null lazily as the TypeConverters are needed.
Serialize the given object to a string.
Ensures that the return value, when passed to Deserialize<object>, will be returned as the same type, as long as the original object was
a simple type like int, float, etc.. If this parameter is false, the type may be converted (e.g. int will be converted to long, float to double).
Complex and user-defined types will always be returned from Deserialize<object> as .
Converts an object to the type that would result if serialized via Json.NET and then deserialized,
but without actually using Json.NET (for perf reasons). For example:
- short => long
- int => long
- ulong => long unless its value is > long.MaxValue
- float => double
If the object cannot (or need not) be converted, the original object is returned.
If is a supported type for TypeConverter-based serialization, ensures the
converter is in _specialTypes and returns it; otherwise, returns null.
Try to unbox a value and then cast it to the requested type. Simply using the cast operator on
a boxed value, e.g. "return (T)value," will throw InvalidCastException if T is not exactly
the same type as value. To avoid this (allowing scenarios like storing a byte which is then
queried as an int), we first "rebox" the value as type T and then apply the cast operator.
Convert a serialized string to the representation that's most efficient to deserialize.
For well-known primitive types, this is our internal serialization format rather than JSON.
Re-serialize a in our internal format as double or decimal,
whichever provides more accuracy.
A token that must be of type
Allows reading and writing name-value string pairs in a file and implements IDisposable to hold the file open
until it's disposed.
We cache the globals, setting names, and dictionaries used to track file content changes because they are used
every time. We don't cache the indexed content because it can grow quite large and because callers access different
parts of it each time.
This is an inner class because it's closely tied to -- it isn't useful in
any other context. It's internal rather than private so it can be tested independently.
WARNING: do not call this without first acquiring the storage lock (e.g. via
StorageAccess.Open / OpenAsync).
Gets the number of access requests currently pending.
Due to multi-threading, the value may be invalid by the time it's returned.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
An object which releases the storage access when disposed.Thrown if the timeout is exceeded before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
An object which releases the storage access when disposed.Thrown if is canceled before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
An object which releases the storage access when disposed.Thrown if is canceled before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
An object which releases the storage access when disposed.Thrown if is canceled or is exceeded before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
An object which releases the storage access when disposed.Thrown if is canceled or is exceeded before access is granted.
Guarantee disposal of all provided objects even if exceptions are thrown.
Gets the number of access requests currently pending.
Due to multi-threading, the value may be invalid by the time it's returned.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if the timeout is exceeded before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if the timeout is exceeded before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if is canceled before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if is canceled before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if is canceled or is exceeded before access is granted.
Acquires access to the storage file. The caller may NOT schedule any UI thread tasks or make
any RPC transitions to the UI thread after this call before disposing the storage object. Doing so risks deadlock.
Reentrant (RPC) calls that occur while the lock is held can also lead to deadlocks because the returned object
holds a semaphore that is only released on disposal.
Thrown if is canceled or is exceeded before access is granted.
Update the the switch statement in
whenever this enum's values change.
Allows reading and writing name-value string pairs in a file and implements IDisposable to hold the file open
until it's disposed.
This class is immutable. To update it, we replace it with a new instance. This allows readers to operate
against a previous snapshot of the cache while the writer is updating it, without exposing them to race
conditions.
If the static cache exists and is valid, create an XmlIndexedStorage against it. This allows read-only storage
objects to be created while writers are active.
WARNING: do not call this without first acquiring the storage lock (e.g. via
StorageAccess.Open / OpenAsync).
An event handler similar to that returns a
so the handler can be asynchronous.
A handler for changes to an that returns a
so it can be asynchronous.
A handler for events raised by that returns a
so it can be asynchronous.
A handler for async events that returns a
A delegate that creates a stoage object, used by the constructor
of the storage factory.
A delegate that creates a storage object, used by the constructor
of the storage factory.
Processes a character span.
True if further processing should continue, false if processing should stop.
Delegates calls to to one or more other loggers.
that simply disposes a collection of other s when it is disposed.
Schedules tasks such that only one executes at a time and tasks requested while one is already
pending just piggyback on the pending task instead of resulting in new work.
The argument to be passed to the filter.
The main worker task.
Performs a check to decide whether to invoke the worker task. May be null.
The semaphore to use for serializing worker tasks.
Multiple calls to within this time span will be batched together.
By passing a nonzero , you can enable multiple calls
to be batched into a single task as long as each is within a time span of the
previous one. If you pass zero, multiple calls can still be batched but only into two or more tasks, not into
a single task.
Get maximum total size of log files allowed. This includes all logs, including the recent ones.
Get maximum number of log files allowed. This includes all logs, including the recent ones.
Delete files from , oldest first (by last write time), as long as the oldest file is at least
old and the total combined size is greater than bytes.
Logs trace messages to a file.
Arguments for message logging.
This method isn't thread safe (it mustn't run at the same time on two threads).
The task representing the previous instance of this method.
Serializes a string into . NOT THREAD SAFE.
The reason we do the encoding this way instead of using StreamWriter is to avoid memory allocations.
The number of bytes in the result (may be less than .Length
A decorator that can filter certain store updates so they aren't logged.
The result of an operation to retrieve a value from the settings store.
The value was retrieved and converted to the specified type successfully.
The value is not present in the store.
The stored value could not be deserialized.
The deserialized value could not be converted to the specified type.
The stored value is in a old serialization format that is no longer supported.
An unexpected error occurred.
Stores and retrieves strings. Used as an abstraction over the settings service in the hub and unit-test mocks.
Creates or changes a setting value. The value provided will replace the existing value only if
is equal to the current revision of the value. The revision number increases each time the value is set.
True if the value was replaced successfully, else false
Only used by tests. Does not fire change events.
Gets the unique ID for the settings store, which is randomly generated whenever the store is recreated.
Indicates the store has been updated, but what specific values may have changed is unknown. Clients maintaining cached copies
of data should refetch in this case.
Arguments for a change in the application's idle state.
Whether the application is currently idle.
Constructs a new object.
Controls the size of a collection of files (such as log files) by deleting older ones when necessary.
Removes files from if necessary to meet a size limitation.
The keys of items that were deleted. Order doesn't matter here. There may be items with the same key in both the and
list. This represents a replacement. This property will not be null.
Key/value pairs that were added, in chronological order (earliest at the beginning, latest at the end). There may be items with the same key in
both the and list. This represents a replacement. This property will not be null.
Handles merging operations for setting collections.
Given a baseline and two current lists, computes the merged result. The differences between the baseline and the current
lists are analyzed in terms of the following operations:
* Add a new item to the front (index 0)
* Remove an item from anywhere
This method derives an ordered list of operations that would transform the baseline into each of the current lists, combines
them, and applies them to the baseline to generate the result. The order of operations in "first" and "second" is maintained
within the list but not between lists; for example, if the baseline is {0}, first is {1,0} and second is {2,0}, the result
may be {1,2,0} or {2,1,0}. Both are equally valid.
Thrown when , , or is null.
Attempts to get a default setting override from the remote store, or defaultValue if it does not exist.
Determines if a collection of overrides exists.
Wrapper over HubClient (the useful parts).
Translates between private names and shared names. This allows an application to isolate its settings
from other apps by inserting a prefix or suffix.
Members of this interface may be called on any thread.
Given the name of a setting in the private store, returns the name by which the setting should
be identified in the shared and online stores.
May be thrown when is null.May be thrown when is empty.
Given the name of a setting in the shared/online store, returns the name by which the setting should
be identified in the private store.
May be thrown when is null.May be thrown when is empty.
Allows temporary blocking of changes to settings that have been modified since
a certain version.
Gets a string which can later be passed in to SuppressChangesToSettingsNewerThan to block changes to
settings modified since the time this method was called.
Blocks changes to settings modified since a given previous version. Any such changes will be silently
ignored. The suppression will continue until the return value is disposed. Only changes within the
same "cone" of execution will be affected; if someone else tries to change an affected setting in a
separate but concurrent async flow, that change will be allowed.
Indicates whether the specified setting is allowed to change based on active suppressions.
A collection of settings. The collection is ordered but the server is order-agnostic. Items can be added
only at the front but removed from anywhere. The collection is preserved by the server in the order it was created.
Keys are treated as case insensitive.
Members of this interface may be called on any thread.
Adds a new element to the front of the list. If there is already an element with the same key in the
list, that one is deleted.
An object which will be serialized and persisted as the new value.
A caller-specified object that will be exposed on change events.
Thrown when is null.Thrown when is empty.Thrown when the given object cannot be serialized.Thrown when the value cannot be persisted to the private store (for example, because the disk is full).Thrown when the serialized list exceeds the maximum allowed size.
Returns the value corresponding to the given key. Returns if the value is
missing or not parsable as .
Thrown when is null.Thrown when is empty.
Removes all elements from the list.
A caller-specified object that will be exposed on change events.
Thrown when the value cannot be persisted to the private store (for example, because the disk is full).
Removes a specific element from the list, or does nothing if the element is not found.
A caller-specified object that will be exposed on change events.
Thrown when is null.Thrown when is empty.May be thrown when is null.May be thrown when is empty.Thrown when the value cannot be persisted to the private store (for example, because the disk is full).
Gets a snapshot (not a "live" collection) of the keys in the list.
No exceptions may be thrown.
In case the underlying store has gotten out of sync with the in-memory list representation (which can happen if another
instance modifies the store, read the store content again and merge it with the in-memory list.
Thrown when the underlying store cannot be accessed within the timeout period.Thrown when an IO error occurs while reading the store.
This event handler may be invoked on any thread. When changes involve both deletions and additions (or replacements, which are modeled as
deletion+addition pairs) the additions will be applied first followed by the deletions.
Stores and retrieves settings as well as handling synchronization between applications and machines.
Members of this interface may be called on any thread.
Sets the value of a property.
An object which will be serialized and persisted as the new value.
Thrown when is null.Thrown when is empty.Thrown when the given object cannot be serialized.Thrown when the value cannot be persisted to the private store (for example, because the disk is full).Thrown when the serialized object exceeds the maximum allowed size.Thrown when exceeds the maximum allowed length.
Returns the value of a property, or the default if the value is not set.
Thrown when is null.Thrown when is empty.
Attempts to reads a value from the store and returns the result of the operation.
Thrown when is null.Thrown when is empty.
Retrieves an existing list or creates a new one if one with the specified name doesn't exist.
The reason for a special-case "get or create" method for lists (instead of letting the client pass, say,
IEnumerable to SetValue to create a list) is to avoid a race condition between two clients in which both
are composing lists "offline" at the same time. That would require the client to merge the two list
contents (or discard one of the lists). By requiring clients to use this method instead, we ensure that
lists are always "live", never "offline", so as soon as one client starts adding content to the list,
that content will be visible to all other clients.
Thrown when is null.Thrown when is empty.Thrown when the empty list cannot be persisted to the private store (for example, because the disk is full).Thrown when exceeds the maximum allowed length.
Returns the names of all settings currently stored whose names begin with the given prefix (case insensitive).
Thrown when is null.
Gets a collection representing all settings whose names match the specified pattern (either an exact match
or a prefix match depending on whether the pattern ends in '*', both case-insensitive).
The full name of a setting or a prefix ending in '*'. Case-insensitive.
Thrown when is null.Thrown when is empty.
Temporary internal helper method that will be removed after VS 14 Preview.
Temporary internal helper method that will be removed after VS 14 Preview.
The logger used to record setting store updates.
Returns the internal revision number of the given setting, or null if there is none.
Functionality provided by the application that creates an via
.
Raised when the host application goes idle or becomes active again, to enable reduced
resource usage during the idle period.
Raised when the host is about to shut down, to give the settings manager an opportunity
to release resources, finish or cancel async tasks, etc. The host should wait until
the async event handler is complete (e.g. using the
extension
method) before continuing.
Optional task indicating the host is finished starting. The settings manager will defer
resource-intensive tasks until after this task completes.
Optional translator between private and shared setting names.
The backing store for private settings.
A logger for error telemetry.
Determines whether a setting is private vs. shared/roamed.
The name of the setting to test.
False if the setting is private, else true.
Gets the name of the settings collection to be addressed by this host. This is used to partition settings
based on host parameters like VS's /rootSuffix parameter.
Gets the serialized telemetry settings from the host, obtained via ITelemetrySession.SerializeSettings.
This may be null if the host has no telemetry session.
Gets the application directory
Gets the serialized telemetry settings from the host, obtained via ITelemetrySession.SerializeSettings.
The result may be null if the host has no telemetry session.
The remote defaults store to override setting defaults.
Additional process infomation.
Use to add context to the log, does not need to follow any specific format.
A logger for recording updates to setting stores. May be null.
Gets a value indicating whether roaming and sharing should be enabled when the "RoamingEnabled"
setting hasn't been persisted yet.
If false, prevents roaming and sharing regardless of the value of the setting that normally controls it.
See for details.
Add a handler for settings change events.
The full name of a setting or a prefix ending in '*'. Case-insensitive.
If true, the event handler will be held using a weak reference so that
the handler can be GC'd without needing to call RemoveSettingsChangedHandler.
Call the provided handler before calling external handlers
to enable any custom processing (like a 3 way merge) of the the setting value before calling the external event handlers
Get traced event for the settings code marker.
Code marker to get the event for.
The traced event for the code marker
Sets the value of a property.
An object which will be serialized and persisted as the new value.
Cross process lock factory
The public API presented by the service module. Implementers should expect a separate instance to be created
for (at least) each client or (at most) each client request.
Initializes the service. Must be called once and only once per client connection, before any of the other methods.
The collection of settings to target. Each collection is isolated from the others. Typically a specific client instance
will target a single collection. In VS, the collection matches the /rootSuffix parameter of the client, facilitating
scenarios like isolation of the experimental hive for extension development. Must be non-null; empty string is OK.
Tells the service whether to synchronize with the user's online settings.
The client's stored revision number for the roaming enabled setting. This is used to avoid overwriting a more recently updated value.
Output of ITelemetrySession.SerializeSettings from the client.
The idenitifier of the client
The identifier of the client, i.e. a devenv instance
Thrown when this is called more than once.
Retrieves a setting by name (case insensitive); returns null if the setting does not exist.
The setting name (case insensitive)
Thrown when this is called before .
Stores a new value for a setting.
The setting name (case insensitive)
The attributes of the setting to store, and the client ID
Thrown when this is called before .
Deletes a setting.
The setting name (case insensitive)
The idenitifier of the client, included in the resulting change event
Thrown when this is called before .
Returns all setttings whose revision number is greater than .
Thrown when this is called before .
Delete all settings in the collection.
The idenitifier of the client, included in the resulting change event
Thrown when this is called before .
Gets the unique ID for the settings store, which is randomly generated whenever the store is recreated.
This allows clients to detect when the store has been deleted and their stored revision numbers are invalid.
A subset of settings (either a single setting or all settings matching a wildcard pattern)
for which one can subscribe to change events.
This event handler may be invoked on any thread.
A logger for settings store update records.
Logs a record of an update to a specific setting store.
The name of the store being updated, e.g. "private store".
The full name of the setting, including an app name prefix like "Blend-" if the setting is not shared across apps.
The full serialized value of the setting.
A value indicating whether the setting value content is specific to this machine.
The source of the update, e.g. "ISettingsManager.SetValueAsync" or "shared store update", if known; otherwise null.
The Azure Devops revision number associated with this value, if known; otherwise null.
The local shared store revision number associated with this value, if known; otherwise null.
The content of the baseline that was used in the three-way merge which produced this list value, if any; otherwise null.
A value indicating whether roaming is currently enabled on the machine.
A value indicating whether the setting is registered for roaming across machines.
Logs a record of a failure to update a specific setting in a specific store.
Logs a record of a failure to update a specific setting in a specific store.
Logs a record of a deletion in a specific setting store.
The name of the store being updated, e.g. "private store".
The full name of the setting being deleted, including an app name prefix like "Blend-" if the setting is not shared across apps.
The source of the update, e.g. "ISettingsManager.SetValueAsync" or "shared store update".
A value indicating whether roaming is currently enabled on the machine.
A value indicating whether the setting is registered for roaming across machines.
Logs a record of a failure to delete a specific setting from a specific store.
Logs a record of clearing all settings from a specific store.
The name of the store being updated, e.g. "private store".
The source of the update, e.g. "ISettingsManager.SetValueAsync" or "shared store update".
A value indicating whether roaming is currently enabled on the machine.
Logs a record of a failure to clear a specific store.
Signals the beginning of an operation that may log a large number of updates. The logger may choose to handle the logging differently during this
operation, e.g. batching the updates for telemetry and posting a single event at the end.
Adds ambient context to an . Ambient context is implemented via the
method, which allows the caller to supply properties which will be set on all events emitted within the current execution context until the returned
is disposed.
Sets one or more ambient property values that will be added to all store logging (unless overridden by local parameters)
until the returned is disposed. These apply only to the current execution context, so other
threads or async execution flows running concurrently, even against the same logger instance, will not be affected.
Stores and retrieves strings. Used as an abstraction over the registry and unit-test mocks.
Members of this class may be called on any thread.
Returns the value and machine-local flag for the named item, or null if the item doesn't exist.
The case-insensitive name of the setting.
May be thrown when is null.May be thrown when is empty.
Returns the names of all settings currently stored whose names begin with the given prefix (case insensitive).
May be thrown when is null.May be thrown when is empty.
Stores a value and machine-local flag under a specified name.
The case-insensitive name of the setting.
Setting value.
Action to execute before raising property changed events.
May be thrown when or is null.May be thrown when is empty.
Deletes a stored value.
The case-insensitive name of the setting.
May be thrown when is null.May be thrown when is empty.
Deletes all stored values.
Raised when a setting value is created, changes, or is deleted.
This event handler may be invoked on any thread.
Processes the name of each persisted setting that begins with .
When the processor delegate returns false, processing stops.
Handles uploads and downloads, including revision tracking.
Upload the specified setting from the private store to the shared store. If the local setting is missing, delete it from the shared store.
If the upload succeeds, the local revision number is updated. If the upload fails, a download from the shared store is triggered.
Uploads all settings in the private store for which returns true.
Returns the highest revision number in the private store.
Given a serialized value downloaded from the shared store, stores it (along with the new revision number) in the private store. Lists are
merged if necessary. If is null, the setting will be deleted from the private store.
The name of the setting
The serialized value
Indicates whether this is being called as a result of a setting change notification from the shared store
Performs preparation steps before the initial sync, if any are needed.
A description of the prep work done, or null if none was performed.
Deletes all locally stored revision numbers.
The result of a call to .
The index (in the Json) of the character following the deserialized string.
This will also be referenced from the settings service module.
Parse a string encoded as JSON
The JSON, within which the string we want to parse is embedded
The index of the character just after the starting quote
The buffer where the result will be stored
The index of the closing quote character
Presents an IDictionary facade over a dictionary with lazy values, so that retrieving a value
via the non-lazy facade automatically instantiates it.
Returns the string length + 2 (for quotes), or the length of the null token, as a quick approximation of the serialized
Json length. The actual serialized length will be greater if there are characters that need escaping.
Returns a pair of indices indicating the position of the delimiters.
Handles merging operations for setting collections.
Members of this class may be called on any thread.
The keys of items that were deleted. Order doesn't matter here. Deletions are always applied before additions.
Key/value pairs that were added, in chronological order (earliest at the beginning, latest at the end). Additions
are always applied after deletions.
Given a baseline and two current lists, computes the merged result. The differences between the baseline and the current
lists are analyzed in terms of the following operations:
* Add a new item to the front (index 0)
* Remove an item from anywhere
This method derives an ordered list of operations that would transform the baseline into each of the current lists, combines
them, and applies them to the baseline to generate the result. The order of operations in "first" and "second" is maintained
within the list but not between lists; for example, if the baseline is {0}, first is {1,0} and second is {2,0}, the result
may be {1,2,0} or {2,1,0}. Both are equally valid.
Thrown when , , or is null.
Merge two sets of changes into one, eliminating duplicates based on key values.
Compares "original" and "target" lists to generate a list of changes that would transform the former into the latter.
The only operations supported are "add to front" and "delete (from anywhere)". Examples:
{x,y,z} -> {a,b,c}: delete x, delete y, delete z, add c, add b, add a
{x,y,z} -> {a,x,y}: delete z, add a
{x,y,z} -> {x,y,a}: delete z, delete y, delete x, add a, add y, add x
{x,y,z} -> {x,a,y,z}: delete x, add a, add x
{x,y,z} -> {y,z,x}: delete z, delete y, add z, add y
Same as the static ThreeWayMerge method; provided to facilitate unit testing.
A setting value serialized as a string along with an associated name, version, and machine-local flag.
Members of this class may be called on any thread.
IStoreUpdateLogger decorator that translates setting names from their "private store" representation
to their "shared store" representation so they will be consistent with logging from the settings
service module.
This exception is thrown from when attempting to create a setting whose name
exceeds the length limit imposed by the roaming settings server (currently 128 characters).
Members of this class may be called on any thread.
Settings event that may be fired by the settings service.
No event. The default value.
Event that is fired by the roaming settings service when it ends sync with the server and the clients.
Event that is fired by the roaming settings service when it ends processing sign in state change.
Event that is fired with sync with the shared store ends.
Event that is fired when the uploads are complete.
Event that is fired when the settings are uploaded online.
Event args for a settings event.
Initializes a new instance of class with the provided .
Settings event.
Gets or sets the settings event.
describing a change to an .
Members of this class may be called on any thread.
Returns a describing the addition of a single item to a list.
No exceptions may be thrown.
Returns a describing the removal of a single item from a list.
No exceptions may be thrown.
Returns a describing the removal of multiple items from a list.
No exceptions may be thrown.
Returns a describing the replacement of a single item in a list.
No exceptions may be thrown.
Returns a describing the removal of all items from a list.
No exceptions may be thrown.
An operation performed on an .
An item as been added to the list. The added item is specified by
.
An item has been removed from the list. The removed item is specified by
.
Multiple items have been removed from the list. The removed items are specified by
.
An item has been replaced by a different item. The old item is specifed by
and its replacement by
.
All items have been removed from the list. The removed items are specified by
.
Invoke the store change handler at some future point but do not wait on it. Returns a completed no-op task.
This should ONLY be called via , to ensure that execution
of this method doesn't overlap with itself.
Called when something changes in the private or shared store, this method sends change events
to all the applicable listeners.
This is a perf hot path. Because of this, we log success telemetry (and non-exception failure telemetry) asynchronously.
Exception telemetry is synchronous in case the exception (which is re-thrown) crashes the process (which would prevent
asynchronous telemetry from being logged).
Get traced event for the settings code marker.
Code marker to get the event for.
The traced event for the code marker
A factory class that constructs an .
Members of this class may be called on any thread.
Provides a settings manager for this application.
The host of the settings manager. Must implement .
ArgumentNullException if is null.
This exception is thrown (from , , etc.) when a setting value is given whose
serialized representation exceeds the size limit on the roaming settings server (currently 1MB).
Members of this class may be called on any thread.
A non-generic way to refer to a , and also the place where the
well-known properties are defined.
All well-known properties should have reference/nullable type parameters so the fallback logic for resolving ambient/
local property values will work correctly.
A setting may be persisted in different formats as it flows through the pipeline. This is a representation of the
setting value that will remain constant regardless of the underlying serialization format.
A store log property without a value assigned.
The property type
A store log property definition of type that supports "nesting". See
for details.
A non-generic way to refer to a .
A store log property with a specific value.
The property type
A store log property of type that supports "nesting" -- e.g. if ambient property value "foo"
is already set and a new ambient property value "bar" is set, the result will be "foo : bar".
A setting value serialized as a string along with a flag indicating whether the value
contains machine-local content.
Members of this class may be called on any thread.
An ambient store logging property instance that doesn't provide a value of its own but
suppresses any existing ambient value for the property.
Sends log output to both the telemetry log and trace logs.
A logger class that implements ITelemetryAndTraceLogger but does nothing
Telemetry logging for the settings manager, provided by the host application.
Members of this class may be called on any thread.
Logs information about an operation failure.
May be thrown when is null.
Logs information about an operation failure associated with a specific exception.
May be thrown when or is null.
Logs information about a successful operation.
May be thrown when is null.
Formats a setting value for log output, e.g. truncating it if very long to avoid bloating the log files too much.
A setting-related action that can be logged via telemetry.
The context of a setting-related action for logging via telemetry.
Members of this class may be called on any thread.
No exceptions may be thrown.
A high-level scenario type for a setting-related action logged via telemetry.
The scope of the setting involved in a setting-related action logged via telemetry.
Indicates whether this is being called as a result of a setting change notification from the shared store.
Immutable parameters collection for IUploaderDownloader creation.
Constructs a new instance.
The settings manager
The local backing store
A serializer for converting arbitrary types to/from string representation
Deserializes the given string as a list; returns null if deserialization fails
Serializes a value and stores it in the local backing store
Controls whether local store changes in the current async flow should trigger an upload
Registers a "fire and forget" task but does not wait on it
Fires an event to listeners as if the private store had signaled a setting change
Lock factory to acquire cross process locks
A setting value serialized as a string along with an associated version and machine-local flag.
Members of this class may be called on any thread.
A metadata reader that utilizes instance.
Type of the key used.Type of the value returned.
Interface to convert a key type to/from string.
The type fo the key to be used.
Converts a string value to a key value to be used in metadata store.
String presentation of the key.
an instance of TKey
Converts a key value to a string representation for to be used in the cache.
Key value to convert.
String representation of the key, default implementation calls ToString.
Initializes a new instance of the class.
Extension identifier.
A trace source to log with.
Optional joinable task factory instance to use for async operations.
A token that should canceled when the process is trying to shutdown.
Processes and returns a dictionary of Key/Value pairs.
The file to process.
Token to signal cancellation.
A dictionary of keys and values to be lazily created.
Attempts to load the passed in metadata into the existing passed in map.
If a collision is encountered, skip the key, but do not error.
Lazily creates one instance of a store to be shared among different instances of a service.
The service to be created by this factory.The store required to create the service.The reader required to create the service.The key type used in the store.The value type used in the store.
Creates an instance of a service using a shared instance of a store.
An instance of the service.
Initializes a new instance of the class that can be shared across brokered service instances.
Gets the data type moniker used for cache identification.
Converts a string to a key type.
Serialized version of the key data.
an instance of TKey.
Converts a key value to a string representation for to be used in the cache.
Key value to convert.
String representation of the key, default implementation calls ToString.
Telemetry event and property names for metadata store related functionality.
Summary of cached extension data.
Extension identifier.
File paths and timestamps (in UTC) for cache validation.
Data type moniker.
Collection of available section names.
Gets the extension identifier.
Gets the file paths and timestamp for cache validation (in UTC).
Gets the data type moniker (type of the data stored).
Gets the available set of section names.
An interface for providing extension locations to metadata service.
Validates that the extension path is enabled and valid to use.
Path to the extension root folder.
true if extension can be used, false otherwise.
An interface for an optional cache to be utilized by extension metadata service.
The cache is designed to rely on file last modified timestamps for entry validation.
Gets the extensions for a given data moniker type.
Data type moniker.
Cancellation token to monitor.
a collection of for valid extensions or null if cache is not valid.
Reads cached entry for a given extension, section name and data moniker.
Target type to use for serialization.
Extension identifier.
Section name to query.
Data type moniker.
Cancellation token to monitor.
a instance.
Updates specified section entries for an extension.
Target type to use for serialization.
Extension identifier.
File paths to utilize for time stamp checks in cache verification.
Data type moniker.
Async update function to call if extension needs to be updated. Key represents the section name.
Cancellation token to monitor.
return true if extension was up to date and no action was taken.
Removes all extension data for the given extension.
Extension identifier.
Cancellation token to monitor.
Task indicating completion.
An interface for observing metadata changes with async method.
Notifies the observer of metadata changes in the sections they were subscribed for.
Set of updates to the metadata sections.
Cancellation token to monitor.
Task indicating completion.
Notifies the observer when no further changes are expected.
Cancellation token to monitor.
Task indicating completion.
An internal interface for more advanced subscription scenarios.
Subscribes to metadata changes for a list of sections.
Metadata sections requested for update notifications.
Observer instance.
List of sections that this observer should wait for.
Cancellation token to monitor.
A disposable object to manage lifetime of the subscription.
A result entry for extension metadata cache read.
Gets whether the result was read successfully and is valid.
Data that is read if IsValid is true.
A result entry for extension metadata cache read.
Gets whether the result was read successfully and is valid.
Data that is read if IsValid is true.
Gets whether the result was read successfully and is valid.Data that is read if IsValid is true.
Hold a disposable so that it is possible to automatically dispose on error and also possible to hold onto the disposable after work is completed.
using(var holder = disposable.Hold())
{
//use disposable
// remove the value from the holder so that we can continue to use the disposable.
disposable=holder.TakeValue();
}.
A disposable class.
Access the disposable content while keeping it inside the holder and therefore subject to the current `using` scope.
Held value.
Release the disposable content from the holder so that a `using` on the current holder doesn't dispose it when going out of scope.
Held value.
Move the disposable content to a new holder so that it can be assigned to a different `using` scope.
New holder with the value of this holder.
Creates an instance of .
The ID of the extension.
The install path for the extension.
Container for a set of extension install updates or notifications
A strongly-typed resource class, for looking up localized strings, etc.
Returns the cached ResourceManager instance used by this class.
Overrides the current thread's CurrentUICulture property for all
resource lookups using this strongly typed resource class.
Looks up a localized string similar to Error duplicate resource '{0}' found. Skipping adding the resource to the dictionary..
Looks up a localized string similar to Requested extension metdata file '{0}' was not found..
Looks up a localized string similar to Parsing file '{0}' for extension '{1}' failed..
Looks up a localized string similar to Failed to register directory {0} for monitoring..
Looks up a localized string similar to Extensions have changed:\n\n{0}\n\nScheduling an extensions changed notification..
Looks up a localized string similar to Triggering extensions changed notification with extensions:\n\n{0}.
Looks up a localized string similar to Failed to process extension {0}. Exception: {1}..
Looks up a localized string similar to Extension installed to '{0}' provides metadata for the following keys: {1}.
Looks up a localized string similar to Extension providing a duplicate resource was uninstalled. Adding resource '{0}' from extension '{1}' to the '{2}' dictionary..
Looks up a localized string similar to The {0} '{1}' was not found..
The minimum size of a file for it be worth while to lazily load it's sections and require the file to be opened a second time instead of storing it in memory.
Client that communicates with the ServiceHub ServiceModule.
A list of observers in dependency order.
Initializes a new instance of the class. Is owned by a single caller.
Metadata store shared instance.
A joinable task factory.
Passing in null for addedExtensions indicates that the full set of available metadata should be sent.
This service provider is used to create instances of IExtensionMetadataService only and does not respond to
any other queries.
Manages JSON metadata stored in extensions.
Data type moniker used for caching when storing JToken sections.
This class will monitor the extension directories and fire the event when an extension is installed or uninstalled.
An event to be fired whenever the store changes.
Interface to read extension metadata from an installed extension.
The type fo the key to be used for the reader.The type of the value of the metadta for the reader.
Gets the identifier for this reader. This value doesn't have to be unique across readers.
Gets the full path to the files to be checked to verify if a cache is up-to-date.
Enumerates the list of keys available through this reader.
Cancellation token to monitor.
List of keys that this reader exposes.
Gets the data for a specified key.
Key name.
Cancellation token to monitor.
JToken object representing the metadata.
Updates the store's internal state whenever extensions are added or removed.
Contains the set of changed extensions.
A token to signal cancellation.
The MetadataStoreChangedEventArgs resulting from the change of extensions.
Fires the StoreChangedEvent on the MetadataStore.
The arguments to be passed to the StoreChanged event.
This should be the object returned from calling of .
If true, the event should be fired regardless of any optimizations.
A token to signal cancellation.
A task to track the async work.
A factory class for creating extension metadata services including extension.json data and localized string resources.
Creates an instance of extension metadata service.
TraceSource instance to utilize for logging.
Cancellation token to monitor.
an instance of .
Creates an instance of extension resource dictionary service.
TraceSource instance to utilize for logging.
Cancellation token to monitor.
an instance of .
Creates an instance of metadata services factory.
Observable instance providing extension paths to monitor.
TraceSource instance to utilize for logging.
JoinableTaskFactory instance to utilize.
Extension metadata cache instance to utilize, can be null if no cache is provided.
Cancellation token to monitor.
an instance of .
Creates an instance of metadata services factory.
Observable instance providing extension paths to monitor.
TraceSource instance to utilize for logging.
JoinableTaskFactory instance to utilize.
Cancellation token to monitor.
an instance of .
Creates an instance of TraceSource for a given service moniker and contract type.
Service broker instance to utilize.
Service moniker this trace source is intended for.
Optional trace source options.
Cancellation token to monitor.
an instance of TraceSource instance that can be passed to factory methods.
NOTE: This class is not thread-safe.
A dictionary where the key is ExtensionResourceDictionaryItem.Key.
A dictionary of keys that have multiple extensions providing them. The values are a dictionary where the key is the extension identifier and the value is the value of the key for that extension.
used to override the CurrentCulture from unit tests. For some reason QTest doesn't properly handle CultureInfo.CurrentCulture
Initializes a new instance of the class that is owned by a single caller.
Metadata store shared instance.
Used by unit tests to work around unit test framework issue with QTest
A base class to encapsulate extension part changes for a specific contract
RPC contract interface type.
Initializes a new instance of the class.
Parent proxy manager to utilize for querying proxies.
Optional logger instance to utilize.
Gets the logger instance to utilize.
Activates the collection by completing IExtensionPartListener.ActivationTask.
Checks if part metadata is applicable for this collection, base implementation will always return true.
Disposes the object.
true if managed resources should be disposed.
A class to encapsulate extension part changes for a specific contract.
RPC contract interface type.
Initializes a new instance of the class.
Parent proxy manager to utilize for querying proxies.
Optional filter callback method.
Optional logger instance to utilize.
Disposes the object.
true if managed resources should be disposed.
A class to encapsulate extension part changes for a specific contract and allows parts to be created lazily.
RPC contract interface type.
Initializes a new instance of the class.
Parent proxy manager to utilize for querying proxies.
Optional logger instance to utilize.
Disposes the object.
true if managed resources should be disposed.
A manager to get components out of Gladstone extensions and managing their lifecycle.
This implementation is meant to be used by IDE hosts, components should query the IDE per the supported
extensibility mechanism and not create their own instance.
Initializes a new instance of the class.
Service broker instance to utilize.
Gets a proxy for an extension part, this could be a proxy that was already created that has multiple contracts.
Proxy interface type (could be the contract type or an aggregated interface).
Service moniker to query for.
Extension that owns the service.
Listener instance that made the request, this will be used to notify the listener when service availability changes.
Cancellation token to monitor.
an instance of T or null if proxy could not be created or does not exist.
Removes a previously registered listener, this could be raised when the listener is disposed externally.
Listener to be removed.
Gets the service descriptor for a given service moniker.
Service moniker to generate the descriptor for.
Optional extension that the part belongs to.
an instance of .Any custom implementation returned here must inherit from and call its base types
to allow for contract interface aggregation to work correctly.
A record for an extension part.
Initializes a new instance of the class.
Name of the attribute type.
Key value pair for named arguments.
JObject representing the values dictionary.
Initializes a new instance of the class.
Name of the attribute type.
Key value pair for named arguments.
Gets the name of the attribute that contributes to metadata.
Gets the dictionary of named arguments.
Tries to deserialize metadata in to the given type.
Type to deserialize in to.
Value to be returned if deserialization is successful.
true if metadata was deserialized successfully, false otherwise.
A JSON converter to read extension part metadata from parts.
Set of listeners that were registered and buffered registrations for them if there is any.
An extension part record combining metadata and an async method to get the part.
Creates an instance of .
Metadata for the extension part.
AsycLazy to utilize to get the extension part instance.
The extension identifier that extension part belongs to.
A unique identifier for the extension part that can be used as a dictionary key.
Gets the metadata for the extension part.
Gets the extension identifier for the part if there is one available.
Gets the unique part identifier. This can be used as a persistent opaque value across sessions.
The value will remaining consistent as long as part is backed by the same service and contract.
Gets the part instance.
Thrown when part is no longer valid.
Tries to get the given metadata name as T.
Type to deserialize metadata value to.
Name of the metadata to search for.
Value to be returned.
true if metadata was found and deserialization was successful.
Invalidates a record so that part factory can't be executed anymore and an instance will only be returned
if it was already created.
A record for an extension part.
Initializes a new instance of the class.
Contract type, usually the full type name of the RPC contract interface.
Service moniker that should be used to retrieve this part.
Metadata collection assigned to the extension part.
Gets the contract type, usually the full type name of the RPC contract interface.
Gets the service moniker that should be used to retrieve this part.
Gets or sets the key value to identify this registration.
Gets the optional metadata assigned to the extension part.
Gets an instance of that has the correct properties set.
Service moniker to return the descriptor for.
Version of the descriptor, only supported value is 1 for now.
an instance of .
A service descriptor for extension parts that is utilized by .
Initializes a new instance of the class.
Service moniker this descriptor is intended for.
Message formatter to utilize.
Message delimiter to utilize.
Initializes a new instance of the class.
Descriptor to copy from.
An interface for being notified of collection changes on extension parts implementing a certain contract.
Contract type that extension parts would implement.
An event that is raised when new parts are added to the collection.
An event that is raised when parts are removed from the collection due to service availability changes.
Starts the monitoring of the collection, this method should be called once the event handlers are registered.
Returns an immutable collection of current set of parts available.
an immutable collection of objects that implement contract type.This collection is only meant for short term use and should not be stored across invocations.
Event arguments for extension parts added or removed events.
Type of the contract that is being monitored.
Initializes a new instance of the class.
Extension parts that are listed in this event.
Gets the parts that are listed in this event (could be added or removed parts).
An interface for being notified of collection changes on extension parts implementing a certain contract.
Contract type that extension parts would implement.
An event that is raised when new parts are added to the collection.
An event that is raised when parts are removed from the collection due to service availability changes.
Starts the monitoring of the collection, this method should be called once the event handlers are registered.
The first invocation of PartsAdded after this method will contain all the currently available parts and will
be delayed until initial discovery of parts is completed. This initial discovery may happen from a cache generated
during an earlier session of Visual Studio.
Event arguments for extension parts added or removed events.
Type of the contract that is being monitored.
Initializes a new instance of the class.
Extension parts that are listed in this event.
Gets the parts that are listed in this event (could be added or removed parts).
An internally interface for a component that listens for extension part changes.
Gets the contract type that this instance is intended for.
Gets a task that is completed when the listener is activated and parts can be forwarded to it.
Returns true if an extension part is applicable for this listener based on its metadata.
Extension part metadata to filter against.
true if part is applicable and should be included in the collection, false otherwise.
This method is called when new extension parts should be added to the collection. All parts are guarenteed to be for the contract type specified on the interface.
Extension parts to be added.
Set to true if notification should be sent for an empty list as well.
This method is called when new extension parts should be added to the collection.
Extension parts to be removed.
Called when service availability is changed for the provided service moniker, which should prompt for a requery of the proxy.
Service moniker that was impacted.
An interface for components to retreieve extension parts that implement a contract by brokered services.
Gets a dynamic collection of parts that implement a certain contract in new extensibility framework.
RPC contract interface type.
Filtering condition based on metadata in extension.json.
Cancellation token to monitor.
an enumeration of proxies that implement contract interface.
Gets a dynamic collection of parts that implement a certain contract in new extensibility framework.
RPC contract interface type.
Cancellation token to monitor.
an enumeration of proxies that implement contract interface.
Gets a dynamic collection of part metadata and a lazy constructor that implement a certain contract in new extensibility framework.
RPC contract interface type.
Cancellation token to monitor.
an enumeration of proxies that implement contract interface.
An internal interface for a listener to get a proxy from a central cache manager.
Gets a proxy for an extension part, this could be a proxy that was already created that has multiple contracts.
Proxy interface type (could be the contract type or an aggregated interface).
Service moniker to query for.
Extension that service belongs to.
Listener instance that made the request, this will be used to notify the listener when service availability changes.
Cancellation token to monitor.
an instance of T or null if proxy could not be created or does not exist.
Removes a previously registered listener, this could be raised when the listener is disposed externally.
Listener to be removed.
A service contract interface to retrieve an instance of through service provider.
Implements support for tracking component versions within a single context (could be a process, extension boundary).
Registers a component identifier to be owned by this context, requests for component version
increments can only be done for registered identifiers.
Component identifier.
Component display name for diagnostics.
true if registration was successful, false if component was already registered.
Gets the header that represents the current state of the context including any pending updated state.
an instance of that represents the current state.
Increments the version of the specified component.
Component identifier to update.
true if successful, false if component was not registered or a conflict occured.While a component version can be incremented from different threads, the version change will be reflected immediately
on all subsequent calls.
Gets an instance of that represents the state change from previous instance to current instance.
Previous header to calculate delta from.
an instance of that represents the new state and any pending message updates.
Executes the provided body of work in the correct context order based on the passed in.
Type that the async work to be executed returns.
Header that describes the version requirements.
Asynchronous work to be executed.
a Task that represents the completion of the work passed in.
A serializable header for Json-RPC messages that describes version requests.
Gets the suggested Json-Rpc top level property name for storing version header.
Gets the instance of empty version header.
Initializes a new instance of the class.
List of message version requirements.
Gets the list of message version requests for a message to be processed in order.
Create a header that contains updates to the versions specified in new header.
New header to calculate updates to.
a new instance with update requests.This method will throw if either instance contains existing update requests.
Describes a version request for message context in a .
Initializes a new instance of the class.
The short form context identifier.
Required version to process the message.
Optional new version to update context once message is processed.
Optional display name for the component, can be passed in initial requests for diagnostics.
Gets the short form context identifier.
Gets the version required for this context before processing the message.
Gets the optional version to be updated once message is processed.
Gets the optional context display name for diagnostic purposes.
Gets the same instance without display name value.
an instance of .
Provides internal feature flag information.
Gets the internal collection path of the feature flag.
The name of the feature.
The path of the feature flag.
Gets information about a feature flag used to determine if a flag is visible in the UI.
The returned will only have those properties required for determining visibility.
All other properties will be null.
The name of the feature.
The internal collection path of the feature.
The retrieved information if the return value is true.
Whether the information was retrieved successfully.
This is used to determine the value of a feature without user customization.
This will check for feature flag value in remote store, if not found, falls back
to default store.
A string of the form ^(\w+\.)+\w+$, following a pattern of [AreaPath].[Name]
The internal collection path of the feature.
The value returned if there is an error processing the
request or if the flag cannot be located.
The default value or current state of the feature flag if there is an error
processing the request
Returns a hash code for . The reason to use this over String.GetHashCode()
is to guarantee consistent results across product versions.
String to hash
Indicates whether to generate a case-insensitive hash using Char.ToLowerInvariant
The hash code
This type is forwarded from MS.VS.Shell.xx.dll
Throws an ArgumentNullException if the given object is null.
Object to test
parameter used if an exception is raised
Throws an InvalidOperationException if the given object is not null.
Object to test
parameter used if an exception is raised
Throws an ArgumentException if the given string is empty.
String to test
parameter used if an exception is raised
Throws an ArgumentException if the given guid is empty.
Guid to test
parameter used if an exception is raised
Throws an ArgumentException if the given string contains only whitespaces.
String to test
parameter used if an exception is raised
Validates that the given string is both non-null and non-empty.
String to test
parameter used if an exception is raised
Validates that the given string is both non-null and does not contain only whitespaces.
String to test
parameter used if an exception is raised
Validate that the value of the specified argument has an expected value
Value to test
The exepected value
parameter used if an exception is raised
Validate that the value of the specified argument has an expected value
Value to test
The exepected value
parameter used if an exception is raised
Validate that the value of the specified argument does not have a specific value
Value to test
The unexepected value
parameter used if an exception is raised
Validate that the value of the specified argument does not have a specific value
Value to test
The unexepected value
parameter used if an exception is raised
Validates that a value is within the specified range.
Value to test
Minimum valid value
Maximum valid value
parameter used if an exception is raised
Validates that a value is within the specified range.
Value to test
Minimum valid value
Maximum valid value
parameter used if an exception is raised
Validates that a value is within the specified range.
Value to test
Minimum valid value
Maximum valid value
parameter used if an exception is raised
Validates that a value is within the specified range.
Value to test
Minimum valid value
Maximum valid value
parameter used if an exception is raised
Validates that a value is within the specified range.
Value to test
Minimum valid value
Maximum valid value
parameter used if an exception is raised
Asserts that the given path is normalized. An exception is thrown
exception if the path isn't normalized.
parameter used if an exception is raised
This is a generic replacement for the non-generic System.Collections.Specialized.HybridDictionary.
The Key type for the dictionaryThe Value type for the dictionary
This type is forwarded from MS.VS.Shell.xx.dll
Either null, a List or a Dictionary
Comparer for the keys
The cut-over point from List to Dictionary.
When the collection is empty, _inner is null.
From 1 to 32 elements, _inner is a List (geometric growth)
When the 33rd element is added, _inner upgrades to a Dictionary.
The upgrade to Dictionary is one-way (i.e. Even if the count drops
below 33 again, _inner remains a Dictionary), unless you call
or remove all items in which case it will become a List on the next insertion.
A power of 2 was chosen to avoid excess space in the List at the cut-over
point.
internal for unit testing.
Adds a key/value pair to the collection
Key to add
Value to add
Determines if the given key is in the collection
Key to search for
True if the key is in the collection, false otherwise
Returns the keys in the collection.
Removes the value indexed by the given key from the collection.
Key to remove
True if the key was removed, false otherwise
Attempts to return the value corresponding to a key.
Key to search for
Value corresponding to , or null if
is not in the collection.
True if is in the collection, false otherwise
Returns the values in the collection.
Gets or sets the value associated with a key
Key of the value to get or set
Value corresponding to the key
Try cast to a Dictionary
Unconditionally cast to a List. Callers should always check for null and try before calling
this to avoid a runtime
Find the index of a key in the given list. The search is linear.
The list to search.
The key to search for.
The index of in or -1 if it is not found.
Adds a key/value pair to the collection
Key/value pair to add
Removes all of the key/value pairs from the collection
Determines if a key/value pair is in the collection
Key/value pair to add
True if the key/value pair is in the collection, false otherwise
Copies the key/value pairs in the collection to an array
Array to which the key/value pairs are copied
The zero-based index in
at which copying begins.
Returns the number of items in the collection
Determines if the collection is read-only.
Removes the given key/value pair from the collection
Key/value pair to remove
True if the key/value pair is removed, false otherwise
Returns an enumerator for the collection
Collection enumerator
Returns an enumerator for the collection
Collection enumerator
Dictionary that does not prevent values from being garbage collected. This class is designed to be thread-safe.
Example scenarios:
- Store a weak mapping of keys to values where the values can be collected to prevent leaking memory.
PERF: Like a regular dictionary, the collection will never reduce its underlying size. This dictionary may be more
prone to get overly capacious. If profiles show that is a problem, Scavenge could shrink the underlying dictionary
based on some policy, e.g., if the number of remaining entries are less than 10% of the size of the underlying dictionary.
Type of keyType of value
Backing dictionary
Improvised capacity. See comment in item setter.
Constructor for a collection using the default key comparer
Constructor taking a specified comparer for the keys
Count of entries.
Some entries may represent keys or values that have already been garbage collected.
To clean these out call .
Gets or sets the entry whose key equates to the specified key.
Getter throws KeyNotFoundException if key is not found.
Setter adds entry if key is not found.
If we find the entry but its target is null, we take the opportunity
to remove the entry, as if the GC had done it.
Whether there is a key present with the specified key
As usual, don't just call Contained as the wrapped value may be null.
Attempts to get the value for the provided key.
Returns true if the key is found, otherwise false.
If we find the entry but its target is null, we take the opportunity
to remove the entry, as if the GC had done it.
Removes an entry with the specified key.
Returns true if found, false otherwise.
Gets non GC'd values. Does not perform a scavenge
Gets all keys. Even ones that have expired.
Gets only the keys that are not expired.
Remove any entries from the dictionary that represent keys or values
that have been garbage collected.
Empty the collection
Data types used by when it is necessary to serialize type information in
addition to the data itself.
Implements deserialization code for data serialized with and provides
abstract method to implement support for complex data, uniquely identifiable objects and references.
This method implements MessagePack deserialization for Remote UI data and returns the type of the field being
deserialized when the field is one of or a nullable of one of such types.
MessagePack reader from which the data is read.
MessagePack options to be used for deserialization.
The deserialized value and its type information.
A value of is returned as type if the field is of a complex type (a type not listed in
).
In case of nullable fields of one of the types listed in , the corresponding
is returned.
When the contains invalid data.
This method is not supported.
Converts a to its corresponding .
The to convert.
The corresponding to .
This method is invoked by to retrieve an empty object (an object with no properties).
An object with no properties.
This method is invoked by to retrieve the uniquely identifiable object .
The identifier of the uniquely identifable object to return.
MessagePack options being used for deserialization.
The uniquely identifiable object.
If the object cannot be found, the implementer can either throw an exception or return a placeholder.
This method is invoked by to have a complex object deserialized.
MessagePack reader from which the data is read.
MessagePack options to be used for deserialization.
The uniquely identifiable object.
The implementer can throw if the current implementation of
doesn't support reading complex objects.
Gets the corresponding to the next server change.
Gets the corresponding to the next client change.
Generates the next value.
The next value.
Values used as keys for Map objects in the Remote UI data serialization format.
The Remote UI data serialization format is compatible with MessagePack but requires special handling when
deserializing Map objects.
The keys of Map objects are one of the values. This allows Remote UI data to be
serialized in valid MessagePack format (without custom extensions), that can be automatically converted to json,
while retaining additional metadata (e.g., unique object ids and data type information).
A reference to a uniquely identifiable object. The value of this field is the object identifier.
The identifier of a uniquely identifiable object.
This field is followed by either an or field.
The value of the object serialized as a MessagePack map.
The value of the object serialized as a MessagePack map. is used instead of
when the value is a command.
A value. The value of this field is encoded as a .
A nullable value. The value of this field is serialized as non-nullable Remote UI data.
An empty nullable and its type information. The value of this field is a or Nil.
The type of the entries of an , or
of nullable values.
A value of kind . The value is serialized after being
converted to Utc.
A value of kind .
The version of the object.
The value of the object serialized as a MessagePack array.
The value of the object serialized as a MessagePack array. is used instead of
when the value implements of nullable values.
An untyped value. The value of this field is serialized as Remote UI data. This is used when
serializing a property of type containing a value that has a corresponding
in order to inform the deserializer that the field is not of the corresponding type.
A XAML string.
This class implements MessagePack serialization for simple data types that can be sent both from the extension to
Visual Studio, and from Visual Studio to the extension. This includes the basic data types provided by .NET and
nullable versions of such data types.
MessagePack would normally serialized numeric data using the smallest format possible (e.g., (int)5
would be serialized as a ). instead serializes
numerical data in the format corresponding to their original data type in order to preserve information about the
original data type.
Some data like , of type and nullable
values use a custom format.
Retrieves a delegate able to serialize values of type .
The type to be serialized.
A delegate able to serialize or if
is not considered simple data.
Retrieves a delegate able to serialize values of type .
The type to be serialized.
When the returned delegate will write nullable values
as Nil or their non-nullable equivalent. This is used when writing .
Returns the corresponding to or
.
Returns whether is a .
A delegate able to serialize or if
is not considered simple data.
Retrieves a delegate able to serialize values of type when is a
non nullable value type.
The type to be serialized.
Returns the corresponding to or
.
A delegate able to serialize or if
is not considered simple data.
Retrieves a delegate able to serialize values of type when is a
reference type and its value is not null.
The type to be serialized.
Returns the corresponding to or
.
A delegate able to serialize or if
is not considered simple data.
Serialization method for values. This is used by
to construct delegates.
MessagePack writer to which is serialized.
The value to be serialized.
Serialization method for values. This is used by
to construct delegates.
MessagePack writer to which is serialized.
The value to be serialized.
In order to respect the intent of using local objects, without corrupting their values
in case serializer and deserializer use different timezones, we convert them to Utc but mark them with
so that they can be converted to the local timezone of the
reader when deserializing.
Serialization method for nullable objects used when serializing items of typed collections. This is used by
to construct delegates.
MessagePack writer to which is serialized.
The value to be serialized.
MessagePack serializer options used for the serialization.
Delegate to be used for serializing the object value when not null.
Serialization method for nullable value types. This is used by to
construct delegates.
MessagePack writer to which is serialized.
The value to be serialized.
MessagePack serializer options used for the serialization.
Code representing the data type of the field to be used when
is an empty nullable.
Delegate to be used for serializing the object value when not null.
Serialization method for nullable reference types. This is used by to
construct delegates.
MessagePack writer to which is serialized.
The value to be serialized.
MessagePack serializer options used for the serialization.
Code representing the data type of the field to be used when
is an empty nullable.
Delegate to be used for serializing the object value when not null.
Interface to write activity events
For internal use only
Represents an activity timespan that is marked by start/stop ETW events based on object lifecyle
Internal implementation of activity event writer to write activity events to ETW
Contains information to define an activity block
Creates a new activity information struct
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Creates a new activity information struct
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Related activity identifier if any, can be Guid.Empty
Creates a new activity information struct
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Activity identifier, if Guid.Empty a new GUID will be generated
Related activity identifier if any, can be Guid.Empty
ETW event keywords specific to Visual Studio providers
Please contact vsideperfreleng before adding a value here.
ETW event levels specific to Visual Studio providers.
Visual Studio Common ETW provider.
Writes a simple event to ETW stream
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
Writes a simple event to ETW stream
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
Writes a simple event to ETW stream using default verbose level
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
Writes a simple event to ETW stream
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
Writes a simple event to ETW stream
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
Tagged activity to relate the event
Writes a simple event to ETW stream
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
Tagged activity to relate the event
Writes a simple event to ETW stream using default verbose level
Name of the event
One of VsEtwKeywords values, VS events can not be created without a keyword
Creates an activity with user data embedded in the start event
Name of the activity
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
An EtwActivity object to determine the activity duration. The activity will be ended when object is disposed, End or Abort methods are called
Creates an activity with user data embedded in the start event
Name of the activity
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
Related activity to this event, the activity id will be logged in the activity event
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
An EtwActivity object to determine the activity duration. The activity will be ended when object is disposed, End or Abort methods are called
Creates an activity
Name of the activity
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
An EtwActivity object to determine the activity duration. The activity will be ended when object is disposed, End or Abort methods are called
Creates an activity
Name of the activity
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
Related activity to this event, the activity id will be logged in the activity event
An EtwActivity object to determine the activity duration. The activity will be ended when object is disposed, End or Abort methods are called
Write an ETW event to indicate an activity start.
This method should be used in cases where VsEtwActivity class can't be used to control the lifetime of the activity
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Activity identifier, if Guid.Empty a new GUID will be generated
Related activity identifier if any, can be Guid.Empty
Write an ETW event to indicate an activity start.
This method should be used in cases where VsEtwActivity class can't be used to control the lifetime of the activity
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Activity identifier, if Guid.Empty a new GUID will be generated
Related activity identifier if any, can be Guid.Empty
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
Write an ETW event to indicate an activity stop.
This method should be used in cases where VsEtwActivity class can't be used to control the lifetime of the activity
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Activity identifier, if Guid.Empty a new GUID will be generated
Related activity identifier if any, can be Guid.Empty
Write an ETW event to indicate an activity start.
This method should be used in cases where VsEtwActivity class can't be used to control the lifetime of the activity
Name of the activity
ETW keyword to define activity category
ETW level to define activity event's verbosity
Activity identifier, if Guid.Empty a new GUID will be generated
Related activity identifier if any, can be Guid.Empty
User data to be passed through the event. The data must either be an object with EventData attribute or an anonymous struct type
Determines if provider is enabled for certain keyword and level
One of VsEtwKeywords values, VS events can not be created without a keyword
One of VsEtwLevels values
true if provider is enabled, false otherwise
The atom is present. CodeMarkers are enabled.
The atom is not present, but InitPerformanceDll has not yet been called.
Disabled because the CodeMarkers transport DLL could not be found or
an import failed to resolve.
Are CodeMarkers enabled? Note that even if IsEnabled returns false, CodeMarkers
may still be enabled later in another component.
Sends a code marker event
The code marker event ID
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.
Sends a code marker event with additional user data
The code marker event ID
User data buffer. May not be null.
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.aBuff was null
Used by ManagedPerfTrack.cs to report errors accessing the DLL.
Sends a code marker event with additional Guid user data
The code marker event ID
The additional Guid to include with the event
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.
Sends a code marker event with additional String user data
The code marker event ID
The additional String to include with the event
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.
Converts a string into a byte buffer including a zero terminator (needed for proper ETW message formatting)
String to be converted to bytes
Sends a code marker event with additional DWORD user data
The code marker event ID
The additional DWORD to include with the event
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.
Sends a code marker event with additional QWORD user data
The code marker event ID
The additional QWORD to include with the event
true if the code marker was successfully sent, false if code markers are
not enabled or an error occurred.
Checks the registry to see if code markers are enabled
The registry root
The registry view.
Whether CodeMarkers are enabled in the registry
Use CodeMarkerStartEnd in a using clause when you need to bracket an
operation with a start/end CodeMarker event pair. If you are using correlated
codemarkers and providing your own event manifest, include two GUIDs (the correlation
"marker" and the correlation ID itself) as the very first fields.
Use CodeMarkerExStartEnd in a using clause when you need to bracket an
operation with a start/end CodeMarker event pair. If you are using correlated
codemarkers and providing your own event manifest, include two GUIDs (the correlation
"marker" and the correlation ID itself) as the very first fields.
A pointer to a null-terminated, constant character string.
A pointer to the first character in the string. The content should be considered readonly, as it was typed as constant in the SDK.
Gets the number of characters up to the first null character (exclusive).
Returns a with a copy of this character array, up to the first null character (exclusive).
A , or if is .
Returns a span of the characters in this string, up to the first null character (exclusive).
Returns a span of the characters in this string, up to the first null character (exclusive).
The RECT structure defines a rectangle by the coordinates of its upper-left and lower-right corners.The RECT structure is identical to the RECTL structure.Read more on docs.microsoft.com.Specifies the x-coordinate of the upper-left corner of the rectangle.Specifies the y-coordinate of the upper-left corner of the rectangle.Specifies the x-coordinate of the lower-right corner of the rectangle.Specifies the y-coordinate of the lower-right corner of the rectangle.The length of the inline array.
Gets a ref to an individual element of the inline array.
⚠ Important ⚠: When this struct is on the stack, do not let the returned reference outlive the stack frame that defines it.
Receives file compression information.Learn more about this API from docs.microsoft.com.The file size of the compressed file.The compression format that is used to compress the file.The factor that the compression uses.The number of chunks that are shifted by compression.The number of clusters that are shifted by compression.Reserved.Identifies the type of file information that GetFileInformationByHandleEx should retrieve or SetFileInformationByHandle should set.As noted in the preceding section, some file information classes are valid only for use with GetFileInformationByHandleEx. Others are valid only for use with SetFileInformationByHandle. Where neither function is mentioned, the information class is valid with both functions.Read more on docs.microsoft.com.Minimal information for the file should be retrieved or set. Used for file handles. See FILE_BASIC_INFO.Read more on docs.microsoft.com.Extended information for the file should be retrieved. Used for file handles. Use only when calling GetFileInformationByHandleEx. See FILE_STANDARD_INFO.Read more on docs.microsoft.com.The file name should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_NAME_INFO.Read more on docs.microsoft.com.The file name should be changed. Used for file handles. Use only when calling SetFileInformationByHandle. See FILE_RENAME_INFO.Read more on docs.microsoft.com.The file should be deleted. Used for any handles. Use only when calling SetFileInformationByHandle. See FILE_DISPOSITION_INFO.Read more on docs.microsoft.com.The file allocation information should be changed. Used for file handles. Use only when calling SetFileInformationByHandle. See FILE ALLOCATION INFO.Read more on docs.microsoft.com.The end of the file should be set. Use only when calling SetFileInformationByHandle. See FILE_END_OF_FILE_INFO.Read more on docs.microsoft.com.File stream information for the specified file should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_STREAM_INFO.Read more on docs.microsoft.com.File compression information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_COMPRESSION_INFO.Read more on docs.microsoft.com.File attribute information should be retrieved. Used for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ATTRIBUTE_TAG_INFO.Read more on docs.microsoft.com.Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. The number of files returned for each call to GetFileInformationByHandleEx depends on the size of the buffer that is passed to the function. Any subsequent calls to GetFileInformationByHandleEx on the same handle will resume the enumeration operation after the last file is returned. See FILE_ID_BOTH_DIR_INFO.Read more on docs.microsoft.com.Identical to FileIdBothDirectoryInfo, but forces the enumeration operation to start again from the beginning. See FILE_ID_BOTH_DIR_INFO.Read more on docs.microsoft.com.Priority hint information should be set. Use only when calling SetFileInformationByHandle. See FILE_IO_PRIORITY_HINT_INFO.Read more on docs.microsoft.com.File remote protocol information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_REMOTE_PROTOCOL_INFO.Read more on docs.microsoft.com.Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. See FILE_FULL_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.Identical to FileFullDirectoryInfo, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx. See FILE_FULL_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.File storage information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_STORAGE_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.File alignment information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ALIGNMENT_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.File information should be retrieved. Use for any handles. Use only when calling GetFileInformationByHandleEx. See FILE_ID_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.Files in the specified directory should be retrieved. Used for directory handles. Use only when calling GetFileInformationByHandleEx. See FILE_ID_EXTD_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.Identical to FileIdExtdDirectoryInfo, but forces the enumeration operation to start again from the beginning. Use only when calling GetFileInformationByHandleEx. See FILE_ID_EXTD_DIR_INFO. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This value is not supported before Windows 8 and Windows Server 2012Read more on docs.microsoft.com.This value is used for validation. Supported values are less than this value.Receives extended information for the file.Learn more about this API from docs.microsoft.com.The amount of space that is allocated for the file.The end of the file.The number of links to the file.TRUE if the file in the delete queue; otherwise, false.Read more on docs.microsoft.com.TRUE if the file is a directory; otherwise, false.Read more on docs.microsoft.com.Contains window information.Learn more about this API from docs.microsoft.com.Type: DWORD The size of the structure, in bytes. The caller must set this member to sizeof(WINDOWINFO).Read more on docs.microsoft.com.Type: RECT The coordinates of the window.Read more on docs.microsoft.com.Type: RECT The coordinates of the client area.Read more on docs.microsoft.com.Type: DWORD The window styles. For a table of window styles, see Window Styles.Read more on docs.microsoft.com.Type: DWORD The extended window styles. For a table of extended window styles, see Extended Window Styles.Read more on docs.microsoft.com.Type: DWORD The window status. If this member is WS_ACTIVECAPTION (0x0001), the window is active. Otherwise, this member is zero.Read more on docs.microsoft.com.Type: UINT The width of the window border, in pixels.Read more on docs.microsoft.com.Type: UINT The height of the window border, in pixels.Read more on docs.microsoft.com.Type: ATOM The window class atom (see RegisterClass).Read more on docs.microsoft.com.Type: WORD The Windows version of the application that created the window.Read more on docs.microsoft.com.
Contains extern methods from "ADVAPI32.dll".
Contains extern methods from "GDI32.dll".
Contains extern methods from "KERNEL32.dll".
Contains extern methods from "USER32.dll".
Returns a pointer to a specified subauthority in a security identifier (SID). The subauthority value is a relative identifier (RID).A pointer to the SID structure from which a pointer to a subauthority is to be returned. This function does not handle SID structures that are not valid. Call the IsValidSid function to verify that the SID structure is valid before you call this function.Read more on docs.microsoft.com.
Specifies an index value identifying the subauthority array element whose address the function will return. The function performs no validation tests on this value. An application can call the GetSidSubAuthorityCount function to discover the range of acceptable values.
If the function succeeds, the return value is a pointer to the specified SID subauthority. To get extended error information, call GetLastError. If the function fails, the return value is undefined. The function fails if the specified SID structure is not valid or if the index value specified by the nSubAuthority parameter is out of bounds.Learn more about this API from docs.microsoft.com.Opens the access token associated with a process.
A handle to the process whose access token is opened. The process must have the PROCESS_QUERY_INFORMATION access permission.
Specifies an access mask that specifies the requested types of access to the access token. These requested access types are compared with the discretionary access control list (DACL) of the token to determine which accesses are granted or denied.For a list of access rights for access tokens, see Access Rights for Access-Token Objects.Read more on docs.microsoft.com.
A pointer to a handle that identifies the newly opened access token when the function returns.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Sets the compression state of a file or directory on a volume whose file system supports per-file and per-directory compression.The LZNT1 compression algorithm is the only compression algorithm implemented. As a result, the LZNT1 compression algorithm is used as the DEFAULT compression method. If the file system of the volume containing the specified file or directory does not support per-file or per-directory compression, the operation fails. The compression state change of the file or directory occurs synchronously with the call to [DeviceIoControl](../ioapiset/nf-ioapiset-deviceiocontrol.md). To retrieve the compression state of a file or directory, use the [FSCTL_GET_COMPRESSION](ni-winioctl-fsctl_get_compression.md) control code. To retrieve the compression attribute of a file or directory, use the [GetFileAttributes](../fileapi/nf-fileapi-getfileattributesa.md) function. The compression attribute indicates whether a file or directory is compressed. The compression state indicates whether a file or directory is compressed and, if it is, the format of the compressed data. Directories are not actually compressed by this operation. Rather, the operation sets the default state for files created in the directory to be compressed. Note that the time stamps may not be updated correctly for a remote file. To ensure consistent results, use unbuffered I/O. File compression is supported for files of a maximum uncompressed size of 30 gigabytes. In Windows 8 and Windows Server 2012, this code is supported by the following technologies. Technology | Supported -----------|---------- Server Message Block (SMB) 3.0 protocol | Yes SMB 3.0 Transparent Failover (TFO) | No SMB 3.0 with Scale-out File Shares (SO) | No Cluster Shared Volume File System (CsvFS) | See comment Resilient File System (ReFS) | No CsvFs does not support making a directory compressed. CsvFs allows making file compressed only when the file is opened exclusively by a node. SMB 3.0 Transparent Failover and Scale-Out does not support NTFS compressed files. The FSCTL call is not blocked, but is unsupported."
Transacted Operations
You cannot change the compression state of a file opened with CreateFileTransacted. For more information about transactions, see Transactional NTFS.Read more on docs.microsoft.com.The GetDeviceCaps function retrieves device-specific information for the specified device.
A handle to the DC.
The return value specifies the value of the desired item. When nIndex is BITSPIXEL and the device has 15bpp or 16bpp, the return value is 16.Learn more about this API from docs.microsoft.com.Closes an open object handle.
A valid handle to an open object.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. If the application is running under a debugger, the function will throw an exception if it receives either a handle value that is not valid or a pseudo-handle value. This can happen if you close a handle twice, or if you call CloseHandle on a handle returned by the FindFirstFile function instead of calling the FindClose function.Learn more about this API from docs.microsoft.com.Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.A handle to the device on which the operation is to be performed. The device is typically a volume, directory, file, or stream. To retrieve a device handle, use the CreateFile function. For more information, see Remarks.Read more on docs.microsoft.com.The control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it. For a list of the control codes, see Remarks. The documentation for each control code provides usage details for the lpInBuffer, nInBufferSize, lpOutBuffer, and nOutBufferSize parameters.Read more on docs.microsoft.com.A pointer to the input buffer that contains the data required to perform the operation. The format of this data depends on the value of the dwIoControlCode parameter. This parameter can be NULL if dwIoControlCode specifies an operation that does not require input data.Read more on docs.microsoft.com.
The size of the input buffer, in bytes.
A pointer to the output buffer that is to receive the data returned by the operation. The format of this data depends on the value of the dwIoControlCode parameter. This parameter can be NULL if dwIoControlCode specifies an operation that does not return data.Read more on docs.microsoft.com.
The size of the output buffer, in bytes.
A pointer to a variable that receives the size of the data stored in the output buffer, in bytes. If the output buffer is too small to receive any data, the call fails, GetLastError returns ERROR_INSUFFICIENT_BUFFER, and lpBytesReturned is zero. If the output buffer is too small to hold all of the data but can hold some entries, some drivers will return as much data as fits. In this case, the call fails, GetLastError returns ERROR_MORE_DATA, and lpBytesReturned indicates the amount of data received. Your application should call DeviceIoControl again with the same operation, specifying a new starting point. If lpOverlapped is NULL, lpBytesReturned cannot be NULL. Even when an operation returns no output data and lpOutBuffer is NULL, DeviceIoControl makes use of lpBytesReturned. After such an operation, the value of lpBytesReturned is meaningless. If lpOverlapped is not NULL, lpBytesReturned can be NULL. If this parameter is not NULL and the operation returns data, lpBytesReturned is meaningless until the overlapped operation has completed. To retrieve the number of bytes returned, call GetOverlappedResult. If hDevice is associated with an I/O completion port, you can retrieve the number of bytes returned by calling GetQueuedCompletionStatus.Read more on docs.microsoft.com.A pointer to an OVERLAPPED structure. If hDevice was opened without specifying FILE_FLAG_OVERLAPPED, lpOverlapped is ignored. If hDevice was opened with the FILE_FLAG_OVERLAPPED flag, the operation is performed as an overlapped (asynchronous) operation. In this case, lpOverlapped must point to a valid OVERLAPPED structure that contains a handle to an event object. Otherwise, the function fails in unpredictable ways. For overlapped operations, DeviceIoControl returns immediately, and the event object is signaled when the operation has been completed. Otherwise, the function does not return until the operation has been completed or an error occurs.Read more on docs.microsoft.com.If the operation completes successfully, the return value is nonzero. If the operation fails or is pending, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Retrieves a pseudo handle for the calling thread.The return value is a pseudo handle for the current thread.Learn more about this API from docs.microsoft.com.Retrieves information about the specified disk, including the amount of free space on the disk.The root directory of the disk for which information is to be returned. If this parameter is NULL, the function uses the root of the current disk. If this parameter is a UNC name, it must include a trailing backslash (for example, "\\\\MyServer\\MyShare\\"). Furthermore, a drive specification must have a trailing backslash (for example, "C:\\"). The calling application must have FILE_LIST_DIRECTORY access rights for this directory.Read more on docs.microsoft.com.
A pointer to a variable that receives the number of sectors per cluster.
A pointer to a variable that receives the number of bytes per sector.
A pointer to a variable that receives the total number of free clusters on the disk that are available to the user who is associated with the calling thread. If per-user disk quotas are in use, this value may be less than the total number of free clusters on the disk.Read more on docs.microsoft.com.A pointer to a variable that receives the total number of clusters on the disk that are available to the user who is associated with the calling thread. If per-user disk quotas are in use, this value may be less than the total number of clusters on the disk.Read more on docs.microsoft.com.If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Retrieves file information for the specified file.A handle to the file that contains the information to be retrieved. This handle should not be a pipe handle.Read more on docs.microsoft.com.A FILE_INFO_BY_HANDLE_CLASS enumeration value that specifies the type of information to be retrieved. For a table of valid values, see the Remarks section.Read more on docs.microsoft.com.A pointer to the buffer that receives the requested file information. The structure that is returned corresponds to the class that is specified by FileInformationClass. For a table of valid structure types, see the Remarks section.Read more on docs.microsoft.com.
The size of the lpFileInformation buffer, in bytes.
If the function succeeds, the return value is nonzero and file information data is contained in the buffer pointed to by the lpFileInformation parameter. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Retrieves the client process identifier for the specified named pipe.A handle to an instance of a named pipe. This handle must be created by the CreateNamedPipe function.Read more on docs.microsoft.com.
The process identifier.
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call the GetLastError function.Learn more about this API from docs.microsoft.com.Retrieves an integer associated with a key in the specified section of an initialization file.
The name of the section in the initialization file.
The name of the key whose value is to be retrieved. This value is in the form of a string; the GetPrivateProfileInt function converts the string into an integer and returns the integer.Read more on docs.microsoft.com.
The default value to return if the key name cannot be found in the initialization file.
The name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.
The return value is the integer equivalent of the string following the specified key name in the specified initialization file. If the key is not found, the return value is the specified default value.Learn more about this API from docs.microsoft.com.Retrieves a string from the specified section in an initialization file.The name of the section containing the key name. If this parameter is NULL, the GetPrivateProfileString function copies all section names in the file to the supplied buffer.Read more on docs.microsoft.com.
The name of the key whose associated string is to be retrieved. If this parameter is NULL, all key names in the section specified by the lpAppName parameter are copied to the buffer specified by the lpReturnedString parameter.
A default string. If the lpKeyName key cannot be found in the initialization file, GetPrivateProfileString copies the default string to the lpReturnedString buffer.If this parameter is NULL, the default is an empty string, "". Avoid specifying a default string with trailing blank characters. The function inserts a null character in the lpReturnedString buffer to strip any trailing blanks.Read more on docs.microsoft.com.
A pointer to the buffer that receives the retrieved string.
The size of the buffer pointed to by the lpReturnedString parameter, in characters.
The name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.
The return value is the number of characters copied to the buffer, not including the terminating null character. If neither lpAppName nor lpKeyName is NULL and the supplied destination buffer is too small to hold the requested string, the string is truncated and followed by a null character, and the return value is equal to nSize minus one. If either lpAppName or lpKeyName is NULL and the supplied destination buffer is too small to hold all the strings, the last string is truncated and followed by two null characters. In this case, the return value is equal to nSize minus two. In the event the initialization file specified by lpFileName is not found, or contains invalid values, this function will set errorno with a value of '0x2' (File Not Found). To retrieve extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Retrieves information about the file system and volume associated with the specified root directory.A pointer to a string that contains the root directory of the volume to be described. If this parameter is NULL, the root of the current directory is used. A trailing backslash is required. For example, you specify \\MyServer\MyShare as "\\MyServer\MyShare\", or the C drive as "C:\".Read more on docs.microsoft.com.A pointer to a buffer that receives the name of a specified volume. The buffer size is specified by the nVolumeNameSize parameter.Read more on docs.microsoft.com.The length of a volume name buffer, in TCHARs. The maximum buffer size is MAX_PATH+1. This parameter is ignored if the volume name buffer is not supplied.Read more on docs.microsoft.com.A pointer to a variable that receives the volume serial number. This parameter can be NULL if the serial number is not required. This function returns the volume serial number that the operating system assigns when a hard disk is formatted. To programmatically obtain the hard disk's serial number that the manufacturer assigns, use the Windows Management Instrumentation (WMI) Win32_PhysicalMedia property SerialNumber.Read more on docs.microsoft.com.A pointer to a variable that receives the maximum length, in TCHARs, of a file name component that a specified file system supports. A file name component is the portion of a file name between backslashes. The value that is stored in the variable that *lpMaximumComponentLength points to is used to indicate that a specified file system supports long names. For example, for a FAT file system that supports long names, the function stores the value 255, rather than the previous 8.3 indicator. Long names can also be supported on systems that use the NTFS file system.Read more on docs.microsoft.com.A pointer to a variable that receives flags associated with the specified file system. This parameter can be one or more of the following flags. However, FILE_FILE_COMPRESSION and FILE_VOL_IS_COMPRESSED are mutually exclusive. This doc was truncated.Read more on docs.microsoft.com.A pointer to a buffer that receives the name of the file system, for example, the FAT file system or the NTFS file system. The buffer size is specified by the nFileSystemNameSize parameter.Read more on docs.microsoft.com.The length of the file system name buffer, in TCHARs. The maximum buffer size is MAX_PATH+1. This parameter is ignored if the file system name buffer is not supplied.Read more on docs.microsoft.com.If all the requested information is retrieved, the return value is nonzero. If not all the requested information is retrieved, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Sets the priority value for the specified thread. This value, together with the priority class of the thread's process, determines the thread's base priority level.A handle to the thread whose priority value is to be set. The handle must have the THREAD_SET_INFORMATION or THREAD_SET_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights.Windows Server 2003: The handle must have the THREAD_SET_INFORMATION access right.Read more on docs.microsoft.com.If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Windows Phone 8.1: Windows Phone Store apps may call this function but it has no effect. The function will return a nonzero value indicating success.Learn more about this API from docs.microsoft.com.Copies a string into the specified section of an initialization file.
The name of the section to which the string will be copied. If the section does not exist, it is created. The name of the section is case-independent; the string can be any combination of uppercase and lowercase letters.
The name of the key to be associated with a string. If the key does not exist in the specified section, it is created. If this parameter is NULL, the entire section, including all entries within the section, is deleted.
A null-terminated string to be written to the file. If this parameter is NULL, the key pointed to by the lpKeyName parameter is deleted.
The name of the initialization file. If the file was created using Unicode characters, the function writes Unicode characters to the file. Otherwise, the function writes ANSI characters.Read more on docs.microsoft.com.If the function successfully copies the string to the initialization file, the return value is nonzero. If the function fails, or if it flushes the cached version of the most recently accessed initialization file, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Destroys an icon and frees any memory the icon occupied.Type: HICON A handle to the icon to be destroyed. The icon must not be in use.Read more on docs.microsoft.com.Type: BOOL If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.The ReleaseDC function releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.
A handle to the window whose DC is to be released.
A handle to the DC to be released.
The return value indicates whether the DC was released. If the DC was released, the return value is 1. If the DC was not released, the return value is zero.Learn more about this API from docs.microsoft.com.The GetDC function retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen.
A handle to the window whose DC is to be retrieved. If this value is NULL, GetDC retrieves the DC for the entire screen.
If the function succeeds, the return value is a handle to the DC for the specified window's client area. If the function fails, the return value is NULL.Learn more about this API from docs.microsoft.com.Retrieves the handle to the window that has the keyboard focus, if the window is attached to the calling thread's message queue.Type: HWND The return value is the handle to the window with the keyboard focus. If the calling thread's message queue does not have an associated window with the keyboard focus, the return value is NULL.Learn more about this API from docs.microsoft.com.Retrieves information about the specified window.Type: HWND A handle to the window whose information is to be retrieved.Read more on docs.microsoft.com.Type: PWINDOWINFO A pointer to a WINDOWINFO structure to receive the information. Note that you must set the cbSize member to sizeof(WINDOWINFO) before calling this function.Read more on docs.microsoft.com.Type: BOOL If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.Type: HWND A handle to the window.Read more on docs.microsoft.com.Type: LPRECT A pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window.Read more on docs.microsoft.com.Type: BOOL If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.Learn more about this API from docs.microsoft.com.Sets the keyboard focus to the specified window. The window must be attached to the calling thread's message queue.Type: **HWND** A handle to the window that will receive the keyboard input. If this parameter is NULL, keystrokes are ignored.Read more on docs.microsoft.com.Type: **HWND** If the function succeeds, the return value is the handle to the window that previously had the keyboard focus. If the *hWnd* parameter is invalid or the window is not attached to the calling thread's message queue, the return value is NULL. To get extended error information, call [GetLastError function](../errhandlingapi/nf-errhandlingapi-getlasterror.md). Extended error ERROR_INVALID_PARAMETER (0x57) means that window is in disabled state.Learn more about this API from docs.microsoft.com.Represents a security identifier (SID) and its attributes.A group is represented by a SID. SIDs have attributes that indicate whether they are currently enabled, disabled, or mandatory. SIDs also indicate how these attributes are used. A SID_AND_ATTRIBUTES structure can represent a SID whose attributes change frequently. For example, SID_AND_ATTRIBUTES is used to represent groups in the TOKEN_GROUPS structure.Read more on docs.microsoft.com.A pointer to a SID structure.Specifies attributes of the SID. This value contains up to 32 one-bit flags. Its meaning depends on the definition and use of the SID.Contains values that specify the type of information being assigned to or retrieved from an access token.Learn more about this API from docs.microsoft.com.The buffer receives a TOKEN_USER structure that contains the user account of the token.Read more on docs.microsoft.com.The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token.Read more on docs.microsoft.com.The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token.Read more on docs.microsoft.com.The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects.Read more on docs.microsoft.com.The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects.Read more on docs.microsoft.com.The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects.Read more on docs.microsoft.com.The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information.Read more on docs.microsoft.com.The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token.Read more on docs.microsoft.com.The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails.Read more on docs.microsoft.com.The buffer receives a TOKEN_STATISTICS structure that contains various token statistics.Read more on docs.microsoft.com.The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token.Read more on docs.microsoft.com.The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token. If the token is associated with the terminal server client session, the session identifier is nonzero. Windows Server 2003 and Windows XP: If the token is associated with the terminal server console session, the session identifier is zero. In a non-Terminal Services environment, the session identifier is zero. If TokenSessionId is set with SetTokenInformation, the application must have the Act As Part Of the Operating System privilege, and the application must be enabled to set the session ID in a token.Read more on docs.microsoft.com.The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token.Reserved.The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag.Reserved.The buffer receives a TOKEN_ORIGIN value. If the token resulted from a logon that used explicit credentials, such as passing a name, domain, and password to the LogonUser function, then the TOKEN_ORIGIN structure will contain the ID of the logon session that created it. If the token resulted from network authentication, such as a call to AcceptSecurityContext or a call to LogonUser with dwLogonType set to LOGON32_LOGON_NETWORK or LOGON32_LOGON_NETWORK_CLEARTEXT, then this value will be zero.Read more on docs.microsoft.com.The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token.The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token.The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated.The buffer receives a DWORD value that is nonzero if the token has ever been filtered.The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token.The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token.The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token.The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level.The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set.The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy.The buffer receives a TOKEN_GROUPS structure that specifies the token's logon SID.The buffer receives a DWORD value that is nonzero if the token is an app container token. Any callers who check the TokenIsAppContainer and have it return 0 should also verify that the caller token is not an identify level impersonation token. If the current token is not an app container but is an identity level token, you should return AccessDenied.The buffer receives a TOKEN_GROUPS structure that contains the capabilities associated with the token.The buffer receives a TOKEN_APPCONTAINER_INFORMATION structure that contains the AppContainerSid associated with the token. If the token is not associated with an app container, the TokenAppContainer member of the TOKEN_APPCONTAINER_INFORMATION structure points to NULL.The buffer receives a DWORD value that includes the app container number for the token. For tokens that are not app container tokens, this value is zero.The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the user claims associated with the token.The buffer receives a CLAIM_SECURITY_ATTRIBUTES_INFORMATION structure that contains the device claims associated with the token.This value is reserved.This value is reserved.The buffer receives a TOKEN_GROUPS structure that contains the device groups that are associated with the token.The buffer receives a TOKEN_GROUPS structure that contains the restricted device groups that are associated with the token.This value is reserved.This value is reserved.The maximum value for this enumeration.Specifies the mandatory integrity level for a token.Learn more about this API from docs.microsoft.com.A SID_AND_ATTRIBUTES structure that specifies the mandatory integrity level of the token.ECq+1rUAQ+ut7r0Tu1Ji0lnfuRaCBMxDAWWU7cugxdA=bTmHiL+IxPAibiPjyBeoit58QAWywha9FqlyysmIai39F2cJIGkzXGsOWptbaYNufpkLAFnFq0C9yL8pKL0X/nSaLzNjXYYIvHmBFOfPZNqMl9aciux2jxWuxPxaAcOVgtC7aMOWjUk4q27be55p8hJlj79f+oh/ZyWeVcCApD+oBBhGNr6OejYknPc9ePwUQ7qCQqZ8amlrl/8iEZ62gyO98FZZTlbuxz/ZK2y4WWt0i3lnqnwx9PWgApEvHZ518ckoZXQ1JpE9fPpUHoOoxkYqTJngjqU5/XnW9gj8/oyztwWCR8cCka9fU2SSRD+8RRIGgXAqKqF7WrPsO/ngrA==zkvLNa2un9GBrYNDoRGkGv7d0PqtTBB4ViYakFbjuWpmF0KcvDAzzaCWJPhVgIXjz+S8cHEoHuWnp/n+UOljT3ehA8Rs6Lb1aTYub3tB/e0txewv2sQ3yscjYdtTBtFvEm9L8Yv76K3Cxzi/Yvrdg+sr7w8y5RHn1Am0Ff8xggY1xpWCXFI+kQM18njQDcUqSlwBnexYfqHBhzz6YXA/S0EziYBu2O2mM7R6gSyYkEOHgIGTVOGnOvvC5xBgC4KNcnQuQSRLiUI2CmzU8vefR6ykruyzt1rNMPI8OqWHQtSDKXU5JNqbk4GNjwzcwbSzOHrxuxWHq91l/vLdVDGDUw==AQABMIIF9DCCA9ygAwIBAgITMwAAA68wQA5Mo00FQQAAAAADrzANBgkqhkiG9w0BAQsFADB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMB4XDTIzMTExNjE5MDkwMFoXDTI0MTExNDE5MDkwMFowdDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEeMBwGA1UEAxMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzkvLNa2un9GBrYNDoRGkGv7d0PqtTBB4ViYakFbjuWpmF0KcvDAzzaCWJPhVgIXjz+S8cHEoHuWnp/n+UOljT3ehA8Rs6Lb1aTYub3tB/e0txewv2sQ3yscjYdtTBtFvEm9L8Yv76K3Cxzi/Yvrdg+sr7w8y5RHn1Am0Ff8xggY1xpWCXFI+kQM18njQDcUqSlwBnexYfqHBhzz6YXA/S0EziYBu2O2mM7R6gSyYkEOHgIGTVOGnOvvC5xBgC4KNcnQuQSRLiUI2CmzU8vefR6ykruyzt1rNMPI8OqWHQtSDKXU5JNqbk4GNjwzcwbSzOHrxuxWHq91l/vLdVDGDUwIDAQABo4IBczCCAW8wHwYDVR0lBBgwFgYKKwYBBAGCN0wIAQYIKwYBBQUHAwMwHQYDVR0OBBYEFEcccTTyBDxkjvJKs/m4AgEFhl7BMEUGA1UdEQQ+MDykOjA4MR4wHAYDVQQLExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xFjAUBgNVBAUTDTIzMDAxMis1MDE4MjYwHwYDVR0jBBgwFoAUSG5k5VAF04KqFzc3IrVtqMp1ApUwVAYDVR0fBE0wSzBJoEegRYZDaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jcmwvTWljQ29kU2lnUENBMjAxMV8yMDExLTA3LTA4LmNybDBhBggrBgEFBQcBAQRVMFMwUQYIKwYBBQUHMAKGRWh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2VydHMvTWljQ29kU2lnUENBMjAxMV8yMDExLTA3LTA4LmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4ICAQCEsRbf80dn60xTweOWHZoWaQdpzSaDqIvqpYHE5ZzuEMJWDdcP72MGw8v6BSaJQ+a+hTCXdERnIBDPKvU4ENjgu4EBJocHlSe8riiZUAR+z+z4OUYqoFd3EqJyfjjOJBR2z94Dy4ss7LEkHUbj2NZiFqBoPYu2OGQvEk+1oaUsnNKZ7Nl7FHtV7CI2lHBru83e4IPe3glIi0XVZJT5qV6Gx/QhAFmpEVBjSAmDdgII4UUwuI9yiX6jJFNOEek6MoeP06LMJtbqA3Bq+ZWmJ033F97uVpyaiS4bj3vFI/ZBgDnMqNDtZjcA2vi4RRMweggd9vsHyTLpn6+nXoLy03vMeebq0C3k44pgUIEuPQUlJIRTe6IrN3GcjaZ6zHGuQGWgu6SyO9r7qkrEpS2pRjnGZjx2RmCamdAWnDdu+DmfNEPAddYjaJJ7PTnd+PGzG+WeH4ocWgVnm5fJFhItjj70CJjgHqt57e1FiQcyWCwBhKX2rGgN2UICHBF3Q/rsKOspjMw2OlGphTn2KmFl5J7cQxru54A9roClLnHGCiSUYos/iwFHI/dAVXEh0S0KKfTfM6AC6/9bCbsD61QLcRzRIElvgCgaiMWFjOBL99pemoElAHsyzG6uX93fMfas09N9YzA0/rFAKAsNDOcFbQlEHKiDT7mI20tVoCcmSIhJAQ==MIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzQ==MIIF7TCCA9WgAwIBAgIQP4vItfyfspZDtWnWbELhRDANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwMzIyMjIwNTI4WhcNMzYwMzIyMjIxMzA0WjCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCygEGqNThNE3IyaCJNuLLx/9VSvGzH9dJKjDbu0cJcfoyKrq8TKG/Ac+M6ztAlqFo6be+ouFmrEyNozQwph9FvgFyPRH9dkAFSWKxRxV8qh9zc2AodwQO5e7BW6KPeZGHCnvjzfLnsDbVU/ky2ZU+I8JxImQxCCwl8MVkXeQZ4KI2JOkwDJb5xalwL54RgpJki49KvhKSn+9GY7Qyp3pSJ4Q6g3MDOmT3qCFK7VnnkH4S6Hri0xElcTzFLh93dBWcmmYDgcRGjuKVB4qRTufcyKYMME782XgSzS0NHL2vikR7TmE/dQgfI6B0S/Jmpaz6SfsjWaTr8ZL22CZ3K/QwLopt3YEsDlKQwaRLWQi3BQUzK3Kr9j1uDRprZ/LHR47PJf0h6zSTwQY9cdNCssBAgBkm3xy0hyFfj0IbzA2j70M5xwYmZSmQBbP3sMJHPQTySx+W6hh1hhMdfgzlirrSSL0fzC/hV66AfWdC7dJse0Hbm8ukG1xDo+mTeacY1logC8Ea4PyeZb8txiSk190gWAjWP1Xl8TQLPX+uKg09FcYj5qQ1OcunCnAfPSRtOBA5jUYxe2ADBVSy2xuDCZU7JNDn1nLPEfuhhbhNfFcRf2X7tHc7uROzLLoax7Dj2cO2rXBPB2Q8Nx4CyVe0096yb5MPa50c8prWPMd/FS6/r8QIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUci06AjGQQ7kUBU7h6qfHMdEjiTQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZIhvcNAQELBQADggIBAH9yzw+3xRXbm8BJyiZb/p4T5tPw0tuXX/JLP02zrhmu7deXoKzvqTqjwkGw5biRnhOBJAPmCf0/V0A5ISRW0RAvS0CpNoZLtFNXmvvxfomPEf4YbFGq6O0JlbXlccmh6Yd1phV/yX43VF50k8XDZ8wNT2uoFwxtCJJ+i92Bqi1wIcM9BhS7vyRep4TXPw8hIr1LAAbblxzYXtTFC1yHblCk6MM4pPvLLMWSZpuFXst6bJN8gClYW1e1QGm6CHmmZGIVnYeWRbVmIyADixxzoNOieTPgUFmG2y/lAiXqcyqfABTINseSO+lOAOzYVgm5M0kS0lQLAausR7aRKX1MtHWAUgHoyoL2n8ysnI8X6i8msKtyrAv+nlEex0NVZ09Rs1fWtuzuUrc66U7h14GIvE+OdbtLqPA1qibUZ2dJsnBMO5PcHd94kIZysjik0dySTclY6ysSXNQ7roxrsIPlAT/4CTL2kzU0Iq/dNw13CYArzUgA8YyZGUcFAenRv9FO0OYoQzeZpApKCNmacXPSqs0xE2N2oTdvkjgefRI8ZjLny23h/FKJ3crWZgWalmG+oijHHKOnNlA8OqTfSm7mhzvO6/DggTedEzxSjr25HTTGHdUKaj2YKXCMiSrRq4IQSB/c9O+lxbtVGjhjhE63bK2VVOxlIhBJF7jAHscPrFRH