Ejemplo n.º 1
0
        public MixinContextBuilder EnsureMixin(Type mixinType)
        {
            ArgumentUtility.CheckNotNull("mixinType", mixinType);
            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(EnsureMixin(mixinType, origin));
        }
Ejemplo n.º 2
0
        public ClassContextBuilder EnsureMixins(params Type[] mixinTypes)
        {
            ArgumentUtility.CheckNotNullOrEmpty("mixinTypes", mixinTypes);

            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(EnsureMixins(origin, mixinTypes));
        }
Ejemplo n.º 3
0
        public void CreateForStackFrame()
        {
            var stackFrame = GetCallerStackFrame();
            var origin     = MixinContextOrigin.CreateForStackFrame(stackFrame);

            Assert.That(origin.Kind, Is.EqualTo("Method"));
            Assert.That(origin.Assembly, Is.EqualTo(GetType().Assembly));
            Assert.That(origin.Location, Is.EqualTo("Void CreateForStackFrame(), declaring type: Remotion.Mixins.UnitTests.Core.Context.MixinContextOriginTest"));
        }
Ejemplo n.º 4
0
        public MixinConfigurationBuilder AddMixinToClass(
            MixinKind mixinKind,
            Type targetType,
            Type mixinType,
            MemberVisibility introducedMemberVisibility,
            IEnumerable <Type> explicitDependencies,
            IEnumerable <Type> suppressedMixins)
        {
            ArgumentUtility.CheckNotNull("targetType", targetType);
            ArgumentUtility.CheckNotNull("mixinType", mixinType);
            ArgumentUtility.CheckNotNull("explicitDependencies", explicitDependencies);
            ArgumentUtility.CheckNotNull("suppressedMixins", suppressedMixins);

            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(AddMixinToClass(mixinKind, targetType, mixinType, introducedMemberVisibility, explicitDependencies, suppressedMixins, origin));
        }
Ejemplo n.º 5
0
        public ClassContextBuilder EnsureMixins <TMixin1, TMixin2, TMixin3> ()
        {
            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(EnsureMixins <TMixin1, TMixin2, TMixin3> (origin));
        }
Ejemplo n.º 6
0
        public MixinContextBuilder EnsureMixin <TMixin> ()
        {
            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(EnsureMixin <TMixin> (origin));
        }
Ejemplo n.º 7
0
        public ClassContextBuilder AddOrderedMixins <TMixin1, TMixin2> ()
        {
            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(AddOrderedMixins <TMixin1, TMixin2> (origin));
        }
Ejemplo n.º 8
0
        public MixinContextBuilder AddMixin(Type mixinType)
        {
            var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1));

            return(AddMixin(mixinType, origin));
        }