private void ValidateDiskSpaceExhaustedOptionEnumValue(DiskSpaceExhaustedOption value, string paramName) { if ((value < DiskSpaceExhaustedOption.ThrowException) || (value > DiskSpaceExhaustedOption.DiscardMessages)) { throw new InvalidEnumArgumentException(paramName, (int) value, typeof(DiskSpaceExhaustedOption)); } }
public FileLogTraceListener(string name) : base(name) { this.m_Location = LogFileLocation.LocalUserApplicationDirectory; this.m_AutoFlush = false; this.m_Append = true; this.m_IncludeHostName = false; this.m_DiskSpaceExhaustedBehavior = DiskSpaceExhaustedOption.DiscardMessages; this.m_BaseFileName = Path.GetFileNameWithoutExtension(Application.ExecutablePath); this.m_LogFileDateStamp = LogFileCreationScheduleOption.None; this.m_MaxFileSize = 0x4c4b40L; this.m_ReserveDiskSpace = 0x989680L; this.m_Delimiter = "\t"; this.m_Encoding = System.Text.Encoding.UTF8; this.m_CustomLocation = Application.UserAppDataPath; this.m_Day = DateAndTime.Now.Date; this.m_FirstDayOfWeek = GetFirstDayOfWeek(DateAndTime.Now.Date); this.m_PropertiesSet = new BitArray(12, false); this.m_SupportedAttributes = new string[] { "append", "Append", "autoflush", "AutoFlush", "autoFlush", "basefilename", "BaseFilename", "baseFilename", "BaseFileName", "baseFileName", "customlocation", "CustomLocation", "customLocation", "delimiter", "Delimiter", "diskspaceexhaustedbehavior", "DiskSpaceExhaustedBehavior", "diskSpaceExhaustedBehavior", "encoding", "Encoding", "includehostname", "IncludeHostName", "includeHostName", "location", "Location", "logfilecreationschedule", "LogFileCreationSchedule", "logFileCreationSchedule", "maxfilesize", "MaxFileSize", "maxFileSize", "reservediskspace", "ReserveDiskSpace", "reserveDiskSpace" }; }