コード例 #1
0
            /// <summary>
            /// Add property setter for property, use the Resolver to determine the value of the property
            /// </summary>
            /// <typeparam name="TPropertyType"></typeparam>
            /// <param name="propertyExpression"></param>
            public static void AddPropertySetter <TPropertyType>(Expression <Func <T, TPropertyType> > propertyExpression)
                where TPropertyType : class
            {
                Expression <Func <TPropertyType> > setter = () => InternalResolver <TPropertyType> .Resolve();

                AddPropertySetterInner <TPropertyType>(propertyExpression, setter);
            }
コード例 #2
0
        public static InjectorFluent <T> SetResolver <T, TConcreteType>()
            where T : class
            where TConcreteType : class, T
        {
            InternalResolver <T> .SetResolver(() => InternalResolver <TConcreteType> .Resolve());

            return(new InjectorFluent <T>());
        }
コード例 #3
0
 public static T Resolve <T>()
     where T : class
 {
     return(InternalResolver <T> .Resolve());
 }