BarbarianIOC.Test/SomeFooDependantClass.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BarbarianIOC.Attributes;
namespace BarbarianIOC.Test
{
public class SomeFooDependantClass
{
/// <summary>
/// Note : That the NON IOC container registered constructor parameters can appear where ever, they do not need to appear at
/// the end/start. As BarbarianIOC will work out which positions each of the parameters should be when it is time to resolve the
/// Type from the BarbarianIOC.Container
/// </summary>
[DependencyConstructorAttribute]
public SomeFooDependantClass(Foo foo, int age, IBaz baz)
{
ConstructorSatisfiedFoo = foo;
ConstructorSatisfiedAge = age;
ConstructorSatisfiedIBaz = baz;
}
public Foo ConstructorSatisfiedFoo { get; private set; }
public int ConstructorSatisfiedAge { get; private set; }
public IBaz ConstructorSatisfiedIBaz { get; private set; }
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。