示例#1
0
        private static LogEntity CreateLogEntity(CacheNotifyData notifyData, UdpCacheNotifierTarget endPoint)
        {
            string message = string.Format("{0}, {1}",
                                           notifyData.ToString(),
                                           endPoint.ToString()
                                           );

            LogEntity logEntity = new LogEntity(message);

            logEntity.EventID      = 7001;
            logEntity.LogEventType = TraceEventType.Information;
            logEntity.Source       = "UdpCache";
            logEntity.Title        = "发送UdpCache";
            logEntity.Priority     = LogPriority.Normal;

            return(logEntity);
        }
        internal void InitDefaultData()
        {
            UdpCacheNotifierTarget target = new UdpCacheNotifierTarget("broadcast");

            this.BaseAdd(target);
        }