Class AttachmentManager
Static class with IAttachmentType related utility functions.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class AttachmentManager
Remarks
Initializes a new instance of the AttachmentManager class.
Constructors
View SourceAttachmentManager(IEnumerable<IAttachmentType>)
Static class with IAttachmentType related utility functions.
Declaration
public AttachmentManager(IEnumerable<IAttachmentType> attachmentTypes)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IAttachmentType> | attachmentTypes |
Remarks
Initializes a new instance of the AttachmentManager class.
Methods
View SourceEdit(string)
Edit an Attachment.
Declaration
public void Edit(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The file path. |
GetAttachmentTypeByName(string)
Returns an IAttachmentType matching supplied type name.
Declaration
public IAttachmentType GetAttachmentTypeByName(string attachmentTypeName)
Parameters
Type | Name | Description |
---|---|---|
string | attachmentTypeName | The attachment type name. |
Returns
Type | Description |
---|---|
IAttachmentType | The attachment type. |
GetAttachmentTypeBySupportedExtension(string)
Returns an IAttachmentType associated with supplied file extension.
Declaration
public IAttachmentType GetAttachmentTypeBySupportedExtension(string fileExtension)
Parameters
Type | Name | Description |
---|---|---|
string | fileExtension | The file extension, example: "png". |
Returns
Type | Description |
---|---|
IAttachmentType | The matching attachment type. |
GetAttachmentTypeFromPath(string)
Returns an IAttachmentType of a supplied file.
Declaration
public IAttachmentType GetAttachmentTypeFromPath(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The file path of the attachment. |
Returns
Type | Description |
---|---|
IAttachmentType | The matching attachment type. |
GetMediaFileFilter()
Returns a combined file filter of all supported attachment media types to be used in file dialogs.
Declaration
public string GetMediaFileFilter()
Returns
Type | Description |
---|---|
string | Returns a combined file filter of all supported attachment media types to be used in file dialogs |
GetSupportedAttachmentTypes(IServiceProvider)
Returns instances of all IAttachmentType implementations set by the tab view model.
Declaration
public IEnumerable<IAttachmentType> GetSupportedAttachmentTypes(IServiceProvider provider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | provider |
Returns
Type | Description |
---|---|
IEnumerable<IAttachmentType> | Returns instances of all IAttachmentType implementations. |
GetTemplateDefinitionFromSource(string)
Static method for creating TemplateAttachmentDefinition based on an input media resource.
Declaration
public TemplateAttachmentDefinition GetTemplateDefinitionFromSource(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the attachment source. |
Returns
Type | Description |
---|---|
TemplateAttachmentDefinition | The template attachment definition. |
Save(string)
Saves the attachment from the source path given.
Declaration
public string Save(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The source path. |
Returns
Type | Description |
---|---|
string | The filename saved. |