コード例 #1
0
ファイル: Logger.cs プロジェクト: mrfish4u/ExBuddy
		public Logger(ILogColors logColors, string name = null, bool includeVersion = false)
		{
			this.logColors = logColors;
			IncludeVersion = includeVersion;

			if (!string.IsNullOrWhiteSpace(name))
			{
				Name = name;
				return;
			}

			var type = logColors.GetType();
			Name = type.GetCustomAttributePropertyValue<LoggerNameAttribute, string>(attr => attr.Name, type.Name);
		}
コード例 #2
0
ファイル: Logger.cs プロジェクト: 21164500/ExBuddy
        public Logger(ILogColors logColors, string name = null, bool includeVersion = false)
        {
            this.logColors = logColors;
            IncludeVersion = includeVersion;

            if (!string.IsNullOrWhiteSpace(name))
            {
                Name = name;
                return;
            }

            var type = logColors.GetType();

            Name = type.GetCustomAttributePropertyValue <LoggerNameAttribute, string>(attr => attr.Name, type.Name);
        }