public SavedFilterValidator(
     IReadOnlyContext context,
     ICurrentUserProvider currentUserProvider)
 {
     _context             = context;
     _currentUserProvider = currentUserProvider;
 }
 public GetSavedFiltersInProjectQueryHandler(
     IReadOnlyContext context,
     ICurrentUserProvider currentUserProvider)
 {
     _context             = context;
     _currentUserProvider = currentUserProvider;
 }
Exemple #3
0
 public GetInvitationsForExportQueryHandler(IReadOnlyContext context, IPlantProvider plantProvider, IPersonRepository personRepository)
 {
     _context          = context;
     _plantProvider    = plantProvider;
     _personRepository = personRepository;
     _utcNow           = TimeService.UtcNow;
 }
 public AuthenticationService(IUnitOfWork unitOfWork, IReadOnlyContext readOnlyContext, IRedisCache redisCache, ITimeProvider timeProvider, byte[] key, byte[] iv)
 {
     _unitOfWork      = unitOfWork;
     _timeProvider    = timeProvider;
     _readOnlyContext = readOnlyContext;
     _redisCache      = redisCache;
     _key             = key;
     _iv = iv;
 }
Exemple #5
0
 public GetActionsCrossPlantQueryHandler(
     IReadOnlyContext context,
     IPlantCache plantCache,
     IPlantSetter plantSetter)
 {
     _context     = context;
     _plantCache  = plantCache;
     _plantSetter = plantSetter;
 }
 public GetHistoricalFieldValueAttachmentQueryHandler(
     IReadOnlyContext context,
     IBlobStorage blobStorage,
     IOptionsMonitor <AttachmentOptions> attachmentOptions)
 {
     _context           = context;
     _blobStorage       = blobStorage;
     _attachmentOptions = attachmentOptions;
 }
Exemple #7
0
        public TypeData(string name, IReadOnlyContext owningContext, bool isSingleton = false)
        {
            this.Name = name;
            this.IsSingleton = isSingleton;

            this.context = new ContextData(owningContext);

            functions = new List<IReadOnlyFunction>();
            funcNames = new HashSet<string>();
        }
Exemple #8
0
 public GetTagsCrossPlantQueryHandler(
     IReadOnlyContext context,
     IPlantCache plantCache,
     IPlantSetter plantSetter)
 {
     _context     = context;
     _plantCache  = plantCache;
     _plantSetter = plantSetter;
     _utcNow      = TimeService.UtcNow;
 }
 protected async Task <List <Invitation> > GetInvitationsWithIncludesAsync(
     IReadOnlyContext context,
     List <int> invitationIds,
     CancellationToken cancellationToken)
 => await(from invitation in context.QuerySet <Invitation>()
          .Include(i => i.Participants)
          .Include(i => i.CommPkgs)
          .Include(i => i.McPkgs)
              where invitationIds.Contains(invitation.Id)
          select invitation)
 .ToListAsync(cancellationToken);
 public GetOutstandingIposForCurrentPersonQueryHandler(
     IReadOnlyContext context,
     ICurrentUserProvider currentUserProvider,
     IMeApiService meApiService,
     IPlantProvider plantProvider)
 {
     _context             = context;
     _currentUserProvider = currentUserProvider;
     _meApiService        = meApiService;
     _plantProvider       = plantProvider;
 }
Exemple #11
0
 public InvitationValidator(IReadOnlyContext context,
                            ICurrentUserProvider currentUserProvider,
                            IPersonApiService personApiService,
                            IPlantProvider plantProvider,
                            IPermissionCache permissionCache)
 {
     _context             = context;
     _currentUserProvider = currentUserProvider;
     _personApiService    = personApiService;
     _plantProvider       = plantProvider;
     _permissionCache     = permissionCache;
 }
 public GetInvitationByIdQueryHandler(IReadOnlyContext context,
                                      IFusionMeetingClient meetingClient,
                                      ICurrentUserProvider currentUserProvider,
                                      IFunctionalRoleApiService functionalRoleApiService,
                                      IPlantProvider plantProvider,
                                      ILogger <GetInvitationByIdQueryHandler> logger)
 {
     _context                  = context;
     _meetingClient            = meetingClient;
     _currentUserProvider      = currentUserProvider;
     _functionalRoleApiService = functionalRoleApiService;
     _plantProvider            = plantProvider;
     _logger = logger;
 }
Exemple #13
0
        private void AddDBReadonly(string connStringName = "readonlyConnection")
        {
            if (_dbFactory == null)
            {
                throw new InvalidOperationException("You must first initialize the database.");
            }
            var db         = _dbFactory.Get();
            var connection = (db as DbContext).Database.Connection;

            using (var command = connection.CreateCommand())
            {
                command.CommandText = "sp_executesql";
                command.CommandType = CommandType.StoredProcedure;
                var param = command.CreateParameter();
                param.ParameterName = "@statement";
                param.Value         = @"
CREATE LOGIN readonlyLogin WITH PASSWORD='******'
CREATE USER readonlyUser FROM LOGIN readonlyLogin
EXEC sp_addrolemember 'db_datareader', 'readonlyUser';
                    ";
                command.Parameters.Add(param);
                connection.Open();
                try
                {
                    command.ExecuteNonQuery();
                }
                catch (SqlException ex)
                {                               // user already exists
                    if (ex.Errors[0].Number.Equals(15025))
                    {
                    }
                    else
                    {
                        throw ex;
                    }
                }
            }

            _dbReadOnly = new ReadOnlyContext(connStringName);
        }
Exemple #14
0
 public BusReceiverService(
     IInvitationRepository invitationRepository,
     IPlantSetter plantSetter,
     IUnitOfWork unitOfWork,
     ITelemetryClient telemetryClient,
     IReadOnlyContext context,
     IMcPkgApiService mcPkgApiService,
     IApplicationAuthenticator authenticator,
     IOptionsSnapshot <AuthenticatorOptions> options,
     ICurrentUserSetter currentUserSetter,
     IBearerTokenSetter bearerTokenSetter)
 {
     _invitationRepository = invitationRepository;
     _plantSetter          = plantSetter;
     _unitOfWork           = unitOfWork;
     _telemetryClient      = telemetryClient;
     _context           = context;
     _mcPkgApiService   = mcPkgApiService;
     _authenticator     = authenticator;
     _currentUserSetter = currentUserSetter;
     _bearerTokenSetter = bearerTokenSetter;
     _ipoApiOid         = options.Value.IpoApiObjectId;
 }
Exemple #15
0
 public JourneyValidator(IReadOnlyContext context) => _context = context;
Exemple #16
0
 public TagValidator(IReadOnlyContext context, IRequirementDefinitionValidator requirementDefinitionValidator)
 {
     _context = context;
     _requirementDefinitionValidator = requirementDefinitionValidator;
 }
Exemple #17
0
 public InvitationHelper(IReadOnlyContext context) => _context = context;
 public PreservedTagsQueryHandler(IReadOnlyContext context, ITagApiService tagApiService, IPlantProvider plantProvider)
 {
     _context       = context;
     _tagApiService = tagApiService;
     _plantProvider = plantProvider;
 }
 public GetAttachmentByIdQueryHandler(IReadOnlyContext context, IBlobStorage blobStorage, IOptionsMonitor <BlobStorageOptions> blobStorageOptions)
 {
     _context            = context;
     _blobStorage        = blobStorage;
     _blobStorageOptions = blobStorageOptions;
 }
 public GetUniqueTagModesQueryHandler(IReadOnlyContext context) => _context = context;
 public GetAllJourneysQueryHandler(IReadOnlyContext context) => _context = context;
 internal VariableData(string name, IReadOnlyType type, IReadOnlyContext owner)
 {
     this.Name = name;
     this.Type = type;
     this.OwningContext = owner;
 }
 public GetTagAttachmentsQueryHandler(IReadOnlyContext context) => _context = context;
Exemple #24
0
 public ReportsRepository(IDatabaseFactory dbFactory, IReadOnlyContext readOnlyContext) : base(dbFactory)
 {
     // there's no reason to put this in the base; this class needs a read-only context to perform server-side validation.
     this.readOnlyContext = readOnlyContext;
 }
 public SearchTagsByTagFunctionQueryHandler(IReadOnlyContext context, ITagApiService tagApiService, IPlantProvider plantProvider)
 {
     _context       = context;
     _tagApiService = tagApiService;
     _plantProvider = plantProvider;
 }
Exemple #26
0
 public MarketService(IUnitOfWork unitOfWork, IReadOnlyContext readOnlyContext)
 {
     _unitOfWork      = unitOfWork;
     _readOnlyContext = readOnlyContext;
 }
Exemple #27
0
 public BalanceService(IUnitOfWork unitOfWork, IReadOnlyContext readOnlyContext)
 {
     _unitOfWork      = unitOfWork;
     _readOnlyContext = readOnlyContext;
 }
 public GetInvitationsQueryHandler(
     IReadOnlyContext context)
 {
     _context = context;
     _utcNow  = TimeService.UtcNow;
 }
Exemple #29
0
 internal ContextData(IReadOnlyContext parentContext)
 {
     this.parentContext = parentContext;
     variablesByName = new Dictionary<string, IReadOnlyVariable>();
     typesByName = new Dictionary<string, ITypeData>();
 }
Exemple #30
0
 public GetAllModesQueryHandler(IReadOnlyContext context) => _context = context;
Exemple #31
0
 public GetUniqueTagDisciplinesQueryHandler(IReadOnlyContext context) => _context = context;
Exemple #32
0
 public GetInvitationsByCommPkgNoQueryHandler(IReadOnlyContext context)
 => _context = context;
 public GetUniqueTagJourneysQueryHandler(IReadOnlyContext context) => _context = context;