protected LogOutputAspectBase ( EntryType typeOfEntriesToOutput, bool writeAllEntriesIfKeyFound, IEnumerable |
||
typeOfEntriesToOutput | EntryType | Desired combination of EntryType to filter items to be collected for outputting. |
writeAllEntriesIfKeyFound | bool | /// If true and optionalKey is specified, the entire log collection is written if key is found in the collection. /// If false and optionalKey is specified, only log items with the key will be written. /// |
optionalKey | IEnumerable |
/// Optional item keys to output or to decide whether log collection needs to be written to /// output. All items are written if not specified. /// |
return | System |
protected LogOutputAspectBase(EntryType typeOfEntriesToOutput, bool writeAllEntriesIfKeyFound, IEnumerable<string> optionalKey)
{
this.keys = optionalKey == null ? new string[0] : optionalKey.Where(key => !key.IsBlank()).ToArray();
if(writeAllEntriesIfKeyFound && keys.Length == 0)
throw new ArgumentNullException("optionalKey parameter value must be specified when writeAllEntriesIfKeyFound = true.");
this.entryTypeFilter = typeOfEntriesToOutput;
this.writeAllEntriesIfKeyFound = writeAllEntriesIfKeyFound;
}