internal Evaluator(IDSFDataObject dataObj, IResourceCatalog resourceCat, IWorkspace theWorkspace, IBuilderSerializer serializer) { _dataObject = dataObj; _resourceCatalog = resourceCat; _workspace = theWorkspace; _serializer = serializer; }
protected AbstractWebRequestHandler(IResourceCatalog catalog, ITestCatalog testCatalog) { _dataObject = null; _resourceCatalog = catalog; _testCatalog = testCatalog; #pragma warning restore S3010 }
public RedisSources(IResourceCatalog resourceCatalog) { if (resourceCatalog == null) { throw new ArgumentNullException(nameof(resourceCatalog)); } }
public Services(IResourceCatalog resourceCatalog, IAuthorizationService authorizationService) { VerifyArgument.IsNotNull("resourceCatalog", resourceCatalog); VerifyArgument.IsNotNull("authorizationService", authorizationService); _resourceCatalog = resourceCatalog; _authorizationService = authorizationService; }
public Services(IResourceCatalog resourceCatalog, IAuthorizationService authorizationService) { VerifyArgument.IsNotNull("resourceCatalog", resourceCatalog); VerifyArgument.IsNotNull("authorizationService", authorizationService); _resourceCatalog = resourceCatalog; _authorizationService = authorizationService; }
public ElasticsearchSources(IResourceCatalog resourceCatalog) { if (resourceCatalog == null) { throw new ArgumentNullException(nameof(resourceCatalog)); } }
public RedisRemoveActivity(IResourceCatalog resourceCatalog, ResponseManager responseManager, RedisCacheBase redisCache) { ResponseManager = responseManager; ResourceCatalog = resourceCatalog; DisplayName = "Redis Remove"; _redisCache = redisCache; }
/// <summary> /// Initializes a new instance of the <see cref="PostsController"/> class. /// </summary> /// <param name="loggerFactory">The logger factory.</param> /// <param name="mediatorService">The mediator service.</param> /// <param name="notificationHandler">The notification handler.</param> /// <param name="context">The context.</param> /// <param name="resourceCatalog">The resource catalog.</param> public PostsController(ILoggerFactory loggerFactory, IMediator mediatorService, INotificationHandler notificationHandler, IContext context, IResourceCatalog resourceCatalog) : base(loggerFactory, mediatorService, notificationHandler, context, resourceCatalog) { }
#pragma warning disable S3010 // Used by tests for constructor injection public GetOpenAPIServiceHandler(IResourceCatalog catalog, IAuthorizationService auth) : base(ResourceCatalog.Instance, TestCatalog.Instance, TestCoverageCatalog.Instance, new DefaultEsbChannelFactory(), new SecuritySettings()) { _resourceCatalog = catalog; _authorizationService = auth; }
public static DataListFormat RunMultipleTestBatches(this IDSFDataObject dataObject, IPrincipal userPrinciple, Guid workspaceGuid, Dev2JsonSerializer serializer, DataListFormat formatter, IResourceCatalog catalog, ITestCatalog testCatalog, ref string executePayload) { foreach (var testsResourceId in dataObject.TestsResourceIds) { var allTests = testCatalog.Fetch(testsResourceId); var taskList = new List <Task>(); var testResults = new List <IServiceTestModelTO>(); foreach (var test in allTests) { dataObject.ResourceID = testsResourceId; var dataObjectClone = dataObject.Clone(); dataObjectClone.Environment = new ExecutionEnvironment(); dataObjectClone.TestName = test.TestName; var res = catalog.GetResource(GlobalConstants.ServerWorkspaceID, testsResourceId); var resourcePath = res.GetResourcePath(GlobalConstants.ServerWorkspaceID).Replace("\\", "/"); var lastTask = ServiceTestExecutor.GetTaskForTestExecution(resourcePath, userPrinciple, workspaceGuid, serializer, testResults, dataObjectClone); taskList.Add(lastTask); } Task.WaitAll(taskList.ToArray()); formatter = DataListFormat.CreateFormat("JSON", EmitionTypes.JSON, "application/json"); var objArray = (from testRunResult in testResults where testRunResult != null select testRunResult.BuildTestResultForWebRequest() ).ToList(); executePayload = executePayload + Environment.NewLine + serializer.Serialize(objArray); } return(formatter); }
public static void SetResourceNameAndId(this IDSFDataObject dataObject, IResourceCatalog catalog, string serviceName, out IResource resource) { IResource localResource = null; Guid resourceID; if (Guid.TryParse(serviceName, out resourceID)) { localResource = catalog.GetResource(dataObject.WorkspaceID, resourceID); if (localResource != null) { dataObject.ServiceName = localResource.ResourceName; dataObject.ResourceID = localResource.ResourceID; dataObject.SourceResourceID = localResource.ResourceID; } } else { if (!string.IsNullOrEmpty(dataObject.ServiceName)) { localResource = catalog.GetResource(dataObject.WorkspaceID, dataObject.ServiceName); if (localResource != null) { dataObject.ResourceID = localResource.ResourceID; dataObject.SourceResourceID = localResource.ResourceID; } } } resource = localResource; }
public TestCoverageCatalog(IResourceCatalog resourceCatalog) { _directoryWrapper = new DirectoryWrapper(); _fileWrapper = new FileWrapper(); _directoryWrapper.CreateIfNotExists(EnvironmentVariables.TestCoveragePath); _serializer = new Dev2JsonSerializer(); _serviceAllTestsCoverageModelToFactory = CustomContainer.Get <IServiceTestCoverageModelToFactory>() ?? new ServiceTestCoverageModelToFactory(resourceCatalog); }
public EmailSources(IResourceCatalog resourceCatalog) { if(resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } _resourceCatalog = resourceCatalog; }
public LoadResources(string resourceDirectory, IWriter writer, IDirectory directory, IResourceCatalogFactory resourceCatalogFactory) { _writer = writer; _directory = directory; _resourceDirectory = resourceDirectory; _resourceCatalogFactory = resourceCatalogFactory; _catalog = resourceCatalogFactory.New(); }
protected AbstractWebRequestHandler(IResourceCatalog resourceCatalog, ITestCatalog testCatalog, IWorkspaceRepository workspaceRepository, IAuthorizationService authorizationService, IDataObjectFactory dataObjectFactory) { _resourceCatalog = resourceCatalog; _testCatalog = testCatalog; _workspaceRepository = workspaceRepository; _authorizationService = authorizationService; _dataObjectFactory = dataObjectFactory; }
public Executor(IWorkspaceRepository workspaceRepository, IResourceCatalog resourceCatalog, ITestCatalog testCatalog, IAuthorizationService authorizationService, IDataObjectFactory dataObjectFactory) { _repository = workspaceRepository; _resourceCatalog = resourceCatalog; _testCatalog = testCatalog; _authorizationService = authorizationService; _dataObjectFactory = dataObjectFactory; }
public EmailSources(IResourceCatalog resourceCatalog) { if (resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } _resourceCatalog = resourceCatalog; }
public EvaluatorRequest(int number, int megaBytes, int core, List <ICapability> capabilitieses, IResourceCatalog catalog) { Number = number; MemoryMegaBytes = megaBytes; Capabilities = capabilitieses; VirtualCore = core; Catalog = catalog; EvaluatorBatchId = Guid.NewGuid().ToString("N"); }
public void Build(IResourceCatalog resourceCatalog) { LoadProvider = new ResourceLoadProvider(_workspaceResources, _managementServices); SyncProvider = new ResourceSyncProvider(); DeleteProvider = new ResourceDeleteProvider(resourceCatalog, _versionRepository); RenameProvider = new ResourceRenameProvider(resourceCatalog, _versionRepository); SaveProvider = new ResourceSaveProvider(resourceCatalog, _versionRepository); DuplicateProvider = new ResourceDuplicateProvider(resourceCatalog); }
public RemoteWorkflowExecutionContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace workspace, IEsbChannel esbChannel, IResourceCatalog resourceCatalog) : base(sa, dataObj, workspace, esbChannel) { if (resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } _resourceCatalog = resourceCatalog; }
public RemoteWorkflowExecutionContainer(ServiceAction sa, IDSFDataObject dataObj, IWorkspace workspace, IEsbChannel esbChannel, IResourceCatalog resourceCatalog) : base(sa, dataObj, workspace, esbChannel) { if (resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } _resourceCatalog = resourceCatalog; }
void CreateService(IResourceCatalog catalog) { if (!GetService(catalog)) { return; } GetSource(catalog); }
NodeFileSystemLocator(IApplicationContext C, IEnumerable <NodeUncInfo> srcNodes) : base(C) { NodeDriveLetters = srcNodes.Select(x => x.DriveLetter).ToList(); UncRoots = srcNodes.Select(x => x.UncRoot).ToList(); Nodes = srcNodes.ToList(); Catalog = C.SubjectCatalog(); CatalogSubjects = new List <INodeCatalogSubject>(); }
public PublishRabbitMQActivity(IResourceCatalog resourceCatalog, ConnectionFactory connectionFactory) { ResourceCatalog = resourceCatalog; ConnectionFactory = connectionFactory; DisplayName = "RabbitMQ Publish"; if (BasicProperties is null) { BasicProperties = new RabbitMqPublishOptions(); } }
private static SpecRedisRemoveActivity GetRedisRemoveActivity(IResourceCatalog resourceCatalog, string key, string hostName, RedisCacheImpl impl) { return(new SpecRedisRemoveActivity(resourceCatalog, impl) { Key = key, RedisSource = new Dev2.Data.ServiceModel.RedisSource { HostName = hostName }, }); }
void GetSource(IResourceCatalog catalog) { Source = catalog.GetResource <TSource>(GlobalConstants.ServerWorkspaceID, Service.Source.ResourceID) ?? catalog.GetResource <TSource>(GlobalConstants.ServerWorkspaceID, Service.Source.ResourceName); if (Source == null) { _errorResult.AddError(string.Format(ErrorResource.ErrorRetrievingDBSourceForResource, Service.Source.ResourceID, Service.Source.ResourceName)); } }
public static DataListFormat RunMultipleTestBatchesAndReturnTRX(this IDSFDataObject dataObject, IPrincipal userPrinciple, Guid workspaceGuid, Dev2JsonSerializer serializer, DataListFormat formatter, IResourceCatalog catalog, ITestCatalog testCatalog, ref string executePayload) { var testResults = RunListOfTests(dataObject, userPrinciple, workspaceGuid, serializer, catalog, testCatalog); formatter = DataListFormat.CreateFormat("XML", EmitionTypes.XML, "text/xml"); executePayload = ServiceTestModelTRXResultBuilder.BuildTestResultTRX(dataObject.ServiceName, testResults); return(formatter); }
protected ExecutorBase(IWorkspaceRepository workspaceRepository, IResourceCatalog resourceCatalog, ITestCatalog testCatalog, ITestCoverageCatalog testCoverageCatalog, IAuthorizationService authorizationService, IDataObjectFactory dataObjectFactory, IEsbChannelFactory esbChannelFactory, IJwtManager jwtManager) { _repository = workspaceRepository; _resourceCatalog = resourceCatalog; _testCatalog = testCatalog; _testCoverageCatalog = testCoverageCatalog; _authorizationService = authorizationService; _dataObjectFactory = dataObjectFactory; _esbChannelFactory = esbChannelFactory; _jwtManager = jwtManager; }
bool GetService(IResourceCatalog catalog) { Service = catalog.GetResource <TService>(GlobalConstants.ServerWorkspaceID, DataObj.ResourceID) ?? catalog.GetResource <TService>(GlobalConstants.ServerWorkspaceID, DataObj.ServiceName); if (Service == null) { _errorResult.AddError(string.Format(ErrorResource.ErrorLoadingResource, DataObj.ResourceID)); return(false); } return(true); }
static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape = "<DataList></DataList>", string dataListData = "", string webResponse = "<DataList><NumericGUID>74272317-2264-4564-3988-700350008298</NumericGUID></DataList>") { var dataObj = new Mock <IDSFDataObject>(); dataObj.Setup(d => d.EnvironmentID).Returns(_connection.ResourceID); dataObj.Setup(d => d.ServiceName).Returns("Test"); dataObj.Setup(d => d.RemoteInvokeResultShape).Returns(new StringBuilder("<ADL><NumericGUID></NumericGUID></ADL>")); dataObj.Setup(d => d.Environment).Returns(new ExecutionEnvironment()); dataObj.Setup(d => d.IsDebug).Returns(true); return(CreateExecutionContainer(resourceCatalog, dataListShape, dataListData, webResponse, new WebRequestFactory(), dataObj.Object)); }
public void LoadResourceCatalog() { MigrateBinResources(); ValidateResourceFolder(); _writer.Write("Loading resource catalog... "); var catalog = _resourceCatalogFactory.New(); MethodsToBeDepricated(); _writer.WriteLine("done."); _catalog = catalog; }
protected AbstractWebRequestHandler(IResourceCatalog catalog , ITestCatalog testCatalog , IDSFDataObject dataObject , IAuthorizationService authorizationService , IWorkspaceRepository repository) : this(catalog, testCatalog) { _dataObject = dataObject; _authorizationService = authorizationService; _repository = repository; }
protected AbstractWebRequestHandler(IResourceCatalog resourceCatalog, ITestCatalog testCatalog, ITestCoverageCatalog testCoverageCatalog, IWorkspaceRepository workspaceRepository, IAuthorizationService authorizationService, IDataObjectFactory dataObjectFactory, IEsbChannelFactory esbChannelFactory, ISecuritySettings securitySettings, IJwtManager jwtManager) { _resourceCatalog = resourceCatalog; _testCatalog = testCatalog; _testCoverageCatalog = testCoverageCatalog; _workspaceRepository = workspaceRepository; _authorizationService = authorizationService; _dataObjectFactory = dataObjectFactory; _esbChannelFactory = esbChannelFactory; _securitySettings = securitySettings; _jwtManager = jwtManager; }
public ApisJsonBuilder(IAuthorizationService authorizationService, IResourceCatalog resourceCatalog) { if(authorizationService == null) { throw new ArgumentNullException("authorizationService"); } if(resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } AuthorizationService = authorizationService; ResourceCatalog = resourceCatalog; }
internal ServerExplorerRepository(IResourceCatalog resourceCatalog, IExplorerItemFactory explorerItemFactory, IDirectory directory, IExplorerRepositorySync sync, IServerVersionRepository versionRepository,IFile file) { VerifyArgument.AreNotNull(new Dictionary<string, object> { { "resourceCatalog", resourceCatalog }, { "explorerItemFactory", explorerItemFactory }, { "directory", directory } }); _sync = sync; _file = file; VersionRepository = versionRepository; ResourceCatalogue = resourceCatalog; ExplorerItemFactory = explorerItemFactory; Directory = directory; }
public ServerVersionRepository(IVersionStrategy versionStrategy, IResourceCatalog catalogue, IDirectory directory, string rootPath, IFile file) { VerifyArgument.AreNotNull(new Dictionary<string, object> { {"versionStrategy", versionStrategy}, {"catalogue", catalogue}, {"directory", directory}, {"rootPath", rootPath}, {"file", file} } ); _versionStrategy = versionStrategy; _catalogue = catalogue; _directory = directory; _rootPath = rootPath; _file = file; }
public ExplorerItemFactory(IResourceCatalog catalogue, IDirectory directory, IAuthorizationService authService) { _authService = authService; Catalogue = catalogue; Directory = directory; }
// PBI 9363 - 2013.05.29 - TWR: Added for testing public WorkspaceRepository(IResourceCatalog resourceCatalog) { if(resourceCatalog == null) { throw new ArgumentNullException("resourceCatalog"); } _resourceCatalog = resourceCatalog; Directory.CreateDirectory(EnvironmentVariables.WorkspacePath); _userMap = ReadUserMap(); // ResourceCatalog constructor calls LoadFrequentlyUsedServices() // which loads the server workspace resources so don't do it here Get(ServerWorkspaceID, true, false); }
public WebServices(IResourceCatalog resourceCatalog, WebExecuteString webExecute, IAuthorizationService authorizationService) : base(resourceCatalog, authorizationService) { VerifyArgument.IsNotNull("webExecute", webExecute); _webExecute = webExecute; }
public WebServices(IResourceCatalog resourceCatalog, WebExecuteString webExecute) : this(resourceCatalog, webExecute, ServerAuthorizationService.Instance) { }
public RemoteWorkflowExecutionContainerMock(ServiceAction sa, IDSFDataObject dataObj, IWorkspace theWorkspace, IEsbChannel esbChannel, IResourceCatalog resourceCatalog) : base(sa, dataObj, theWorkspace, esbChannel, resourceCatalog) { }
static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape = "<DataList></DataList>", string dataListData = "") { var dataObj = new Mock<IDSFDataObject>(); dataObj.Setup(d => d.EnvironmentID).Returns(_connection.ResourceID); dataObj.Setup(d => d.ServiceName).Returns("Test"); dataObj.Setup(d => d.RemoteInvokeResultShape).Returns(new StringBuilder("<ADL><NumericGUID></NumericGUID></ADL>")); dataObj.Setup(d => d.Environment).Returns(new ExecutionEnvironment()); ExecutionEnvironmentUtils.UpdateEnvironmentFromXmlPayload(dataObj.Object,new StringBuilder(dataListData),dataListShape, 0); var sa = new ServiceAction(); var workspace = new Mock<IWorkspace>(); var esbChannel = new Mock<IEsbChannel>(); var container = new RemoteWorkflowExecutionContainerMock(sa, dataObj.Object, workspace.Object, esbChannel.Object, resourceCatalog) { GetRequestRespsonse = "<DataList><NumericGUID>74272317-2264-4564-3988-700350008298</NumericGUID></DataList>" }; return container; }
public WebServicesMock(IResourceCatalog resourceCatalog, WebExecuteString webExecute) : base(resourceCatalog, webExecute) { }
static ServerVersionRepository CreateServerVersionRepository(IVersionStrategy strat, IResourceCatalog cat, IDirectory dir, string rootPath, IFile file) { var serverVersionRepostory = new ServerVersionRepository(strat, cat, dir, rootPath, file); return serverVersionRepostory; }
public PluginServices(IResourceCatalog resourceCatalog, IAuthorizationService authorizationService) : base(resourceCatalog, authorizationService) { }