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 }); }
VariableInformationEnum(ITaskExecutor taskExecutor, IChildrenProvider childrenProvider) { _taskExecutor = taskExecutor; _childrenProvider = childrenProvider; _childOffset = 0; }
public void SetUp() { _completionHandler = Substitute.For <IAsyncDebugGetPropertiesCompletionHandler>(); _childrenProvider = Substitute.For <IChildrenProvider>(); _taskExecutor = Substitute.ForPartsOf <FakeTaskExecutor>(); _getPropertiesOp = new AsyncGetPropertiesOperation(_taskExecutor, _completionHandler, _childrenProvider, _fromIndex, _count); }
public AsyncGetPropertiesOperation(ITaskExecutor taskExecutor, IAsyncDebugGetPropertiesCompletionHandler completionHandler, IChildrenProvider childrenProvider, int fromIndex, int requestedCount) { _taskExecutor = taskExecutor; _completionHandler = completionHandler; _childrenProvider = childrenProvider; _fromIndex = fromIndex; _requestedCount = requestedCount; }
public int GetChildPropertyProvider(uint dwFields, uint dwRadix, uint dwTimeout, out IAsyncDebugPropertyInfoProvider ppPropertiesProvider) { ppPropertiesProvider = _taskExecutor.Run(() => { IVariableInformation cachedVarInfo = _varInfo.GetCachedView(); IChildrenProvider childrenProvider = _childrenProviderFactory.Create(cachedVarInfo.GetChildAdapter(), (enum_DEBUGPROP_INFO_FLAGS)dwFields, dwRadix); return(new AsyncDebugPropertyInfoProvider(childrenProvider, _taskExecutor)); }); return(VSConstants.S_OK); }
public int EnumChildrenImpl(enum_DEBUGPROP_INFO_FLAGS fields, uint radix, Guid guidFilter, enum_DBG_ATTRIB_FLAGS attributeFilter, string nameFilter, uint timeout, out IEnumDebugPropertyInfo2 propertyEnum) { propertyEnum = _taskExecutor.Run(() => { _varInfo.FallbackValueFormat = GetFallbackValueFormat(radix); IVariableInformation cachedVarInfo = _varInfo.GetCachedView(); IChildrenProvider childrenProvider = _childrenProviderFactory.Create(cachedVarInfo.GetChildAdapter(), fields, radix); return(_varInfoEnumFactory.Create(childrenProvider)); }); return(VSConstants.S_OK); }
public void SetUp() { FillThreeChildren(); _childrenProviderFactory = new ChildrenProvider.Factory(); var taskExecutor = new TaskExecutor(new JoinableTaskContext().Factory); var enumFactory = new VariableInformationEnum.Factory(taskExecutor); var propertyFactory = new DebugProperty.Factory( enumFactory, _childrenProviderFactory, Substitute.For <DebugCodeContext.Factory>(), new VsExpressionCreator(), taskExecutor); _childrenProviderFactory.Initialize(propertyFactory.Create); _childrenProvider = _childrenProviderFactory.Create(new ListChildAdapter.Factory().Create(_children), _nameFlag, 0); }
public virtual IEnumDebugPropertyInfo2 Create(IChildrenProvider childrenProvider) => new VariableInformationEnum(_taskExecutor, childrenProvider);
public AsyncDebugPropertyInfoProvider(IChildrenProvider childrenProvider, ITaskExecutor taskExecutor) { _childrenProvider = childrenProvider; _taskExecutor = taskExecutor; }