Table of Contents

Class ElementRepository

Namespace
Ranorex.Core.Repository
Assembly
Ranorex.Core.dll
public class ElementRepository : ICloneable, IVariableBindingContainer
Inheritance
ElementRepository
Implements
Inherited Members

Constructors

ElementRepository(string)

public ElementRepository(string name)

Parameters

name string

ElementRepository(string, VariableStore)

public ElementRepository(string name, VariableStore variableStoreReference)

Parameters

name string
variableStoreReference VariableStore

Properties

AllEntries

public IList<RepositoryEntry> AllEntries { get; }

Property Value

IList<RepositoryEntry>

AllFolders

public IList<RepositoryFolder> AllFolders { get; }

Property Value

IList<RepositoryFolder>

AllItems

public IList<RepositoryItem> AllItems { get; }

Property Value

IList<RepositoryItem>

CapturedChangeStateHash

public long CapturedChangeStateHash { get; }

Property Value

long

FileName

public string FileName { get; set; }

Property Value

string

ForbiddenVariableNames

public ICollection<CaseInsensitiveString> ForbiddenVariableNames { get; }

Property Value

ICollection<CaseInsensitiveString>

GeneratedCodeClassName

public string GeneratedCodeClassName { get; set; }

Property Value

string

GeneratedCodeNamespace

public string GeneratedCodeNamespace { get; set; }

Property Value

string

Id

public Guid Id { get; set; }

Property Value

Guid

ImageResourceBaseDirectory

public string ImageResourceBaseDirectory { get; set; }

Property Value

string

ImageResourceFileName

public string ImageResourceFileName { get; }

Property Value

string

ImageStoreFileName

public string ImageStoreFileName { get; set; }

Property Value

string

IsClone

public bool IsClone { get; }

Property Value

bool

IsDirty

public bool IsDirty { get; }

Property Value

bool

IsEmpty

public bool IsEmpty { get; }

Property Value

bool

IsInternal

public bool IsInternal { get; }

Property Value

bool

IsReadOnly

public bool IsReadOnly { get; set; }

Property Value

bool

this[RxPath]

public IList<RepositoryEntry> this[RxPath path] { get; }

Parameters

path RxPath

Property Value

IList<RepositoryEntry>

this[Guid]

public RepositoryEntry this[Guid id] { get; }

Parameters

id Guid

Property Value

RepositoryEntry

Name

public string Name { get; set; }

Property Value

string

PathElementMap

public IDictionary<RxPath, ElementInfo> PathElementMap { get; set; }

Property Value

IDictionary<RxPath, ElementInfo>

RootFolder

public RepositoryRootFolder RootFolder { get; }

Property Value

RepositoryRootFolder

VariableNames

public ICollection<CaseInsensitiveString> VariableNames { get; }

Property Value

ICollection<CaseInsensitiveString>

VariableStore

public VariableStore VariableStore { get; set; }

Property Value

VariableStore

Methods

CaptureChangeState()

public void CaptureChangeState()

Clone()

public object Clone()

Returns

object

ComputeChangeStateHash()

public long ComputeChangeStateHash()

Returns

long

CopyImagesToNewFile(string)

public void CopyImagesToNewFile(string newRepoFilename)

Parameters

newRepoFilename string

CreateCodeWithClass(CodeGenLanguage, bool, bool, string)

public string CreateCodeWithClass(CodeGenLanguage language, bool createImageResource, bool usingImageResource, string rootNamespace = "")

Parameters

language CodeGenLanguage
createImageResource bool
usingImageResource bool
rootNamespace string

Returns

string

CreateFromFile(string)

public static ElementRepository CreateFromFile(string fileName)

Parameters

fileName string

Returns

ElementRepository

CreateFromFile(string, Stream)

public static ElementRepository CreateFromFile(string fileName, Stream stream)

Parameters

fileName string
stream Stream

Returns

ElementRepository

CreateFromMemento(Memento, ElementRepository)

public static ElementRepository CreateFromMemento(ElementRepository.Memento memento, ElementRepository current)

Parameters

memento ElementRepository.Memento
current ElementRepository

Returns

ElementRepository

CreateFromXmlNode(XmlNode)

public static ElementRepository CreateFromXmlNode(XmlNode node)

Parameters

node XmlNode

Returns

ElementRepository

CreateFromXmlNode(XmlNode, bool, ElementRepository, IDictionary<string, CompressedImage>)

public static ElementRepository CreateFromXmlNode(XmlNode node, bool newGuids, ElementRepository changeStateRef, IDictionary<string, CompressedImage> externalImages)

Parameters

node XmlNode
newGuids bool
changeStateRef ElementRepository
externalImages IDictionary<string, CompressedImage>

Returns

ElementRepository

CreateFromXmlNode(XmlNode, IDictionary<string, CompressedImage>, long)

public static ElementRepository CreateFromXmlNode(XmlNode node, IDictionary<string, CompressedImage> externalImages, long oldChangeStateHash)

Parameters

node XmlNode
externalImages IDictionary<string, CompressedImage>
oldChangeStateHash long

Returns

ElementRepository

CreateMemento()

public ElementRepository.Memento CreateMemento()

Returns

ElementRepository.Memento

CreateRepositoryEntryFromXmlNode(ElementRepository, RepositoryFolder, XmlNode)

public static RepositoryEntry CreateRepositoryEntryFromXmlNode(ElementRepository owner, RepositoryFolder parentFolder, XmlNode node)

Parameters

owner ElementRepository
parentFolder RepositoryFolder
node XmlNode

Returns

RepositoryEntry

FlushApplicationFolderTokens()

public void FlushApplicationFolderTokens()

FlushNewImagesToStore(bool)

public void FlushNewImagesToStore(bool ignoreStoreUnavailable)

Parameters

ignoreStoreUnavailable bool

GetAppFolderByBasePath(RxPath)

public RepositoryAppFolder GetAppFolderByBasePath(RxPath basePath)

Parameters

basePath RxPath

Returns

RepositoryAppFolder

GetAssociatedVariables(IVariableBindingContainer)

public IDictionary<CaseInsensitiveString, CaseInsensitiveString> GetAssociatedVariables(IVariableBindingContainer associatedContainer)

Parameters

associatedContainer IVariableBindingContainer

Returns

IDictionary<CaseInsensitiveString, CaseInsensitiveString>

GetAssociatedVariablesWithoutOverrides(IVariableBindingContainer)

public IDictionary<CaseInsensitiveString, CaseInsensitiveString> GetAssociatedVariablesWithoutOverrides(IVariableBindingContainer associatedContainer)

Parameters

associatedContainer IVariableBindingContainer

Returns

IDictionary<CaseInsensitiveString, CaseInsensitiveString>

GetEntriesByFullName(string)

public IList<RepositoryEntry> GetEntriesByFullName(string name)

Parameters

name string

Returns

IList<RepositoryEntry>

GetEntriesByGuid(Guid)

public IList<RepositoryEntry> GetEntriesByGuid(Guid guid)

Parameters

guid Guid

Returns

IList<RepositoryEntry>

GetEntriesByName(string)

public IList<RepositoryEntry> GetEntriesByName(string name)

Parameters

name string

Returns

IList<RepositoryEntry>

GetEntryByImageId(string, out string)

public RepositoryEntry GetEntryByImageId(string guid, out string imageName)

Parameters

guid string
imageName string

Returns

RepositoryEntry

GetEntryByInfo(ElementInfo, bool)

public RepositoryEntry GetEntryByInfo(ElementInfo info, bool pathFallback)

Parameters

info ElementInfo
pathFallback bool

Returns

RepositoryEntry

GetEntryByPath(RxPath)

public IList<RepositoryEntry> GetEntryByPath(RxPath path)

Parameters

path RxPath

Returns

IList<RepositoryEntry>

GetEntryWithEquivalentPath(Element, RxPath, bool, bool)

public RepositoryEntry GetEntryWithEquivalentPath(Element newElement, RxPath path, bool onlineCheck, bool onlyItems)

Parameters

newElement Element
path RxPath
onlineCheck bool
onlyItems bool

Returns

RepositoryEntry

GetImageStoreFilename(string)

public string GetImageStoreFilename(string repFileName)

Parameters

repFileName string

Returns

string

GetItemByPath(RxPath)

public RepositoryItem GetItemByPath(RxPath path)

Parameters

path RxPath

Returns

RepositoryItem

GetRefImagesFromGuids(List<Guid>)

public Dictionary<Guid, CompressedImage> GetRefImagesFromGuids(List<Guid> selectedEntryImageGuids)

Parameters

selectedEntryImageGuids List<Guid>

Returns

Dictionary<Guid, CompressedImage>

GetRepositoryDirectory()

public static string GetRepositoryDirectory()

Returns

string

MakeUniqueName(RepositoryFolder, string)

public static string MakeUniqueName(RepositoryFolder parentFolder, string name)

Parameters

parentFolder RepositoryFolder
name string

Returns

string

RefreshApplicationFolderTokens()

public void RefreshApplicationFolderTokens()

RemoveUnusedImages()

public void RemoveUnusedImages()

RenameVariable(CaseInsensitiveString, CaseInsensitiveString)

public void RenameVariable(CaseInsensitiveString oldName, CaseInsensitiveString newName)

Parameters

oldName CaseInsensitiveString
newName CaseInsensitiveString

ResetAllNewItemFlags()

public void ResetAllNewItemFlags()

ResolveVersion(string)

public static string ResolveVersion(string recordTableFilename)

Parameters

recordTableFilename string

Returns

string

SaveToFile(bool)

public bool SaveToFile(bool forceSaveAs)

Parameters

forceSaveAs bool

Returns

bool

SaveToFile(Stream, bool)

public bool SaveToFile(Stream stream, bool forceSaveAs)

Parameters

stream Stream
forceSaveAs bool

Returns

bool

SetRefImagesData(Dictionary<Guid, CompressedImage>)

public void SetRefImagesData(Dictionary<Guid, CompressedImage> imgs)

Parameters

imgs Dictionary<Guid, CompressedImage>

ToXmlDoc()

public XmlDoc ToXmlDoc()

Returns

XmlDoc

ToXmlDoc(bool, RefScreenshotStoreMode, bool)

public XmlDoc ToXmlDoc(bool withTestImages, RefScreenshotStoreMode refScMode, bool repoNodeOnly)

Parameters

withTestImages bool
refScMode RefScreenshotStoreMode
repoNodeOnly bool

Returns

XmlDoc

ToXmlString()

public string ToXmlString()

Returns

string

TryGetRepoIdFromStoreFile(string, out Guid)

public static bool TryGetRepoIdFromStoreFile(string fileName, out Guid result)

Parameters

fileName string
result Guid

Returns

bool

UpdateImageResource()

public void UpdateImageResource()

UpdateImageResource(string, string)

public static void UpdateImageResource(string repoFilePath, string outputDirectory)

Parameters

repoFilePath string
outputDirectory string

UpdateRepoIdInImageStore()

public void UpdateRepoIdInImageStore()

Events

FileNameChanged

public event EventHandler FileNameChanged

Event Type

EventHandler

ImageStoreBeginUpdating

public static event EventHandler ImageStoreBeginUpdating

Event Type

EventHandler

ImageStoreEndUpdating

public static event EventHandler ImageStoreEndUpdating

Event Type

EventHandler

ImageStoreFileCreated

public static event FileNameResolveEventHandler ImageStoreFileCreated

Event Type

FileNameResolveEventHandler

ImageStoreFileNameResolving

public static event FileNameResolveEventHandler ImageStoreFileNameResolving

Event Type

FileNameResolveEventHandler