本文整理汇总了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"));
}
示例2: Configure
public virtual void Configure(IDb4oTestCase testCase, IConfiguration config)
{
if (testCase is IOptOutTA)
{
return;
}
config.Add(new TransparentActivationSupport());
}
示例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());
}
示例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);
}
示例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);
}
示例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");
};
}
示例7: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
config.Add(new TransparentPersistenceSupport());
config.OptimizeNativeQueries(false);
}
示例8: Configure
protected override void Configure(IConfiguration config)
{
config.Add(new FreespaceMonitoringSupport());
}
示例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);
}
示例10: ConfigureClient
/// <exception cref="System.Exception"></exception>
public virtual void ConfigureClient(IConfiguration config)
{
config.Add(new TransparentActivationSupport());
}
示例11: Apply
public void Apply(IConfiguration config)
{
config.Add(new TransparentPersistenceSupport());
}
示例12: Configure
/// <exception cref="System.Exception"></exception>
protected override void Configure(IConfiguration config)
{
base.Configure(config);
config.Add(new TransparentPersistenceSupport(new _IRollbackStrategy_21()));
}
示例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());
}
示例14: ConfigureClient
public void ConfigureClient(IConfiguration config)
{
config.Add(new NativeQueryMonitoringSupport());
}
示例15: Configure
protected override void Configure(IConfiguration config)
{
LabeledObject transparentActivation = (LabeledObject)TransparentActivationFixture
.Value;
if ((bool)transparentActivation.Value())
{
config.Add(new TransparentActivationSupport());
}
}