/// <summary> /// Creates a Log stream based on the parameters supplied. /// </summary> /// <param name="baseStream"></param> /// <param name="mask"></param> /// <param name="maskMatchType"></param> /// <param name="setTimeStamp"></param> public LogStream(Stream baseStream, MaskMatchType maskMatchType = MaskMatchType.MatchAll, bool setTimeStamp = false) { this.maskMatchType = maskMatchType; AddTimeStamp = setTimeStamp; BaseStream = baseStream; }
/// <summary> /// Returns true when this mask satisfies the flags /// </summary> /// <param name="flags">Mask or flag</param> /// <param name="maskMatchType">Matching type you want to test against</param> /// <returns></returns> public bool HasFlag(int flags, MaskMatchType maskMatchType) { return(IsContainedInMask(Mask, flags, maskMatchType == MaskMatchType.MatchAll)); }
/// <summary> /// Constructor, passing the parameters to log stream /// </summary> /// <param name="baseStream"></param> /// <param name="mask"></param> /// <param name="maskMatchType"></param> /// <param name="setTimeStamp"></param> public LogTextStream(Stream baseStream, MaskMatchType maskMatchType = MaskMatchType.MatchAll, bool setTimeStamp = false) : base(baseStream, maskMatchType, setTimeStamp) { }