C# Class Rubberduck.VBEditor.Extensions.VBComponentExtensions

Mostrar archivo Open project: retailcoder/Rubberduck

Public Methods

Method Description
ExportAsSourceFile ( this component, string directoryPath ) : string

Exports the component to the directoryPath. The file is name matches the component name and file extension is based on the component's type.

FileExtension ( this componentType ) : string

Returns the proper file extension for the Component Type.

Document classes should properly have a ".cls" file extension. However, because they cannot be removed and imported like other component types, we need to make a distinction.

Private Methods

Method Description
ExportDocumentModule ( VBComponent component, string path ) : void
ExportToTempFile ( this component ) : string
ExportUserFormModule ( VBComponent component, string path ) : void

Method Details

ExportAsSourceFile() public static method

Exports the component to the directoryPath. The file is name matches the component name and file extension is based on the component's type.
public static ExportAsSourceFile ( this component, string directoryPath ) : string
component this The component to be exported to the file system.
directoryPath string Destination Path for the resulting source file.
return string

FileExtension() public static method

Returns the proper file extension for the Component Type.
Document classes should properly have a ".cls" file extension. However, because they cannot be removed and imported like other component types, we need to make a distinction.
public static FileExtension ( this componentType ) : string
componentType this
return string