public InvariantActionExecutor(InvariantAvailability invariantAvailability,
            ICSharpContextActionDataProvider provider)
            : base(provider)
        {
            Contract.Requires(invariantAvailability != null);
            Contract.Requires(provider != null);
            Contract.Requires(invariantAvailability.IsAvailable);

            _invariantAvailability = invariantAvailability;
            _provider = provider;
            // TODO: look at this class CSharpStatementNavigator

            _classDeclaration = provider.GetSelectedElement<IClassLikeDeclaration>(true, true);
            
            Contract.Assert(provider.SelectedElement != null);
        }
Exemple #2
0
        public InvariantActionExecutor(InvariantAvailability invariantAvailability,
                                       ICSharpContextActionDataProvider provider)
            : base(provider)
        {
            Contract.Requires(invariantAvailability != null);
            Contract.Requires(provider != null);
            Contract.Requires(invariantAvailability.IsAvailable);

            _invariantAvailability = invariantAvailability;
            _provider = provider;
            // TODO: look at this class CSharpStatementNavigator

            _classDeclaration = provider.GetSelectedElement <IClassLikeDeclaration>(true, true);

            Contract.Assert(provider.SelectedElement != null);
        }
 protected override bool DoIsAvailable()
 {
     _invariantContract = InvariantAvailability.Create(_provider);
     return(_invariantContract.IsAvailable);
 }
 protected override bool DoIsAvailable()
 {
     _invariantContract = InvariantAvailability.Create(_provider);
     return _invariantContract.IsAvailable;
 }