Freigeben über


PackageUtilities Class

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

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Shell.PackageUtilities

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public NotInheritable Class PackageUtilities
public static class PackageUtilities
[ExtensionAttribute]
public ref class PackageUtilities abstract sealed
[<AbstractClass>]
[<Sealed>]
type PackageUtilities =  class end
public final class PackageUtilities

The PackageUtilities type exposes the following members.

Methods

  Name Description
Public methodStatic member ContainsInvalidFileNameChars Determines whether a string contains characters that are invalid for file names or paths.
Public methodStatic member ConvertFromType<T> Converts a string to an enumeration by using a converter.
Public methodStatic member ConvertToType<T> Converts a string to an enumeration type.
Public methodStatic member CopyUrlToLocal Copies the specified file to the local project directory.
Public methodStatic member CreateCAUUIDFromGuidArray Creates a CAUUID from a GUID array.
Public methodStatic member CreateInstance(Guid) Creates a co-createable COM object.
Public methodStatic member CreateInstance(Type) Creates a co-createable COM object.
Public methodStatic member CreateInstance(ILocalRegistry, Guid) Creates a co-createable COM object.
Public methodStatic member EnsureOutputPath Creates the directories required for the given path.
Public methodStatic member GetImageList(Stream) Creates an image list from the specified stream.
Public methodStatic member GetImageList(Object) Creates a list of bitmaps from the resource handle.
Public methodStatic member GetImageList(Assembly, array<String[]) Creates a list of bitmaps from the specified assembly and resource names.
Public methodStatic member GetIntPointerFromImage Gets a pointer from a bitmap image.
Public methodStatic member GetPathDistance Calculates the distance between two paths.
Public methodStatic member GetSystemAssemblyPath Gets the path of system assemblies.
Public methodStatic member IsCapabilityMatch(String, String) Checks whether a given project matches the requirements prescribed in an AppliesTo expression.
Public methodStatic member IsCapabilityMatch(IVsHierarchy, String) Checks whether a given project matches the requirements prescribed in an AppliesTo expression.
Public methodStatic member IsExperimentalVersionOfVsForVsipDevelopment Determines whether this application was started by using the /rootsuffix command-line switch.
Public methodStatic member IsFileNameInvalid Determines whether the specified file name is invalid.
Public methodStatic member MakeRelative Returns a path for the second file that's relative to the path of the first.
Public methodStatic member MakeRelativeIfRooted 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.
Public methodStatic member ProfferService<TService, TImpl> Proffers to a service container the service implemented by the specified type.
Public methodStatic member SetStringValueFromConvertedEnum<T> Returns a string from an enumeration value.
Public methodStatic member TrimPrefix 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.
Public methodStatic member TrimSuffix 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.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace