コード例 #1
0
        public static void AssertOwnership <TComponent>(this IComponentContext context, InstanceOwnership ownership)
        {
            var cr = context.RegistrationFor <TComponent>();

            Assert.Equal(ownership, cr.Ownership);
        }
コード例 #2
0
        public static void AssertLifetime <TComponent, TLifetime>(this IComponentContext context)
        {
            var cr = context.RegistrationFor <TComponent>();

            Assert.IsType <TLifetime>(cr.Lifetime);
        }
コード例 #3
0
        public static void AssertSharing <TComponent>(this IComponentContext context, InstanceSharing sharing)
        {
            var cr = context.RegistrationFor <TComponent>();

            Assert.Equal(sharing, cr.Sharing);
        }
コード例 #4
0
        internal static void AssertOwnership <TComponent>(this IComponentContext context, InstanceOwnership ownership)
        {
            var registration = context.RegistrationFor <TComponent>();

            Assert.Equal(ownership, registration.Ownership);
        }
コード例 #5
0
        internal static void AssertLifetime <TComponent, TLifetime>(this IComponentContext context)
        {
            var registration = context.RegistrationFor <TComponent>();

            Assert.IsType <TLifetime>(registration.Lifetime);
        }
コード例 #6
0
        internal static void AssertSharing <TComponent>(this IComponentContext context, InstanceSharing sharing)
        {
            var registration = context.RegistrationFor <TComponent>();

            Assert.Equal(sharing, registration.Sharing);
        }