Class TemplateLoggerBase
- Namespace
- SunamoLogging.Base
- Assembly
- SunamoLogging.dll
Base logger class for template-based logging with predefined message types.
public abstract class TemplateLoggerBase
- Inheritance
-
TemplateLoggerBase
- Derived
- Inherited Members
- Extension Methods
Constructors
TemplateLoggerBase(Action<TypeOfMessageLogging, string, string[]>)
Base logger class for template-based logging with predefined message types.
protected TemplateLoggerBase(Action<TypeOfMessageLogging, string, string[]> writeLineDelegate)
Parameters
writeLineDelegateAction<TypeOfMessageLogging, string, string[]>
Methods
AnyElementIsNull(string, string[])
Checks if any element in the collection is null.
public bool AnyElementIsNull(string collectionName, string[] collection)
Parameters
collectionNamestringThe name of the collection being checked.
collectionstring[]The collection to check.
Returns
- bool
True if any element is null, false otherwise.
AnyElementIsNullOrEmpty(string, List<string>)
Checks if any element in the collection is null or empty.
public bool AnyElementIsNullOrEmpty(string collectionName, List<string> collection)
Parameters
collectionNamestringThe name of the collection being checked.
collectionList<string>The collection to check.
Returns
- bool
True if any element is null or empty, false otherwise.
CopiedToClipboard(string)
Logs a success message indicating specific content was copied to clipboard.
public void CopiedToClipboard(string contentDescription)
Parameters
contentDescriptionstringDescription of what was copied.
CouldNotBeParsed(string, string)
Logs an error message indicating a value could not be parsed.
public void CouldNotBeParsed(string entityName, string value)
Parameters
entityNamestringThe name of the entity that failed to parse.
valuestringThe 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 doesn't exist.
public void FileDontExists(string filePath)
Parameters
filePathstringThe path to the file that doesn't exist.
Finished(string)
Logs a success message indicating an operation has finished.
public void Finished(string operationName)
Parameters
operationNamestringThe name of the completed operation.
FolderDontExists(string)
Logs an error message indicating a folder doesn't exist.
public void FolderDontExists(string folderPath)
Parameters
folderPathstringThe path to the folder that doesn't exist.
HaveUnallowedValue(string)
Logs an appeal message indicating a control has an unallowed value.
public void HaveUnallowedValue(string controlName)
Parameters
controlNamestringThe name or text of the control.
InsertAsIndexesZeroBased()
Logs an information message instructing the user to insert indexes as zero-based.
public void InsertAsIndexesZeroBased()
LoadedFromStorage(string)
Logs an information message indicating data was loaded from storage.
public void LoadedFromStorage(string description)
Parameters
descriptionstringDescription of what was loaded.
MustHaveValue(string)
Logs an appeal message indicating a control must have a value.
public void MustHaveValue(string controlName)
Parameters
controlNamestringThe name or text of the control.
NoData()
Logs an information message indicating no data is available.
public void NoData()
NotEvenNumberOfElements(string, string[])
Checks if the collection has an even number of elements.
public bool NotEvenNumberOfElements(string collectionName, string[] collection)
Parameters
collectionNamestringThe name of the collection being checked.
collectionstring[]The collection to check.
Returns
- bool
True if the collection has an even number of elements, false if odd.
OperationWasStopped()
Logs an information 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 path)
Parameters
pathstringThe path where data was saved.
SomeErrorsOccuredSeeLog()
Logs an error message indicating some errors occurred and user should check the log.
public void SomeErrorsOccuredSeeLog()
SuccessfullyResized(string)
Logs an information message indicating successful resize operation.
public void SuccessfullyResized(string fileName)
Parameters
fileNamestringThe file name that was resized.
TryAFewSecondsLaterAfterFullyInitialized()
Logs an information message prompting the user to try again after initialization completes.
public void TryAFewSecondsLaterAfterFullyInitialized()
UnfortunatelyBadFormatPleaseTryAgain()
Logs an information message indicating the format was incorrect and user should try again.
public void UnfortunatelyBadFormatPleaseTryAgain()