Udostępnij za pośrednictwem


PackageUtilities Class

Definition

A set of static utilities for file names, paths, enumeration/string conversions, images, and other functions.

public ref class PackageUtilities abstract sealed
public ref class PackageUtilities abstract sealed
class PackageUtilities abstract sealed
public static class PackageUtilities
type PackageUtilities = class
Public Module PackageUtilities
Inheritance
PackageUtilities

Methods

ContainsInvalidFileNameChars(String)

Determines whether a string contains characters that are invalid for file names or paths.

ConvertFromType<T>(String, CultureInfo)

Converts a string to an enumeration by using a converter.

ConvertToType<T>(T, Type, CultureInfo)

Converts a string to an enumeration type.

CopyUrlToLocal(Uri, String)

Copies the specified file to the local project directory.

CopyUrlToLocalAsync(Uri, String, CancellationToken)

Downloads a file from a given URL to a local file path.

CreateCAUUIDFromGuidArray(Guid[])

Creates a CAUUID from a GUID array.

CreateInstance(Guid)

Creates a cocreateable COM object.

CreateInstance(ILocalRegistry, Guid)

Creates a cocreateable COM object.

CreateInstance(Type)

Creates a cocreateable COM object.

EnsureOutputPath(String)

Creates the directories required for the given path.

GetImageList(Assembly, String[])

Creates a list of bitmaps from the specified assembly and resource names.

GetImageList(Object)

Creates a list of bitmaps from the resource handle.

GetImageList(Stream)

Creates an image list from the specified stream.

GetIntPointerFromImage(Image)

Gets a pointer from a bitmap image.

GetPathDistance(Uri, Uri)

Calculates the distance between two paths.

GetSystemAssemblyPath()

Gets the path of system assemblies.

IsCapabilityMatch(IVsBooleanSymbolPresenceChecker, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

IsCapabilityMatch(IVsHierarchy, String)

Checks whether a given project matches the requirements prescribed in an AppliesTo expression.

IsCapabilityMatch(String, String)

Checks whether a given set of project capabilities fulfills the requirements prescribed in an AppliesTo expression.

IsExperimentalVersionOfVsForVsipDevelopment(String)

Return true if this application was launched with the "/rootsuffix" command line switch.

IsFileNameInvalid(String)

Determines whether the specified file name is invalid.

MakeRelative(String, String)

Returns a path for the second file that's relative to the path of the first.

MakeRelativeIfRooted(String, Url)

Returns a relative path if the specified file path is absolute and if it's in the same folder as the URL or a child folder of the URL.

ProfferService<TService,TImpl>(IServiceContainer)

Proffers a service implemented by the specified type to a service container

ProfferService<TService>(IAsyncServiceContainer, Func<CancellationToken,Task<Object>>, Boolean)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called.

ProfferService<TService>(IAsyncServiceContainer, Func<CancellationToken,Task<Object>>)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called. The proffered service will be promoted to the parent async service container.

ProfferService<TService>(IAsyncServiceContainer, Func<Task<Object>>, Boolean)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called.

ProfferService<TService>(IAsyncServiceContainer, Func<Task<Object>>)

Proffers a service implemented by the specified type to an async service container. When the service is queried the first time, the creator function will be called. The proffered service will be promoted to the parent async service container.

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

SetStringValueFromConvertedEnum<T>(T, CultureInfo)

Returns a string from an enumeration value.

TrimPrefix(String, String, StringComparison)

Removes a string prefix from a string and returns the remainder of the string. If the string does not start with the prefix, returns the original string unchanged.

TrimSuffix(String, String, StringComparison)

Removes a string suffix from a string and returns the remainder of the string. If the string does not end with the suffix, returns the original string unchanged.

Applies to