Commits

Hosein Yeganloo committed 29319c4

Start of the logger initialization part

Comments (0)

Files changed (6)

 syntax: glob
-*.dll
+
 *.pidb
 *.userprefs
 *~
-/bin
-/obj
+*/bin
+*/obj

HYLogger/HYLogger/Enums/ConfigEnums.cs

+using System;
+
+namespace HYLogger.Enums
+{
+	public enum ConfigType : byte { Simple }
+}
+

HYLogger/HYLogger/HYLogger.csproj

   </ItemGroup>
   <ItemGroup>
     <Compile Include="AssemblyInfo.cs" />
-    <Compile Include="Data\Log.cs" />
     <Compile Include="Logger.cs" />
+    <Compile Include="Enums\ConfigEnums.cs" />
+    <Compile Include="Model\Log.cs" />
+    <Compile Include="Model\Config.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <ItemGroup>
-    <Folder Include="Data\" />
+    <Folder Include="Enums\" />
+    <Folder Include="Model\" />
   </ItemGroup>
 </Project>

HYLogger/HYLogger/Logger.cs

 using System;
+using HYLogger.Enums;
+using HYLogger.Model;
 
 namespace HYLogger
 {
 	public class Logger
 	{
-		public Logger ()
+		#region Constructors
+		
+		public Logger ():this(ConfigType.Simple){ }
+		
+		public Logger(ConfigType type)
 		{
+			_configType = type;
 		}
+		
+		#endregion 
+		
+		#region Config Fields
+		
+		private ConfigType _configType;
+		
+		public Config Configuration { get; set; }
+		
+		#endregion
 	}
 }
 

HYLogger/HYLogger/Model/Config.cs

+using System;
+
+namespace HYLogger.Model
+{
+	public class Config
+	{
+		private Config ()
+		{
+		}
+	}
+}
+

HYLogger/HYLogger/Model/Log.cs

+using System;
+
+namespace HYLogger.Model
+{
+	public class Log
+	{
+		#region Constructors
+		
+		public Log () { }
+		
+		Log(string userName,string subject,byte type,string value):this(userName,subject,type,DateTime.Now,value){ }
+		
+		Log(string userName,string subject,byte type,DateTime createDate,string value)
+		{
+			UserName = userName;
+			Subject = subject;
+			type = LogType;
+			CreateDate = createDate;
+			Value = value;
+		}
+		
+		#endregion
+		
+		#region Log Properties
+		
+		/// <summary>
+		/// Gets or sets the name of the user who is loggin.
+		/// </summary>
+		/// <value>
+		/// The name of the user who is loggin.
+		/// </value>
+		public string UserName { get; set; }
+		
+		/// <summary>
+		/// Gets or set, where logging is happened.
+		/// </summary>
+		/// <value>
+		/// where logging is happened.
+		/// </value>
+		public string Subject { get; set; }
+		
+		/// <summary>
+		/// Gets or sets byte value that determine Log level or any other enumerable data about type of this log.
+		/// </summary>
+		/// <value>
+		/// The log type.
+		/// </value>
+		public byte LogType { get; set; }
+		
+		/// <summary>
+		/// Gets or sets the create date.
+		/// </summary>
+		/// <value>
+		/// The create date.
+		/// </value>
+		public DateTime CreateDate { get; set; }
+		
+		/// <summary>
+		/// Gets or sets the value that is logging.
+		/// </summary>
+		/// <value>
+		/// The log value.
+		/// </value>
+		public string Value { get; set; }
+		
+		#endregion
+			
+	}
+}
+