Exemple #1
0
        internal virtual bool IsAvailable(PreconditionConverterAvailability availability)
        {
            // Dirty hack! Instance of PreconditionConverterContextAction should be used
            // and visible only for testing!!
            if (GetType() == typeof(PreconditionConverterContextAction) && !IsTestShell)
            {
                return(false);
            }

            return(availability.IsAvailable);
        }
Exemple #2
0
 internal override bool IsAvailable(PreconditionConverterAvailability availability)
 {
     return(availability.IsAvailable && availability.SourcePreconditionType == PreconditionType.GenericContractRequires);
 }
Exemple #3
0
 protected override bool DoIsAvailable()
 {
     _availability = PreconditionConverterAvailability.CheckIsAvailable(_provider);
     return(IsAvailable(_availability));
 }
Exemple #4
0
 internal override bool IsAvailable(PreconditionConverterAvailability availability)
 {
     return(availability.IsAvailable && availability.SourcePreconditionType == PreconditionType.IfThrowStatement);
 }
Exemple #5
0
 public PreconditionConverterExecutor(PreconditionConverterAvailability availability,
                                      PreconditionType destinationPreconditionType)
     : this(availability.Requires.CSharpStatement, availability.Requires, availability.SourcePreconditionType, destinationPreconditionType)
 {
 }