/// <summary> /// Appends the access modifire of the member information to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="memberInfo">the member information</param> /// <returns></returns> /// <since>1.5.0</since> protected override void AppendAccessModifire(LogBuffer buff, MemberInfo memberInfo) { switch (memberInfo) { case FieldInfo fieldInfo: if (!fieldInfo.IsPublic) { if (fieldInfo.IsPrivate) { buff.Append("Private "); } else if (fieldInfo.IsFamily) { buff.Append("Protected "); } else if (fieldInfo.IsAssembly) { buff.Append("Friend "); } else if (fieldInfo.IsFamilyOrAssembly) { buff.Append("Protected Friend "); } else if (fieldInfo.IsFamilyAndAssembly) { buff.Append("Private Protected "); } } break; case PropertyInfo propertyInfo: if (!propertyInfo.GetMethod?.IsPublic ?? false) { if (propertyInfo.GetMethod?.IsPrivate ?? false) { buff.Append("Private "); } else if (propertyInfo.GetMethod?.IsFamily ?? false) { buff.Append("Protected "); } else if (propertyInfo.GetMethod?.IsAssembly ?? false) { buff.Append("Friend "); } else if (propertyInfo.GetMethod?.IsFamilyOrAssembly ?? false) { buff.Append("Protected Friend "); } else if (propertyInfo.GetMethod?.IsFamilyAndAssembly ?? false) { buff.Append("Private Protected "); } } break; } }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, decimal value) { buff.Append(value).Append('D'); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, DateTime value) { buff.Append(string.Format(DateTimeFormat, value)); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, float value) { buff.Append(value).Append('F'); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, double value) { buff.Append(value); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, long value) { buff.Append(value).Append('L'); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, ulong value) { buff.Append(value).Append("UL"); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, uint value) { buff.Append(value).Append('U'); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, ushort value) { buff.Append(value).Append("US"); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, short value) { buff.Append(value).Append('S'); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, char value) { buff.Append('"'); AppendChar(buff, value, '\'', true); buff.Append("\"c"); }
/// <summary> /// Appends a string representation of the value to the log buffer. /// </summary> /// <param name="buff">the log buffer</param> /// <param name="value">the value</param> /// <returns></returns> protected override void Append(LogBuffer buff, bool value) { buff.Append(value ? "True" : "False"); }