本文整理汇总了C#中IConfiguration.AddAlias方法的典型用法代码示例。如果您正苦于以下问题:C# IConfiguration.AddAlias方法的具体用法?C# IConfiguration.AddAlias怎么用?C# IConfiguration.AddAlias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConfiguration
的用法示例。
在下文中一共展示了IConfiguration.AddAlias方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddQueryAliases
private static void AddQueryAliases(IConfiguration config)
{
config.AddAlias(new TypeAlias("com.db4o.query.Evaluation", FullyQualifiedName(typeof (IEvaluation))));
config.AddAlias(new TypeAlias("com.db4o.query.Candidate", FullyQualifiedName(typeof (ICandidate))));
config.AddAlias(new WildcardAlias("com.db4o.internal.query.processor.*",
"Db4objects.Db4o.Internal.Query.Processor.*, Db4objects.Db4o"));
}
示例2: AddExceptionAliases
private static void AddExceptionAliases(IConfiguration config)
{
config.AddAlias(new TypeAlias("com.db4o.foundation.ChainedRuntimeException", FullyQualifiedName(typeof(Exception))));
config.AddAlias(new TypeAlias("java.lang.Throwable", FullyQualifiedName(typeof(Exception))));
config.AddAlias(new TypeAlias("java.lang.RuntimeException", FullyQualifiedName(typeof(Exception))));
config.AddAlias(new TypeAlias("java.lang.Exception", FullyQualifiedName(typeof(Exception))));
}
示例3: AddClientServerAliases
private static void AddClientServerAliases(IConfiguration config)
{
#if !SILVERLIGHT
config.AddAlias(new TypeAlias("com.db4o.User", FullyQualifiedName(typeof(User))));
config.AddAlias(new TypeAlias("com.db4o.cs.internal.messages.MUserMessage$UserMessagePayload", "Db4objects.Db4o.CS.Internal.Messages.MUserMessage+UserMessagePayload, Db4objects.Db4o.CS"));
config.AddAlias(new TypeAlias("com.db4o.internal.TransportObjectContainer$KnownObjectIdentity", "Db4objects.Db4o.Internal.TransportObjectContainer+KnownObjectIdentity, Db4objects.Db4o"));
config.AddAlias(new WildcardAlias("com.db4o.cs.internal.*", "Db4objects.Db4o.CS.Internal.*, Db4objects.Db4o.CS"));
#endif
}
示例4: Apply
public void Apply(IConfiguration config)
{
config.AddAlias(
// Person1 instances should be read as Person2 objects
new TypeAlias(
GetTypeName(typeof(Person1)),
GetTypeName(typeof(Person2))));
}
示例5: AddCollectionAliases
private static void AddCollectionAliases(IConfiguration config)
{
config.AddAlias(new TypeAlias("com.db4o.foundation.Collection4", FullyQualifiedName(typeof (Collection4))));
config.AddAlias(new TypeAlias("com.db4o.foundation.List4", FullyQualifiedName(typeof (List4))));
}
示例6: AddDb4OBasicAliases
private static void AddDb4OBasicAliases(IConfiguration config)
{
config.AddAlias(new WildcardAlias("com.db4o.ext.*", "Db4objects.Db4o.Ext.*, Db4objects.Db4o"));
config.AddAlias(new TypeAlias("com.db4o.StaticField", FullyQualifiedName(typeof (StaticField))));
config.AddAlias(new TypeAlias("com.db4o.StaticClass", FullyQualifiedName(typeof (StaticClass))));
}
示例7: AddAlias
private static void AddAlias(IConfiguration config, string storedType, Type runtimeType)
{
config.AddAlias(new TypeAlias(storedType, TypeReference.FromType(runtimeType).GetUnversionedName()));
}
示例8: ConfigureAliases
private static void ConfigureAliases(IConfiguration config)
{
config.Add(new JavaSupport());
AddAlias(config, "com.db4o.crossplatform.test.server.StartServer$Person", typeof (Person));
AddAlias(config, "com.db4o.crossplatform.test.server.StartServer$Movies", typeof (Movies));
AddAlias(config, "com.db4o.crossplatform.test.server.StartServer$UnoptimizideJoeFinder",
typeof (UnoptimizideJoeFinder));
AddAlias(config, "com.db4o.crossplatform.test.server.StartServer$StopServer", typeof (StopServer));
AddAlias(config, "com.db4o.crossplatform.test.server.StartServer$PersonEvaluator", typeof (PersonEvaluator));
config.AddAlias(
(new TypeAlias("com.db4o.crossplatform.test.server.StartServer$SortByYear",
"Db4objects.Db4o.Tests.CLI1.CrossPlatform.Person+SortByYearImpl, Db4objects.Db4o.Tests")));
}
示例9: Apply
public void Apply(IConfiguration config)
{
config.AddAlias(this._enclosing.alias);
}
示例10: ConfigureAliases
private void ConfigureAliases(IConfiguration configuration)
{
configuration.AddAlias(new TypeAlias("com.db4o.test.aliases.Person2", GetTypeName(GetAliasedDataType())));
// configuration.AddAlias(
// new WildcardAlias(
// "com.db4o.test.aliases.*",
// CurrentNamespace + ".*, " + CurrentAssemblyName));
configuration.AddAlias(
new TypeAlias("com.db4o.ext.Db4oDatabase", GetTypeName(typeof (Db4oDatabase))));
}