public MixinContextBuilder EnsureMixin(Type mixinType) { ArgumentUtility.CheckNotNull("mixinType", mixinType); var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(EnsureMixin(mixinType, origin)); }
public ClassContextBuilder EnsureMixins(params Type[] mixinTypes) { ArgumentUtility.CheckNotNullOrEmpty("mixinTypes", mixinTypes); var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(EnsureMixins(origin, mixinTypes)); }
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")); }
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)); }
public ClassContextBuilder EnsureMixins <TMixin1, TMixin2, TMixin3> () { var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(EnsureMixins <TMixin1, TMixin2, TMixin3> (origin)); }
public MixinContextBuilder EnsureMixin <TMixin> () { var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(EnsureMixin <TMixin> (origin)); }
public ClassContextBuilder AddOrderedMixins <TMixin1, TMixin2> () { var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(AddOrderedMixins <TMixin1, TMixin2> (origin)); }
public MixinContextBuilder AddMixin(Type mixinType) { var origin = MixinContextOrigin.CreateForStackFrame(new StackFrame(1)); return(AddMixin(mixinType, origin)); }