Beispiel #1
0
        public override bool IsCompatible(BuildContext context, IAbstractTypeBuilder typeBuilder)
        {
            if (context.IsBuildStep)
            {
                return(false);
            }

            AbstractTypeBuilderList list = new AbstractTypeBuilderList(2);

            list.Add(this);
            list.Add(typeBuilder);

            BuildStep step = context.Step;

            try
            {
                context.Step = BuildStep.Build;

                return(typeBuilder.IsApplied(context, list));
            }
            finally
            {
                context.Step = step;
            }
        }
		public override bool IsCompatible(BuildContext context, IAbstractTypeBuilder typeBuilder)
		{
			if (context.IsBuildStep)
				return false;

			var list = new AbstractTypeBuilderList(2) { this, typeBuilder };
			var step = context.Step;

			try
			{
				context.Step = BuildStep.Build;

				return typeBuilder.IsApplied(context, list);
			}
			finally
			{
				context.Step = step;
			}
		}
        public override bool IsCompatible(BuildContext context, IAbstractTypeBuilder typeBuilder)
        {
            if (context.IsBuildStep)
            {
                return(false);
            }

            var list = new List <IAbstractTypeBuilder>(2)
            {
                this, typeBuilder
            };
            var step = context.Step;

            try
            {
                context.Step = BuildStep.Build;

                return(typeBuilder.IsApplied(context, list));
            }
            finally
            {
                context.Step = step;
            }
        }
Beispiel #4
0
 private bool IsApplied(IAbstractTypeBuilder builder, AbstractTypeBuilderList builders, BuildStep buildStep)
 {
     _context.Step = buildStep;
     return(builder.IsApplied(_context, builders));
 }