예제 #1
0
 private bool CanAddContractClassIfNecessary(ICSharpFunctionDeclaration selectedFunction,
                                             out AddContractClassAvailability addContractAvailability)
 {
     // Adding contract class could be unavailable, thats ok, because this "combo" part is optional!
     addContractAvailability = AddContractClassAvailability.IsAvailableForSelectedMethod(_provider, selectedFunction);
     return(true);
 }
예제 #2
0
        public ComboEnsuresExecutor(ICSharpContextActionDataProvider provider,
                                    AddContractClassAvailability addContractAvailability,
                                    ICSharpFunctionDeclaration selectedFunctionDeclaration)
            : base(provider)
        {
            Contract.Requires(provider != null);
            Contract.Requires(addContractAvailability != null);
            Contract.Requires(addContractAvailability.IsAvailable);

            Contract.Requires(selectedFunctionDeclaration != null);

            _provider = provider;
            _addContractAvailability     = addContractAvailability;
            _selectedFunctionDeclaration = selectedFunctionDeclaration;
        }
 private bool CanAddContractForSelectedMethod(ICSharpFunctionDeclaration selectedFunction,
                                              out AddContractClassAvailability addContractAvailability)
 {
     addContractAvailability = AddContractClassAvailability.IsAvailableForSelectedMethod(_provider, selectedFunction);
     return(addContractAvailability.IsAvailable);
 }