示例#1
0
 protected override Subroutine BuildNewSubroutine(Method method)
 {
     if (ContractProvider != null)
     {
         IImmutableSet <Subroutine> inheritedEnsures = GetInheritedEnsures(method);
         if (ContractProvider.HasEnsures(method))
         {
             return(ContractProvider.AccessEnsures(method, this, new Pair <Method, IImmutableSet <Subroutine> > (method, inheritedEnsures)));
         }
         if (inheritedEnsures.Count > 0)
         {
             if (inheritedEnsures.Count > 1)
             {
                 return(new EnsuresSubroutine <Dummy> (this.SubroutineFacade, method, inheritedEnsures));
             }
             return(inheritedEnsures.Any);
         }
     }
     return(new EnsuresSubroutine <Dummy> (this.SubroutineFacade, method, null));
 }