当前位置: 首页>>代码示例>>C#>>正文


C# ILoggerFacade.Log方法代码示例

本文整理汇总了C#中ILoggerFacade.Log方法的典型用法代码示例。如果您正苦于以下问题:C# ILoggerFacade.Log方法的具体用法?C# ILoggerFacade.Log怎么用?C# ILoggerFacade.Log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILoggerFacade的用法示例。


在下文中一共展示了ILoggerFacade.Log方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Service

		public Service()
		{
			DataService = ServiceLocator.Current.GetInstance<IDataService>();
			Logger = ServiceLocator.Current.GetInstance<ILoggerFacade>();
			Logger.Log("${SolutionName} BusinessService was successfully retrieved from container.",
				Category.Info, Priority.None);
			Logger.Log("${SolutionName} Logger for BusinessService was successfully retrieved from container.",
				Category.Info, Priority.None);			
		}
开发者ID:miseeger,项目名称:SharpDevelop.Templates,代码行数:9,代码来源:Service.cs

示例2: RosterViewModel

        /// <summary>
        /// Initializes a new instance of the <see cref="RosterViewModel"/> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="logger">The logger.</param>
        /// <param name="rosterService">The roster service.</param>
        public RosterViewModel(IEventAggregator eventAggregator, ILoggerFacade logger, RosterService rosterService)
        {
            this.RosterService = rosterService;
            this.RegisterHandlers();

            logger.Log("RosterViewModel Initialized", Category.Debug, Priority.None);
        }
开发者ID:bradsjm,项目名称:LaJustPowerMeter,代码行数:13,代码来源:RosterViewModel.cs

示例3: TransactionHistoryViewModel

        public TransactionHistoryViewModel(
            ILoggerFacade logger,
            IStatusBar statusBar,
            IEventAggregator eventAggregator,
            ITradingServiceAsync tradingService,
            UserContext userContext)
        {
            logger.Log("TransactionHistoryViewModel.TransactionHistoryViewModel()", Category.Debug, Priority.Low);
            _logger = logger;
            _statusBar = statusBar;
            _eventAggregator = eventAggregator;
            _tradingService = tradingService;
            this.UserContext = userContext;
            this.Transactions = new ObservableCollection<TransactionSummary>();

            this.UpdateTransactionsCommand = new DelegateCommand<object>(this.UpdateTransactionsExecute);
            this.ResetFilterCommand = new DelegateCommand<object>(this.ResetFilterExecute);

            _tradingService.GetTransactionSummariesCompleted +=
                new EventHandler<GetTransactionSummariesCompletedEventArgs>(GetTransactionSummariesCallback);
            this.UserContext.PropertyChanged +=
                new PropertyChangedEventHandler(OnUserContextPropertyChanged);

            ResetFilter();
            SubscribeToEvents();
        }
开发者ID:popbones,项目名称:archfirst,代码行数:26,代码来源:TransactionHistoryViewModel.cs

示例4: AccountsViewModel

        public AccountsViewModel(
            ILoggerFacade logger,
            IStatusBar statusBar,
            IRegionManager regionManager,
            IEventAggregator eventAggregator,
            ITradingServiceAsync tradingService,
            UserContext userContext)
        {
            logger.Log("AccountsViewModel.AccountsViewModel()", Category.Debug, Priority.Low);
            _logger = logger;
            _statusBar = statusBar;
            _regionManager = regionManager;
            _eventAggregator = eventAggregator;
            _tradingService = tradingService;
            this.UserContext = userContext;

            _tradingService.OpenNewAccountCompleted += new EventHandler<OpenNewAccountCompletedEventArgs>(OpenNewAccountCallback);
            _tradingService.ChangeAccountNameCompleted += new EventHandler<AsyncCompletedEventArgs>(ChangeAccountNameCallback);
            CreateAccountCommand = new DelegateCommand<object>(this.CreateAccountExecute);
            EditAccountCommand = new DelegateCommand<object>(this.EditAccountExecute);
            UpdateAccountsCommand = new DelegateCommand<object>(this.UpdateAccountsExecute);
            SelectAccountCommand = new DelegateCommand<object>(this.SelectAccountExecute);

            SubscribeToEvents();
        }
开发者ID:popbones,项目名称:archfirst,代码行数:25,代码来源:AccountsViewModel.cs

示例5: TransferViewModel

        public TransferViewModel(
            ILoggerFacade logger,
            IStatusBar statusBar,
            IRegionManager regionManager,
            IEventAggregator eventAggregator,
            ITradingServiceAsync tradingService,
            Bullsfirst.InterfaceOut.Oms.MarketDataServiceReference.IMarketDataServiceAsync marketDataService,
            UserContext userContext,
            ReferenceData referenceData)
        {
            logger.Log("TransferViewModel.TransferViewModel()", Category.Debug, Priority.Low);
            _logger = logger;
            _statusBar = statusBar;
            _regionManager = regionManager;
            _eventAggregator = eventAggregator;
            _tradingService = tradingService;
            _marketDataService = marketDataService;
            this.UserContext = userContext;
            this.ReferenceData = referenceData;

            _tradingService.TransferCashCompleted += new EventHandler<AsyncCompletedEventArgs>(TransferCallback);
            _tradingService.TransferSecuritiesCompleted += new EventHandler<AsyncCompletedEventArgs>(TransferCallback);
            _tradingService.AddExternalAccountCompleted += new EventHandler<AddExternalAccountCompletedEventArgs>(AddExternalAccountCallback);
            _marketDataService.GetMarketPriceCompleted +=
                new EventHandler<InterfaceOut.Oms.MarketDataServiceReference.GetMarketPriceCompletedEventArgs>(GetMarketPriceCallback);
            TransferCommand = new DelegateCommand<object>(this.TransferExecute, this.CanTransferExecute);
            AddExternalAccountCommand = new DelegateCommand<object>(this.AddExternalAccountExecute);
            this.PropertyChanged += this.OnPropertyChanged;
            this.ValidateAll();

            SubscribeToEvents();
        }
开发者ID:popbones,项目名称:archfirst,代码行数:32,代码来源:TransferViewModel.cs

示例6: ModuleBModule

        public ModuleBModule(IRegionManager regionManager, ILoggerFacade logger)
        {
            _regionManager = regionManager;
            _logger = logger;

            _logger.Log("ModuleBModule.ctor() [done]", Category.Debug, Priority.Low);
        }
开发者ID:mouarf,项目名称:HelloWorldPrismMef,代码行数:7,代码来源:ModuleBModule.cs

示例7: OrdersViewModel

        public OrdersViewModel(
            ILoggerFacade logger,
            IStatusBar statusBar,
            IEventAggregator eventAggregator,
            ITradingServiceAsync tradingService,
            UserContext userContext,
            ReferenceData referenceData)
        {
            logger.Log("PositionsViewModel.PositionsViewModel()", Category.Debug, Priority.Low);
            _logger = logger;
            _statusBar = statusBar;
            _eventAggregator = eventAggregator;
            _tradingService = tradingService;
            this.UserContext = userContext;
            this.Orders = new ObservableCollection<Order>();
            this.ReferenceData = referenceData;

            this.UpdateOrdersCommand = new DelegateCommand<object>(this.UpdateOrdersExecute);
            this.ResetFilterCommand = new DelegateCommand<object>(this.ResetFilterExecute);
            this.CancelOrderCommand = new DelegateCommand<object>(this.CancelOrderExecute);

            _tradingService.GetOrdersCompleted +=
                new EventHandler<GetOrdersCompletedEventArgs>(GetOrdersCallback);
            _tradingService.CancelOrderCompleted +=
                new EventHandler<AsyncCompletedEventArgs>(CancelOrderCallback);
            this.UserContext.PropertyChanged +=
                new PropertyChangedEventHandler(OnUserContextPropertyChanged);

            ResetFilter();
            SubscribeToEvents();
        }
开发者ID:popbones,项目名称:archfirst,代码行数:31,代码来源:OrdersViewModel.cs

示例8: StopWatchService

        public StopWatchService(IEventAggregator eventAggregator, ILoggerFacade logger)
        {
            this.EventAggregator = eventAggregator;
            this.Logger = logger;

            this.DispatchTimer.Interval = TimeSpan.FromMilliseconds(100);
            this.DispatchTimer.Tick += this.DispatchTimerTick;

            logger.Log("StopWatchService Initialized", Category.Debug, Priority.None);
        }
开发者ID:bradsjm,项目名称:LaJustPowerMeter,代码行数:10,代码来源:StopWatchService.cs

示例9: ActionController

        public ActionController(ILoggerFacade logger, IUnityContainer container)
        {
            logger.Log("初始化导航示例中的几个按钮的视图", Category.Info, Priority.Low);
            InitializeComponent();

            this.Loaded += (s, e) =>
            {
                this.DataContext = container.Resolve<ActionControllerViewModel>();
            };
        }
开发者ID:BerdyPango,项目名称:Researches,代码行数:10,代码来源:ActionController.xaml.cs

示例10: TileCreator

 public TileCreator(ILoggerFacade logger)
 {
     logger.Log($"Windows Version : {Environment.OSVersion.Version}",Category.Info,Priority.High);
     
     if (Environment.OSVersion.Version.Build >= 10586)
         Creator = new Win10TP2TileCreator(logger);
     else 
         Creator = null;
     
     if (Creator == null) 
         throw new InvalidOperationException("This version of Windows does not support creating Tiles!");
 }
开发者ID:mgrman,项目名称:SteamPaver,代码行数:12,代码来源:TileCreator.cs

示例11: SearchModel

        public SearchModel(IEnumerable<Contract.IIdentityProvider> identityProviders, ILoggerFacade logger)
        {
            logger.Log("SearchModel ctor", Category.Debug, Priority.Low);
            _identityProviders = identityProviders.ToArray();

            var profiles = from query in _identityQueries
                                select _identityProviders.Select(ip => ip.FindProfile(new[]{query}));

            //Merge the results from each of the identityProviders into a single sequence.
            //Cancel any running queries if another request comes in (using the Switch Statement)
            _identityActivated = profiles
                .Select(queryResult => queryResult.Merge().ToList())
                .Switch()
                .Select(MergeProfiles)
                .Log(logger, "IdentityActivated");

            var msg = string.Format("SearchModel constructed with {0} identityProviders ({1})",
                                    _identityProviders.Length,
                                    string.Join(",", _identityProviders.Select(i => i.GetType().Name)));
            logger.Log(msg, Category.Debug, Priority.Medium);
        }
开发者ID:LeeCampbell,项目名称:ArtemistWest-CallMe,代码行数:21,代码来源:SearchModel.cs

示例12: PrismApplication

        /// <summary>
        /// Initializes the singleton application object. This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        /// <param name="logger">Logger</param>
        protected PrismApplication(ILoggerFacade logger)
        {
            WindowsRuntimeResourceManager.InjectIntoResxGeneratedApplicationResourcesClass(typeof(Properties.Resources));

            if (logger == null)
                throw new InvalidOperationException("Logger Facade is null");

            Logger = logger;

            Logger.Log("Created Logger", Category.Debug, Priority.Low);

            this.Suspending += OnSuspending;
        }
开发者ID:xperiandri,项目名称:Prism,代码行数:18,代码来源:PrismApplication.cs

示例13: MainWindow

        public MainWindow(IEventAggregator eventAggregator, IRegionManager regionManager, ILoggerFacade logger, AppState state)
        {
            Uri mainPage;

            InitializeComponent();

            _logger = logger;

            // Subscribes to the CloseGameEvent and closes the window when triggered.
            eventAggregator.GetEvent<CloseGameEvent>().Subscribe(a => Close());

            if (state.Mode == ScreenMode.FullScreen)
            {
                WindowStyle = WindowStyle.None;
                WindowState = WindowState.Maximized;
                Focus();
            }

            if (string.IsNullOrEmpty(state.Language))
            {
                mainPage = new Uri("/PageSelectLanguage", UriKind.Relative);
            }
            else
            {
                _dictionary.SetCultureCommand.Execute(state.Language);
                mainPage = new Uri("/PageStartMenu", UriKind.Relative);
            }

            Width = SystemParameters.PrimaryScreenWidth;
            Height = SystemParameters.PrimaryScreenHeight;

            Loaded += (o, args) =>
            {
                _logger.Log("Navigating to default header and start menu.", Category.Debug, Priority.Medium);
                regionManager.RequestNavigate("HeaderContentRegion", new Uri("/PageHeader", UriKind.Relative));
                regionManager.RequestNavigate("MainContentRegion", mainPage);
            };

            Closing += (o, args) =>
            {
                state.SaveState();
            };

            //Setup.SetupGame();
        }
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:45,代码来源:MainWindow.xaml.cs

示例14: PositionsViewModel

        public PositionsViewModel(
            ILoggerFacade logger,
            IRegionManager regionManager,
            IEventAggregator eventAggregator,
            UserContext userContext)
        {
            logger.Log("PositionsViewModel.PositionsViewModel()", Category.Debug, Priority.Low);
            _logger = logger;
            _regionManager = regionManager;
            _eventAggregator = eventAggregator;
            this.UserContext = userContext;

            BuyCommand = new DelegateCommand<object>(this.CreateBuyOrderExecute);
            SellCommand = new DelegateCommand<object>(this.CreateSellOrderExecute);
            UpdateAccountsCommand = new DelegateCommand<object>(this.UpdateAccountsExecute);

            SubscribeToEvents();
        }
开发者ID:popbones,项目名称:archfirst,代码行数:18,代码来源:PositionsViewModel.cs

示例15: MapViewModel

 public MapViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, ILoggerFacade loggerFacade, IConfiguration configuration)
 {
     _container = new ErrorsContainer<string>(OnErrorsChanged);
     this.regionManager = regionManager;
     mapDataEvent = eventAggregator.GetEvent<CompositePresentationEvent<MapData>>();
     mapLoadedEvent = eventAggregator.GetEvent<CompositePresentationEvent<MapLoaded>>();
     mapExtentEvent = eventAggregator.GetEvent<CompositePresentationEvent<MapExtent>>();
     this._loggerFacade = loggerFacade;
     this.configuration = configuration;
     _notificationErrorInteraction = new InteractionRequest<Notification>();
     this.NotificationErrorInteraction.Raised += (o, e) =>
     {
         // Do some logging
         _loggerFacade.Log(e.Context.Content as string, Category.Exception, Priority.High);
         var result = messageBoxCustom.Show(e.Context.Content as string, Silverlight.UI.Esri.JTMap.Resources.Map.ErrorMessage,
         MessageBoxCustomEnum.MessageBoxButtonCustom.Ok);
     };
     HandleRightClick = new DelegateCommand<object>(this.OnRightMouseClicked, this.CanRightMouseClicked);
     this.ContextMenuVisibility = Visibility.Collapsed;
     this.MenuItemCommand = new DelegateCommand<object>(
         this.OnMenuItemClicked, this.CanMenuItemClicked);
     string tradeNote = "J&T Software BVBA - Custom Silverlight map editor - Version 1.0";
     HelpContents.DisplayHelp(tradeNote, regionManager,false);
 }
开发者ID:jpenet,项目名称:WebArcMap,代码行数:24,代码来源:MapViewModel.cs


注:本文中的ILoggerFacade.Log方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。