Class
TestElementImageStore

Store test element images.

Definition

Namespace:ArtOfTest.WebAii.Design.ProjectModel

Assembly:ArtOfTest.WebAii.Design.dll

Syntax:

cs-api-definition
public class TestElementImageStore

Inheritance: objectTestElementImageStore

Constructors

TestElementImageStore(Test)

Declaration

cs-api-definition
public TestElementImageStore(Test test)

Parameters

test

Test

Properties

FilePath

Declaration

cs-api-definition
public string FilePath { get; set; }

Property Value

string

Methods

AddImage(Image)

Add image to store.

Declaration

cs-api-definition
public string AddImage(Image image)

Parameters

image

Image

The actual image.

Returns

string

AddImage(byte[])

Add image to store.

Declaration

cs-api-definition
public string AddImage(byte[] image)

Parameters

image

byte[]

The actual image as byte array.

Returns

string

CalculateImageKey(byte[])

Calculate key of particular image.

Declaration

cs-api-definition
public static string CalculateImageKey(byte[] image)

Parameters

image

byte[]

The image as byte array.

Returns

string

DiscardChanges()

Discards current changes.

Declaration

cs-api-definition
public void DiscardChanges()

DiscardChanges(string)

Discards changes for specific key.

Declaration

cs-api-definition
public void DiscardChanges(string key)

Parameters

key

string

The image key.

GetAllKeys()

Get all images keys.

Declaration

cs-api-definition
public List<string> GetAllKeys()

Returns

List<string>

List of all image keys.

GetFilePath()

Get the store file.

Declaration

cs-api-definition
public string GetFilePath()

Returns

string

Storage file location.

GetImage(string)

Get an image from store.

Declaration

cs-api-definition
public Image GetImage(string key)

Parameters

key

string

The image key.

Returns

Image

Image object. If no such key exists in store returns null.

GetImageBytes(string)

Get an image from store.

Declaration

cs-api-definition
public byte[] GetImageBytes(string key)

Parameters

key

string

The image key.

Returns

byte[]

Raw image as byte array. If no such key exists in store returns null.

GetKeysWaitingToBeAdded()

Returns all image keys that are added and not yet saved

Declaration

cs-api-definition
public string[] GetKeysWaitingToBeAdded()

Returns

string[]

Init()

Initializes the current store using currnet test project root path and element image store file path.

Declaration

cs-api-definition
public void Init()

Init(string)

Initializes the current store.

Declaration

cs-api-definition
public void Init(string filePath)

Parameters

filePath

string

IsDirty()

Get whether current store has unsaved changes.

Declaration

cs-api-definition
public bool IsDirty()

Returns

bool

True if current store has unsaved changes, otherwise false.

IsDirty(string)

Check if store item has been modified.

Declaration

cs-api-definition
public bool IsDirty(string key)

Parameters

key

string

The image key.

Returns

bool

True if item is dirty, otherwise false

RemoveImage(string)

Remove image from store.

Declaration

cs-api-definition
public void RemoveImage(string key)

Parameters

key

string

The image key.

SaveChanges()

Persist changes.

Declaration

cs-api-definition
public void SaveChanges()

SaveChanges(string)

Persist changes.

Declaration

cs-api-definition
public void SaveChanges(string key)

Parameters

key

string

Extension Methods