コード例 #1
0
ファイル: MetroDevice.cs プロジェクト: pdougla002/iFactr-UI
 public override void Initialize()
 {
     DirectorySeparatorChar = '\\';
     File            = new Storage.MetroFile();
     ApplicationPath = Windows.ApplicationModel.Package.Current.InstalledLocation.Path + "\\Assets\\";
     DataPath        = Windows.Storage.ApplicationData.Current.LocalFolder.Path + "\\";
     Thread          = new Threading.MetroThread()
     {
         Dispatcher = _dispatcher
     };
     Log       = new Logging.BasicLogger(Path.Combine(SessionDataPath, "Log"));
     Reflector = new BasicReflector();
     Resources = new Resources.BasicResources();
     Platform  = MobilePlatform.Windows;
 }
コード例 #2
0
ファイル: LoggerFactory.cs プロジェクト: pdougla002/iFactr-UI
        /// <summary>
        /// Creates an ILog instance in the specified log path, and of the specified type.
        /// </summary>
        /// <param name="logPath">A <see cref="String"/> representing the Log path value.</param>
        /// <param name="loggerType">Type of the logger.</param>
        /// <returns></returns>
        internal static ILog Create(string logPath, LoggerType loggerType)
        {
            ILog logger;

            switch (loggerType)
            {
            //case LoggerType.NLog:
            //    logger = new NLogLogger();
            //    break;

            default:
                // returns the default - BasicLogger implementation
                logger = new BasicLogger(logPath);
                break;
            }

            return(logger);
        }
コード例 #3
0
        /// <summary>
        /// Creates an ILog instance in the specified log path, and of the specified type.
        /// </summary>
        /// <param name="logPath">A <see cref="String"/> representing the Log path value.</param>
        /// <param name="loggerType">Type of the logger.</param>
        /// <returns></returns>
        internal static ILog Create(string logPath, LoggerType loggerType)
        {
            ILog logger;
			
            switch (loggerType)
            {
                //case LoggerType.NLog:
                //    logger = new NLogLogger();
                //    break;
				
				default:
                    // returns the default - BasicLogger implementation
					logger = new BasicLogger(logPath);
                    break;
            }

            return logger;
        }
コード例 #4
0
ファイル: ConsoleDevice.cs プロジェクト: pdougla002/iFactr-UI
        public override void Initialize()
        {
            DirectorySeparatorChar = Path.DirectorySeparatorChar;
            File            = new Storage.BasicFile();
            ApplicationPath = File.DirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar;
            DataPath        = System.Configuration.ConfigurationManager.AppSettings.AllKeys.Contains("dataPath") ?
                              System.Configuration.ConfigurationManager.AppSettings.Get("dataPath") :
                              "%LOCALAPPDATA%\\ITRMobility";
            DataPath = Environment.ExpandEnvironmentVariables(DataPath);

            Thread = new MonoCross.Utilities.Threading.TaskThread
            {
                UiSynchronizationContext = System.Threading.SynchronizationContext.Current
            };

            Encryption = new Encryption.AesEncryption();
            Log        = new Logging.BasicLogger(Path.Combine(SessionDataPath, "Log"));
            Resources  = new Resources.WindowsResources();
            Reflector  = new BasicReflector();
            Platform   = MobilePlatform.Windows;
        }
コード例 #5
0
ファイル: LoggerFactory.cs プロジェクト: pdougla002/iFactr-UI
        /// <summary>
        /// Creates an ILog instance in the specified log path.
        /// </summary>
        /// <param name="logPath">A <see cref="String"/> representing the Log path value.</param>
        /// <returns></returns>
        internal static ILog Create(string logPath)
        {
            ILog logger = new BasicLogger(logPath);

            return(logger);
        }
コード例 #6
0
 /// <summary>
 /// Creates an ILog instance in the specified log path.
 /// </summary>
 /// <param name="logPath">A <see cref="String"/> representing the Log path value.</param>
 /// <returns></returns>
 internal static ILog Create(string logPath)
 {
     ILog logger = new BasicLogger(logPath);
     return logger;
 }