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


C# IConfiguration.Diagnostic方法代码示例

本文整理汇总了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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:8,代码来源:DeleteStringInUntypedFieldTestCase.cs

示例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());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:StringBufferHandlerTestCase.cs

示例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));
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:9,代码来源:UseSecondBestIndexTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:9,代码来源:ObjectFieldDoesNotExistTestCase.cs

示例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);
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:NullConstraintQueryTestCase.cs

示例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);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:11,代码来源:SecondLevelIndexTestCase.cs

示例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);
        }
开发者ID:erdincay,项目名称:db4o,代码行数:14,代码来源:EnumInUntypedVariableTestCase.cs

示例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;
		}
开发者ID:bbriggs,项目名称:wesay,代码行数:25,代码来源:Db4oQueryPerformance.cs

示例9: Apply

			public void Apply(IConfiguration config)
			{
				config.Diagnostic().RemoveAllListeners();
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:SecondLevelIndexTestCase.cs

示例10: Configure

 protected override void Configure(IConfiguration config)
 {
     base.Configure(config);
     _diagnostic = config.Diagnostic();
     _diagnostic.AddListener(_checker);
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:TransparentActivationDiagnosticsTestCase.cs

示例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));
		}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:NativeQueryOptimizerDiagnosticsTestCase.cs

示例12: Configure

 protected override void Configure(IConfiguration config)
 {
     diagnosticCollector = new DiagnosticCollector<NativeQueryNotOptimized>();
     config.Diagnostic().AddListener(diagnosticCollector);
 }
开发者ID:masroore,项目名称:db4o,代码行数:5,代码来源:PredicateWithCasts.cs

示例13: DeconfigureForTest

		protected override void DeconfigureForTest(IConfiguration config)
		{
			config.Diagnostic().RemoveAllListeners();
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:4,代码来源:CascadedDeleteFileFormatUpdateTestCase.cs

示例14: ConfigureForTest

		protected override void ConfigureForTest(IConfiguration config)
		{
			ConfigureForStore(config);
			config.Diagnostic().AddListener(new _IDiagnosticListener_24(this));
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:5,代码来源:CascadedDeleteFileFormatUpdateTestCase.cs

示例15: Configure

 /// <exception cref="System.Exception"></exception>
 protected override void Configure(IConfiguration config)
 {
     config.ObjectClass(typeof (Item)).Translate(new TItem
         ());
     config.Diagnostic().AddListener(_collector);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:DescendIntoTranslatorTestCase.cs


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