本文整理汇总了C#中ITracer.Debug方法的典型用法代码示例。如果您正苦于以下问题:C# ITracer.Debug方法的具体用法?C# ITracer.Debug怎么用?C# ITracer.Debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITracer
的用法示例。
在下文中一共展示了ITracer.Debug方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
/// <summary>
/// Initializes driver with settings object.
/// </summary>
/// <param name="tracer">Tracer sink</param>
/// <param name="settings">Arbitrary settings object, type specific to implementation</param>
/// <seealso cref="IStorageDriverFactory.Create"/>
/// <seealso cref="IStorageDriverFactory.GetDriverConfig"/>
public void Initialize(ITracer tracer, object settings)
{
if (m_initialized)
{
throw new InvalidOperationException("Already initialized");
}
if (tracer == null)
{
throw new ArgumentNullException("tracer");
}
m_tracer = tracer;
if (m_tracer.IsDebugEnabled)
{
m_tracer.Debug(string.Concat("Initializing RAM storage driver for settings string: ", settings));
}
m_changesets = new ConcurrentDictionary<long, RamDriverChangeset>();
var initString = settings as string;
if (!string.IsNullOrEmpty(initString))
{
m_settings = new RamDriverSettings();
if (0 == StringComparer.OrdinalIgnoreCase.Compare("demo", initString))
{
m_settings.InitializationCommand = initString;
}
else
{
m_settings.StorageRoot = initString;
}
}
else
{
m_settings = new RamDriverSettings(settings as RamDriverSettings);
}
CheckInitialized();
if (m_tracer.IsInfoEnabled)
{
m_tracer.Info("RAM storage driver ready");
}
}