コード例 #1
0
ファイル: ContextLoader.cs プロジェクト: Aosamesan/injector
        public static ContextLoader CreateContextLoader <T>()
        {
            var contextType = typeof(T);

            // Check a context class is marked with the [Context] attribute.
            AttributeHelper.CheckHasTypeAttribute <Context.Attributes.Context, NotLoadableContextException>(contextType);
            // Check a context class is instantiable
            ReflectionHelper.CheckInstantiableClass(contextType);
            return(new ContextLoader(contextType));
        }