Table of Contents

Class TemplateLoggerBaseCl

Namespace
SunamoCl._public.SunamoLogging.Base
Assembly
SunamoCl.dll

Base class for template-based logging that provides predefined message methods for common scenarios

public abstract class TemplateLoggerBaseCl
Inheritance
TemplateLoggerBaseCl
Derived
Inherited Members
Extension Methods

Constructors

TemplateLoggerBaseCl(Action<TypeOfMessageCl, string, string[]>)

Initializes a new instance with the specified write delegate

public TemplateLoggerBaseCl(Action<TypeOfMessageCl, string, string[]> writeLineDelegate)

Parameters

writeLineDelegate Action<TypeOfMessageCl, string, string[]>

Delegate used to write messages with type, text and arguments

Methods

AnyElementIsNull(string, string[])

Checks whether any element in the collection is null

public bool AnyElementIsNull(string nameOfCollection, string[] args)

Parameters

nameOfCollection string

Name of the collection being checked

args string[]

Array of elements to check for null values

Returns

bool

True if any element is null, false otherwise

AnyElementIsNullOrEmpty(string, List<string>)

Checks whether any element in the list is null or empty

public bool AnyElementIsNullOrEmpty(string nameOfCollection, List<string> args)

Parameters

nameOfCollection string

Name of the collection being checked

args List<string>

List of string elements to check

Returns

bool

True if any element is null or empty, false otherwise

CopiedToClipboard(string)

Logs a success message indicating something was copied to clipboard

public void CopiedToClipboard(string what)

Parameters

what string

Description of what was copied

CouldNotBeParsed(string, string)

Logs an error message indicating an entity could not be parsed

public void CouldNotBeParsed(string entityName, string entityValue)

Parameters

entityName string

Name of the entity that failed to parse

entityValue string

Value that could not be parsed

EndRunTime()

Logs a message indicating the application will be terminated

public void EndRunTime()

FileDontExists(string)

Logs an error message indicating a file does not exist

public void FileDontExists(string path)

Parameters

path string

Path of the non-existent file

Finished(string)

Logs a success message indicating an operation has finished

public void Finished(string nameOfOperation)

Parameters

nameOfOperation string

Name of the completed operation

FolderDontExists(string)

Logs an error message indicating a folder does not exist

public void FolderDontExists(string path)

Parameters

path string

Path of the non-existent folder

HaveUnallowedValue(string)

Logs an appeal message indicating a control or text has an unallowed value

public void HaveUnallowedValue(string controlNameOrText)

Parameters

controlNameOrText string

Name of the control or text description

InsertAsIndexesZeroBased()

Logs an informational message asking user to insert as zero-based indexes

public void InsertAsIndexesZeroBased()

LoadedFromStorage(string)

Logs an informational message indicating data was loaded from storage

public void LoadedFromStorage(string text)

Parameters

text string

Description of the loaded data.

MustHaveValue(string)

Logs an appeal message indicating a control or text must have a value

public void MustHaveValue(string controlNameOrText)

Parameters

controlNameOrText string

Name of the control or text description

NoData()

Logs an informational message indicating no data was provided

public void NoData()

NotEvenNumberOfElements(string, string[])

Checks whether the collection has an even number of elements

public bool NotEvenNumberOfElements(string nameOfCollection, string[] args)

Parameters

nameOfCollection string

Name of the collection being checked

args string[]

Array of elements to check

Returns

bool

True if the collection has an even number of elements, false otherwise

OperationWasStopped()

Logs an informational message indicating the operation was stopped

public void OperationWasStopped()

ResultCopiedToClipboard()

Logs a success message indicating the result was copied to clipboard

public void ResultCopiedToClipboard()

SavedToDrive(string)

Logs a success message indicating data was saved to drive

public void SavedToDrive(string filePath)

Parameters

filePath string

Path of the saved file

SomeErrorsOccuredSeeLog()

Logs an error message indicating some errors occurred and directing user to see the log

public void SomeErrorsOccuredSeeLog()

SuccessfullyResized(string)

Logs an informational message indicating something was successfully resized

public void SuccessfullyResized(string text)

Parameters

text string

Name or description of the resized item.

TryAFewSecondsLaterAfterFullyInitialized()

Logs an informational message asking user to try again later after full initialization

public void TryAFewSecondsLaterAfterFullyInitialized()

UnfortunatelyBadFormatPleaseTryAgain()

Logs an informational message indicating bad format and asking user to try again

public void UnfortunatelyBadFormatPleaseTryAgain()