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


C# ILogger.ShouldNotBeNull方法代码示例

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


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

示例1: MultiServiceHost

        /// <summary>
        /// Initialises an instance of a <see cref="MultiServiceHost"/> class.
        /// </summary>
        /// <param name="logger">
        /// Logging provider.
        /// </param>
        public MultiServiceHost(ILogger logger)
        {
            logger.ShouldNotBeNull();

            m_ServiceEntries = new Hashtable();
            m_Logger = logger;
            m_ResourceLoader = new ServicesResourceLoader();
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:14,代码来源:MultiServiceHost.cs

示例2: AmqpConnection

        /// <summary>
        /// Initialises an instance of the <see cref="AmqpConnection"/> class.
        /// </summary>
        /// <param name="logger">
        /// </param>
        /// <param name="registration">
        /// Details required to connect to the queued message server.
        /// </param>
        public AmqpConnection(ILogger logger,  RegistrationData registration)
        {
            registration.ShouldNotBeNull();
            logger.ShouldNotBeNull();

            m_Address = registration.Address;
            m_Logger = logger;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:16,代码来源:AmqpConnection.cs

示例3: ArchiveDataService

        /// <summary>
        /// Initialises an instance of the <see cref="ArchiveDataService"/> class.
        /// </summary>
        /// <param name="logger"></param>
        /// <param name="fileHelper"></param>
        /// <param name="configuration"></param>
        public ArchiveDataService(ILogger logger, IFileHelper fileHelper, BufferedConfiguration configuration) : base(logger, typeof(ArchiveDataService))
        {
            logger.ShouldNotBeNull();
            fileHelper.ShouldNotBeNull();
            configuration.ShouldNotBeNull();

            m_FileHelper = fileHelper;
            m_Configuration = configuration;
            m_Logger = logger;
            m_SyncObject = new object();
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:17,代码来源:ArchiveDataService.cs

示例4: AmqpMessagePublisher

        /// <summary>
        /// Initialises an instance of the publisher.
        /// </summary>
        /// <param name="logger"></param>
        /// <param name="connection">
        /// The AMQP connection to use.
        /// </param>
        /// <param name="topicName">
        /// The topic name to publish to.
        /// </param>
        /// <param name="name">
        /// The unique name to associate with the link used to send messages on.
        /// </param>
        /// <param name="isDurable">
        /// Indicates whether the messages should be durable (Persistent).
        /// </param>
        public AmqpMessagePublisher(ILogger logger, AmqpConnection connection, string topicName, string name, bool isDurable = true)
        {
            connection.ShouldNotBeNull();
            topicName.ShouldNotBeEmpty();
            name.ShouldNotBeEmpty();
            logger.ShouldNotBeNull();

            m_Logger = logger;
            m_ConnectionId = string.Empty;
            m_Connection = connection;
            m_TopicName = topicName;
            m_Name = name;
            m_IsDurable = isDurable;
            m_SendTimeoutInMilliseconds = 10000;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:31,代码来源:AmqpMessagePublisher.cs

示例5: ThreadedService

        /// <summary>
        /// Initializes a new instance of the <see cref="ThreadedService"/> class. 
        /// </summary>
        /// <param name="logger">
        /// A logging provider.
        /// </param>
        protected ThreadedService(ILogger logger, Type serviceType) : this(serviceType)
        {
            logger.ShouldNotBeNull();

            m_Logger = logger;
            m_IsLoggingEnabled = true;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:13,代码来源:ThreadedService.cs

示例6: NetworkHelper

        /// <summary>
        /// Initialises an instance of the <see cref="NetworkHelper"/> class.
        /// </summary>
        /// <param name="logger">
        /// A logging provider.
        /// </param>
        public NetworkHelper(ILogger logger)
        {
            logger.ShouldNotBeNull();

            m_Interfaces = NetworkInterface.GetAllNetworkInterfaces();
            m_WaitForNetwork = new AutoResetEvent(false);
            m_WaitForAddressChange = new AutoResetEvent(false);
            m_SyncLock = new object();
            m_Logger = logger;
            m_WaitForNetworkEventInMilliseconds = 2000;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:17,代码来源:NetworkHelper.cs

示例7: BufferedLoggingService

        /// <summary>
        /// Initialises an instance of the <see cref="BufferedLoggingService"/> class. 
        /// </summary>
        /// <param name="fileHelper">
        /// Helper for working with files.
        /// </param>
        /// <param name="configuration">
        /// Configuration details for buffered data persistence. 
        /// </param>
        public BufferedLoggingService(LogContainer container, ILogger logger, IFileHelper fileHelper, BufferedConfiguration configuration) : base(logger, typeof(BufferedLoggingService))
        {
            logger.ShouldNotBeNull();
            fileHelper.ShouldNotBeNull();
            configuration.ShouldNotBeNull();

            m_LogEntries = container;
            m_BatchSize = 2;
            m_BufferSize = 512;

            m_FileHelper = fileHelper;
            m_WorkingFilePath = configuration.WorkingPath;
            m_TargetFilePath = configuration.TargetPath;
            m_TargetFileExtension = configuration.TargetFileExtension;
            m_WorkingFileExtension = configuration.WorkingFileExtension;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:25,代码来源:BufferedLoggingService.cs

示例8: AmqpMessageSubscriber

        /// <summary>
        /// Initialises an instance of the publisher.
        /// </summary>
        /// <param name="connection">
        /// The AMQP connection to use.
        /// </param>
        /// <param name="topicName">
        /// The topic name to publish to.
        /// </param>
        /// <param name="name">
        /// The unique name to associate with the link used to receive messages on.
        /// </param>
        /// <param name="handler">
        /// Processes incoming messages from the AMQP server.
        /// </param>
        public AmqpMessageSubscriber(ILogger logger, AmqpConnection connection, string topicName, string name, IMessageHandler handler, int windowSize = 20)
        {
            connection.ShouldNotBeNull();
            topicName.ShouldNotBeEmpty();
            handler.ShouldNotBeNull();
            name.ShouldNotBeEmpty();
            logger.ShouldNotBeNull();

            m_Logger = logger;
            m_Connection = connection;
            m_ConnectionId = string.Empty;
            m_TopicName = topicName;
            m_MessageHandler = handler;
            m_WindowSize = windowSize;
            m_Name = name;
        }
开发者ID:ukkiwisurfer,项目名称:Framework.Embedded,代码行数:31,代码来源:AmqpMessageSubscriber.cs


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