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


C# IConfiguration.Add方法代码示例

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


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

示例1: Configure

		/// <exception cref="System.Exception"></exception>
		protected override void Configure(IConfiguration config)
		{
			config.ObjectClass(typeof(UniqueConstraintOnServerTestCase.UniqueId)).ObjectField
				("id").Indexed(true);
			config.Add(new UniqueFieldValueConstraint(typeof(UniqueConstraintOnServerTestCase.UniqueId
				), "id"));
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:8,代码来源:UniqueConstraintOnServerTestCase.cs

示例2: Configure

		public virtual void Configure(IDb4oTestCase testCase, IConfiguration config)
		{
			if (testCase is IOptOutTA)
			{
				return;
			}
			config.Add(new TransparentActivationSupport());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:TAFixtureConfiguration.cs

示例3: Configure

		/// <exception cref="System.Exception"></exception>
		protected override void Configure(IConfiguration config)
		{
			config.BlockSize(8);
			config.ObjectClass(typeof(InvalidFieldNameConstraintTestCase.Person)).ObjectField
				("_firstName").Indexed(true);
			config.ObjectClass(typeof(InvalidFieldNameConstraintTestCase.Person)).ObjectField
				("_lastName").Indexed(true);
			config.Add(new TransparentActivationSupport());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:10,代码来源:InvalidFieldNameConstraintTestCase.cs

示例4: Configure

 /// <exception cref="System.Exception"></exception>
 protected override void Configure(IConfiguration config)
 {
     config.ObjectClass(typeof (Item)).ObjectField
         ("id").Indexed(true);
     config.Add(new UniqueFieldValueConstraint(typeof (Item
         ), "id"));
     config.ObjectClass(typeof (Holder)).CallConstructor
         (true);
 }
开发者ID:masroore,项目名称:db4o,代码行数:10,代码来源:UniqueFieldValueDoesNotThrowTestCase.cs

示例5: Configure

		/// <exception cref="System.Exception"></exception>
		protected override void Configure(IConfiguration config)
		{
			base.Configure(config);
			IndexField(config, typeof(UniqueFieldIndexTestCase.Item), "_str");
			config.Add(new UniqueFieldValueConstraint(typeof(UniqueFieldIndexTestCase.Item), 
				"_str"));
			config.ObjectClass(typeof(UniqueFieldIndexTestCase.IHavaNothingToDoWithItemInstances
				)).CallConstructor(true);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:10,代码来源:UniqueFieldIndexTestCase.cs

示例6: SettingsModule

		public SettingsModule(IConfiguration configuration)
		{
			Get["/settings"] = p =>
			{
				var servers = configuration.GetAll().ToArray();
				return View["settings.html", servers];
			};
			Post["/settings"] = p =>
			{
				var name = Request.Form.Name;
				var url = Request.Form.url;
				var refreshRate = Convert.ToInt64(Request.Form.refreshRate.Value);
				var server = new OkanshiServer(name, url, refreshRate);
				configuration.Add(server);
				return Response.AsRedirect("/settings");
			};
			Post["/settings/delete"] = p =>
			{
				var name = (string)Request.Form.InstanceName;
				configuration.Remove(name);
				return Response.AsRedirect("/settings");
			};
		}	
开发者ID:mvno,项目名称:Okanshi.Dashboard,代码行数:23,代码来源:SettingsModule.cs

示例7: Configure

 /// <exception cref="System.Exception"></exception>
 protected override void Configure(IConfiguration config)
 {
     config.Add(new TransparentPersistenceSupport());
     config.OptimizeNativeQueries(false);
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:QueryConsistencyTestCase.cs

示例8: Configure

 protected override void Configure(IConfiguration config)
 {
     config.Add(new FreespaceMonitoringSupport());
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:FreespaceMonitoringSupportTestCase.cs

示例9: Configure

		/// <exception cref="System.Exception"></exception>
		protected override void Configure(IConfiguration config)
		{
			config.Add(new TransparentPersistenceSupport());
			config.ObjectClass(typeof(TPFieldIndexConsistencyTestCaseBase.Item)).ObjectField(
				IdFieldName).Indexed(true);
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:TPFieldIndexConsistencyTestCaseBase.cs

示例10: ConfigureClient

		/// <exception cref="System.Exception"></exception>
		public virtual void ConfigureClient(IConfiguration config)
		{
			config.Add(new TransparentActivationSupport());
		}
开发者ID:Galigator,项目名称:db4o,代码行数:5,代码来源:TAUnavailableClassAtServer.cs

示例11: Apply

			public void Apply(IConfiguration config)
			{
				config.Add(new TransparentPersistenceSupport());
			}
开发者ID:Galigator,项目名称:db4o,代码行数:4,代码来源:CommitTimeStampsWithTPTestCase.cs

示例12: Configure

 /// <exception cref="System.Exception"></exception>
 protected override void Configure(IConfiguration config)
 {
     base.Configure(config);
     config.Add(new TransparentPersistenceSupport(new _IRollbackStrategy_21()));
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:DeactivateDeletedObjectOnRollbackStrategyTestCase.cs

示例13: Configure

		/// <exception cref="System.Exception"></exception>
		protected override void Configure(IConfiguration config)
		{
			config.Add(new TransparentPersistenceSupport());
			config.RegisterTypeHandler(new SingleClassTypeHandlerPredicate(typeof(ReentrantActivationTestCase.ReentratActivatableItem
				)), new ReentrantActivationTestCase.ReentrantActivationTypeHandler());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:ReentrantActivationTestCase.cs

示例14: ConfigureClient

 public void ConfigureClient(IConfiguration config)
 {
     config.Add(new NativeQueryMonitoringSupport());
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:PerObjectContainerPerformanceCounterTestCase.cs

示例15: Configure

			protected override void Configure(IConfiguration config)
			{
				LabeledObject transparentActivation = (LabeledObject)TransparentActivationFixture
					.Value;
				if ((bool)transparentActivation.Value())
				{
					config.Add(new TransparentActivationSupport());
				}
			}
开发者ID:Galigator,项目名称:db4o,代码行数:9,代码来源:SingleTypeCollectionReplicationTest.cs


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