本文整理汇总了C#中System.Resolver.RequestBinding方法的典型用法代码示例。如果您正苦于以下问题:C# Resolver.RequestBinding方法的具体用法?C# Resolver.RequestBinding怎么用?C# Resolver.RequestBinding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Resolver
的用法示例。
在下文中一共展示了Resolver.RequestBinding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Resolve
public override void Resolve(Resolver resolver)
{
var parameters = method.GetParameters();
methodParameterBindings = new Binding[parameters.Length];
for (var i = 0; i < parameters.Length; ++i)
{
var key = Key.Get(parameters[i].ParameterType, parameters[i].GetQualifierName());
methodParameterBindings[i] = resolver.RequestBinding(key, target.GetType().FullName + "::" + method.Name);
}
}
示例2: Resolve
public override void Resolve(Resolver resolver)
{
var k = 0;
for (var i = 0; i < properties.Length; ++i)
{
if (propertyBindings[i] == null)
{
propertyBindings[i] = resolver.RequestBinding(keys[k], type.FullName + "." + properties[i].Name);
}
++k;
}
if (ctor != null)
{
for (var i = 0; i < paramterBindings.Length; ++i)
{
if (paramterBindings[i] == null)
{
paramterBindings[i] = resolver.RequestBinding(keys[k], type.FullName + "::.ctor");
}
++k;
}
}
if (baseType != null && baseTypeBinding == null)
{
baseTypeBinding = resolver.RequestBinding(keys[k], MembersKey, false);
}
}