コード例 #1
0
ファイル: LogWraper.cs プロジェクト: walterCui/UnityUtility
        /// <summary>
        /// Gets the log.
        /// </summary>
        /// <returns>The log.</returns>
        /// <typeparam name="T">The 1st type parameter.</typeparam>
        public static LogWraper GetLog <T>()
        {
            LogWraper log = new LogWraper();

            log.owner = typeof(T).ToString();
            log.hint  = "[" + log.owner + "]";
            return(log);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 public MessageRouter()
 {
     //listeners = new Dictionary<T, CustomerAction<T, Object>>();
     listeners = new Dictionary <T, List <CustomerAction <T, object> > >();
     log       = LogWraper.GetLog <T>();
 }
コード例 #3
0
ファイル: GlobalLog.cs プロジェクト: walterCui/UnityUtility
 static GlobalLog()
 {
     instance     = new GlobalLog();
     instance.log = LogWraper.GetLog <GlobalLog>();
 }