本文整理汇总了C#中IConfiguration.Diagnostic方法的典型用法代码示例。如果您正苦于以下问题:C# IConfiguration.Diagnostic方法的具体用法?C# IConfiguration.Diagnostic怎么用?C# IConfiguration.Diagnostic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConfiguration
的用法示例。
在下文中一共展示了IConfiguration.Diagnostic方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.ObjectClass(typeof (Item)).CascadeOnDelete
(true);
_listener = new DeleteListener();
config.Diagnostic().AddListener(_listener);
}
示例2: Configure
//$NON-NLS-1$
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.ExceptionsOnNotStorable(true);
config.RegisterTypeHandler(new SingleClassTypeHandlerPredicate(typeof(StringBuilder
)), new StringBufferHandler());
config.Diagnostic().AddListener(new _IDiagnosticListener_36());
}
示例3: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.ObjectClass(typeof(UseSecondBestIndexTestCase.Parent)).ObjectField("id").Indexed
(true);
config.ObjectClass(typeof(UseSecondBestIndexTestCase.Child)).ObjectField("id").Indexed
(true);
config.Diagnostic().AddListener(new _IDiagnosticListener_17(this));
}
示例4: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.Diagnostic().AddListener(new _IDiagnosticListener_24(this));
config.ObjectClass(typeof(ObjectFieldDoesNotExistTestCase.Item)).ObjectField(BogusFieldName
).Indexed(true);
config.ObjectClass(typeof(ObjectFieldDoesNotExistTestCase.Item)).ObjectField("_name"
).Indexed(true);
}
示例5: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.Diagnostic().AddListener(new LoadedFromClassIndexListener
(this));
config.ObjectClass(typeof (ObjectItem)).ObjectField("_child"
).Indexed(true);
config.ObjectClass(typeof (StringItem)).ObjectField("_name"
).Indexed(true);
}
示例6: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.Diagnostic().AddListener(this);
config.ObjectClass(typeof(SecondLevelIndexTestCase.Item)).ObjectField("name").Indexed
(true);
config.ObjectClass(typeof(SecondLevelIndexTestCase.ItemPair)).ObjectField("item1"
).Indexed(true);
config.ObjectClass(typeof(SecondLevelIndexTestCase.ItemPair)).ObjectField("item2"
).Indexed(true);
}
示例7: Configure
protected override void Configure(IConfiguration config)
{
base.Configure(config);
config.RegisterTypeHandler(new EnumTypeHandlerPredicate(), new EnumTypeHandler());
config.ObjectClass(typeof(Item)).CascadeOnDelete(true);
_diagnosticListener = new DeletionListener();
// The diagnostic listener is installed so we detect
// deletion failures before implementing delete
// in the EnumTypeHandler. Exceptions are silently
// caught in ClassMetadata#DeleteMembers()
config.Diagnostic().AddListener(_diagnosticListener);
}
示例8: MakeFlatStringDatabase
private static IObjectContainer MakeFlatStringDatabase(bool doIndex)
{
string path = Path.GetTempFileName();
_db4oConfiguration = Db4oFactory.Configure();
if (doIndex)
{
IObjectClass objectClass = _db4oConfiguration.ObjectClass(typeof (LanguageForm));
objectClass.ObjectField("_form").Indexed(true);
}
DiagnosticToConsole listener = new DiagnosticToConsole();
_db4oConfiguration.Diagnostic().AddListener(listener);
IObjectContainer db = Db4oFactory.OpenFile(path);
((YapStream) db).GetNativeQueryHandler().QueryOptimizationFailure +=
OnQueryOptimizationFailure;
for (int i = 0;i < 10000;i++)
{
LanguageForm f = new LanguageForm("en", i.ToString());
db.Set(f);
}
db.Commit();
return db;
}
示例9: Apply
public void Apply(IConfiguration config)
{
config.Diagnostic().RemoveAllListeners();
}
示例10: Configure
protected override void Configure(IConfiguration config)
{
base.Configure(config);
_diagnostic = config.Diagnostic();
_diagnostic.AddListener(_checker);
}
示例11: Configure
// private Object _reason = null;
protected override void Configure(IConfiguration config)
{
config.ObjectClass(typeof(NativeQueryOptimizerDiagnosticsTestCase.Subject)).ObjectField
("_name").Indexed(true);
config.Diagnostic().AddListener(new _IDiagnosticListener_24(this));
}
示例12: Configure
protected override void Configure(IConfiguration config)
{
diagnosticCollector = new DiagnosticCollector<NativeQueryNotOptimized>();
config.Diagnostic().AddListener(diagnosticCollector);
}
示例13: DeconfigureForTest
protected override void DeconfigureForTest(IConfiguration config)
{
config.Diagnostic().RemoveAllListeners();
}
示例14: ConfigureForTest
protected override void ConfigureForTest(IConfiguration config)
{
ConfigureForStore(config);
config.Diagnostic().AddListener(new _IDiagnosticListener_24(this));
}
示例15: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.ObjectClass(typeof (Item)).Translate(new TItem
());
config.Diagnostic().AddListener(_collector);
}