Пример #1
0
        public void SetUp()
        {
            _completionHandler       = Substitute.For <IAsyncDebugGetPropertiesCompletionHandler>();
            _childrenProvider        = Substitute.For <IChildrenProvider>();
            _childrenProviderFactory = Substitute.For <IChildrenProviderFactory>();

            _childrenProviderFactory.Create(Arg.Any <IChildAdapter>(),
                                            Arg.Any <enum_DEBUGPROP_INFO_FLAGS>(), Arg.Any <uint>())
            .Returns(_childrenProvider);

            _taskExecutor           = Substitute.ForPartsOf <FakeTaskExecutor>();
            _frameVariablesProvider = Substitute.For <FrameVariablesProvider>(null, null, null);

            _getPropertiesOp = new AsyncGetRootPropertiesOperation(_frameVariablesProvider,
                                                                   _taskExecutor,
                                                                   _completionHandler,
                                                                   _childrenProviderFactory,
                                                                   enum_DEBUGPROP_INFO_FLAGS
                                                                   .DEBUGPROP_INFO_FULLNAME, 10,
                                                                   new Guid(
                                                                       "12345678-1234-1234-1234-123456789123"));

            var varibleStub = Substitute.For <IVariableInformation>();

            _frameVariablesProvider.Get(Arg.Any <Guid>())
            .Returns(new List <IVariableInformation>
            {
                varibleStub
            });
        }
Пример #2
0
 public void SetUp()
 {
     _completionHandler = Substitute.For <IAsyncDebugGetPropertiesCompletionHandler>();
     _childrenProvider  = Substitute.For <IChildrenProvider>();
     _taskExecutor      = Substitute.ForPartsOf <FakeTaskExecutor>();
     _getPropertiesOp   = new AsyncGetPropertiesOperation(_taskExecutor, _completionHandler,
                                                          _childrenProvider, _fromIndex,
                                                          _count);
 }
Пример #3
0
        public int GetPropertiesAsync(uint firstIndex, uint count,
                                      IAsyncDebugGetPropertiesCompletionHandler pCompletionHandler,
                                      out IAsyncDebugEngineOperation ppDebugOperation)
        {
            ppDebugOperation = new AsyncGetPropertiesOperation(_taskExecutor, pCompletionHandler,
                                                               _childrenProvider, (int)firstIndex,
                                                               (int)count);

            return(VSConstants.S_OK);
        }
 public AsyncGetPropertiesOperation(ITaskExecutor taskExecutor,
                                    IAsyncDebugGetPropertiesCompletionHandler
                                    completionHandler,
                                    IChildrenProvider childrenProvider, int fromIndex,
                                    int requestedCount)
 {
     _taskExecutor      = taskExecutor;
     _completionHandler = completionHandler;
     _childrenProvider  = childrenProvider;
     _fromIndex         = fromIndex;
     _requestedCount    = requestedCount;
 }
Пример #5
0
        public int GetPropertiesAsync(uint firstIndex, uint count,
                                      IAsyncDebugGetPropertiesCompletionHandler pCompletionHandler,
                                      out IAsyncDebugEngineOperation ppDebugOperation)
        {
            ppDebugOperation = new AsyncGetRootPropertiesOperation(_frameVariablesProvider,
                                                                   _taskExecutor,
                                                                   pCompletionHandler,
                                                                   _childrenProviderFactory,
                                                                   _fields, _radix, _guidFilter);

            return(VSConstants.S_OK);
        }
Пример #6
0
 public AsyncGetRootPropertiesOperation(FrameVariablesProvider frameVariablesProvider,
                                        ITaskExecutor taskExecutor,
                                        IAsyncDebugGetPropertiesCompletionHandler
                                        completionHandler,
                                        IChildrenProviderFactory childrenProviderFactory,
                                        enum_DEBUGPROP_INFO_FLAGS fields, uint radix,
                                        Guid guidFilter)
 {
     _frameVariablesProvider  = frameVariablesProvider;
     _taskExecutor            = taskExecutor;
     _completionHandler       = completionHandler;
     _childrenProviderFactory = childrenProviderFactory;
     _fields     = fields;
     _radix      = radix;
     _guidFilter = guidFilter;
 }