Exemple #1
0
        /// <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;
            }
        }
Exemple #2
0
 /// <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');
 }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
 /// <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');
 }
Exemple #5
0
 /// <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);
 }
Exemple #6
0
 /// <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');
 }
Exemple #7
0
 /// <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");
 }
Exemple #8
0
 /// <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');
 }
Exemple #9
0
 /// <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");
 }
Exemple #10
0
 /// <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');
 }
Exemple #11
0
 /// <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");
 }
Exemple #12
0
 /// <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");
 }