Retrieves the extension of the catalog file.
Namespace:
Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly:
Microsoft.ComponentStudio.ComponentPlatformInterface (in
microsoft.componentstudio.componentplatforminterface.dll)
Usage
Visual Basic |
Dim returnValue As String
returnValue = OfflineImageInfo.CatalogExtension
|
Syntax
Visual Basic |
Public Shared ReadOnly Property CatalogExtension() As String
|
C# |
public static string CatalogExtension {get;}
|
C++ |
public:
property static String^ CatalogExtension {
String^ get();
}
|
J# |
public static System.String get_CatalogExtension();
|
JScript |
public static function get CatalogExtension() : String;
|
Property Value
The extension used for the catalog file. The default is .clg.
Example
The following code shows how to open an offline image
given a file.
OfflineImage OpenOfflineImage(string file)
{
OfflineImage image;
if (!Path.GetExtension(file).ToLower().Equals
(OfflineImageInfo.CatalogExtension))
{
// User selected a .wim file or folder:
OfflineImageInfo imageInfo;
if (Directory.Exists(file))
{
// User selected a folder:
imageInfo = Cpi.Instance.GetOfflineImageInfo(file);
}
else
{
// User selected a .wim file:
WimInfo wimInfo = Cpi.Instance.OpenWim(file);
// There could be more than one image in the
// WimInfo instance:
imageInfo = wimInfo.Images[0];
}
if (!imageInfo.ValidateCatalog().Succeeded)
imageInfo.CreateCatalog();
image = Cpi.Instance.OpenOfflineImage(imageInfo);
}
else
{
// User selected a catalog file:
image = Cpi.Instance.OpenOfflineImage(file);
}
return image;
}
|
Remarks
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.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server
2003, Windows Vista, and Windows 2000
Target Platforms
See Also