📄 logtypeconfiginfo.cs
字号:
using System;
using DotNetNuke.Common.Utilities;
//
// DotNetNuke - http://www.dotnetnuke.com
// Copyright (c) 2002-2005
// by Shaun Walker ( sales@perpetualmotion.ca ) of Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
// to permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions
// of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
namespace DotNetNuke.Services.Log.EventLog
{
public class LogTypeConfigInfo : LogTypeInfo
{
//TODO @SV move enum from class level to namespace level
public enum NotificationThresholdTimeTypes
{
None = 0,
Seconds = 1,
Minutes = 2,
Hours = 3,
Days = 4
}
private string logTypeConfigInfoID;
private bool loggingIsActive;
private string logFileName;
private string logFileNameWithPath;
private string logTypePortalID;
private string keepMostRecent;
private bool emailNotificationIsActive;
private string mailFromAddress;
private string mailToAddress;
private int notificationThreshold;
private int notificationThresholdTime;
private NotificationThresholdTimeTypes notificationThresholdTimeType;
public DateTime StartDateTime
{
get
{
switch (this.notificationThresholdTimeType)
{
case NotificationThresholdTimeTypes.Seconds:
return DateTime.Now.AddSeconds(this.notificationThresholdTime * - 1);
case NotificationThresholdTimeTypes.Minutes:
return DateTime.Now.AddMinutes(this.notificationThresholdTime * - 1);
case NotificationThresholdTimeTypes.Hours:
return DateTime.Now.AddHours(this.notificationThresholdTime * - 1);
case NotificationThresholdTimeTypes.Days:
return DateTime.Now.AddDays(this.notificationThresholdTime * - 1);
case NotificationThresholdTimeTypes.None:
return Null.NullDate;
default:
return Null.NullDate;
}
}
}
public bool EmailNotificationIsActive
{
get { return this.emailNotificationIsActive; }
set { this.emailNotificationIsActive = value; }
}
public string MailFromAddress
{
get { return this.mailFromAddress; }
set { this.mailFromAddress = value; }
}
public string MailToAddress
{
get { return this.mailToAddress; }
set { this.mailToAddress = value; }
}
public int NotificationThreshold
{
get { return this.notificationThreshold; }
set { this.notificationThreshold = value; }
}
public int NotificationThresholdTime
{
get { return this.notificationThresholdTime; }
set { this.notificationThresholdTime = value; }
}
public NotificationThresholdTimeTypes NotificationThresholdTimeType
{
get { return this.notificationThresholdTimeType; }
set { this.notificationThresholdTimeType = value; }
}
public string ID
{
get { return this.logTypeConfigInfoID; }
set { this.logTypeConfigInfoID = value; }
}
public bool LoggingIsActive
{
get { return this.loggingIsActive; }
set { this.loggingIsActive = value; }
}
public string LogFileName
{
get { return this.logFileName; }
set { this.logFileName = value; }
}
public string LogFileNameWithPath
{
get { return this.logFileNameWithPath; }
set { this.logFileNameWithPath = value; }
}
public string LogTypePortalID
{
get { return this.logTypePortalID; }
set { this.logTypePortalID = value; }
}
public string KeepMostRecent
{
get { return this.keepMostRecent; }
set { this.keepMostRecent = value; }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -