コード例 #1
0
        public static IIoCManager GetIoCManager(this IIoCContexted source)
        {
            var rval = source?.IoCContext?.Manager;

            if (rval == null)
            {
                rval = IoCManager.Instance;
            }

            return(rval);
        }
コード例 #2
0
        public static ILogger <TLevel> ResolveLogger <TLevel>(this IIoCContexted source) where TLevel : struct
        {
            var logger = source.GetIoCManager().DefualtContainer.Resolve <ILogger <TLevel> >();

            return(logger);
        }
コード例 #3
0
        public static IStandardLogger ResolveLogger(this IIoCContexted source)
        {
            var logger = source.GetIoCManager().DefualtContainer.Resolve <IStandardLogger>();

            return(logger);
        }