コード例 #1
0
        /// <inheritdoc/>
        protected override bool Implements(IInterfaceExposable member)
        {
            if (ReferenceEquals(member, this))
            {
                return(false);
            }

            return((member.DeclarationType == DeclarationType.PropertyGet || member.DeclarationType == DeclarationType.Variable) &&
                   member.IsInterfaceMember &&
                   ((ClassModuleDeclaration)member.ParentDeclaration).Subtypes.Any(implementation => ReferenceEquals(implementation, ParentDeclaration)) &&
                   IdentifierName.Equals(member.ImplementingIdentifierName));
        }
コード例 #2
0
ファイル: FlowKeywords.cs プロジェクト: x97mdr/fitsharp
        public void Name(Parse theCells)
        {
            Parse restOfTheCells = theCells.More;

            if (restOfTheCells == null || restOfTheCells.More == null)
            {
                throw new TableStructureException("missing cells for name.");
            }

            object namedValue = ourWithIdentifier.Equals(restOfTheCells.More.Text)
                                    ? new MethodPhrase(restOfTheCells.More).Evaluate(fixture)
                                    : fixture.ExecuteEmbeddedMethod(restOfTheCells);

            fixture.Processor.Store(new Symbol(restOfTheCells.Text, namedValue));

            fixture.TestStatus.MarkRight(restOfTheCells);
        }
コード例 #3
0
ファイル: MethodPhrase.cs プロジェクト: x97mdr/fitsharp
        public object Evaluate(Fixture theFixture)
        {
            if (myCells.More == null)
            {
                throw MakeException("missing cells");
            }
            Parse restOfCells = myCells.More;

            if (ourNewIdentifier.Equals(restOfCells.Text))
            {
                return(new MethodPhrase(restOfCells).EvaluateNew(theFixture));
            }
            if (ourTypeIdentifier.Equals(restOfCells.Text))
            {
                if (restOfCells.More == null)
                {
                    throw MakeException("missing cells");
                }
                return(theFixture.Processor.ParseTree(typeof(Type), restOfCells.More).Value);
            }
            if (ourCurrentIdentifier.Equals(restOfCells.Text))
            {
                return(theFixture.SystemUnderTest);
            }
            var fixture = theFixture as FlowFixtureBase;

            if (fixture == null)
            {
                throw MakeException("flow fixture required");
            }
            var symbol = new Symbol(restOfCells.Text);

            return(fixture.Processor.Contains(symbol)
                ? fixture.Processor.Load(symbol).Instance
                : fixture.ExecuteEmbeddedMethod(myCells));
        }
コード例 #4
0
 public bool CanParse(Type type, TypedValue instance, Tree <Cell> parameters)
 {
     return(type.IsArray && parameters.Value != null && nullIdentifier.Equals(parameters.Value.Content));
 }
コード例 #5
0
ファイル: ParseNull.cs プロジェクト: x97mdr/fitsharp
 public bool CanParse(Type type, TypedValue instance, Tree <Cell> parameters)
 {
     return(parameters.Value != null && nullIdentifier.Equals(parameters.Value.Text));
 }
コード例 #6
0
 public override bool CanExecute(ExecuteContext context, ExecuteParameters parameters)
 {
     return(context.Command == ExecuteCommand.Check && errorIdentifier.Equals(parameters.Cell.Text));
 }
コード例 #7
0
 private static bool ImpliesFalse(string possibleFalse)
 {
     return
         (ourNIdentifier.Equals(possibleFalse) || ourNoIdentifier.Equals(possibleFalse) || ourFalseIdentifier.Equals(possibleFalse));
 }
コード例 #8
0
 private static bool ImpliesTrue(string possibleTrue)
 {
     return(ourYIdentifier.Equals(possibleTrue) || ourYesIdentifier.Equals(possibleTrue) || ourTrueIdentifier.Equals(possibleTrue));
 }