Пример #1
0
        public IProviderData DocumentManagementProviderInstance()
        {
            Type          typetoreturn = Type.GetType("DocumentManagement.Provider.DAL.MySQLDAO.Provider_MySqlDao,DocumentManagement.Provider");
            IProviderData oRetorno     = (IProviderData)Activator.CreateInstance(typetoreturn);

            return(oRetorno);
        }
Пример #2
0
        public string ServirBoisson([FromServices] IProviderData providerData, [FromBody] Commande commande)
        {
            if (commande.BadgeId != 0)
            {
                providerData.SaveCommande(commande);
            }

            return("\nBoisson en cours de préparation ... ");
        }
Пример #3
0
        public async Task UpdateIntegrationAsync(string userId, Provider provider, IProviderData providerData)
        {
            var entities = await QueryIntegrationsAsync($"SELECT * FROM i WHERE i.UserId = '{userId}' AND i.Provider = '{provider}'");

            var entity = entities.FirstOrDefault();

            entity.ProviderData = providerData;

            Container container = GetIntegrationsContainer();

            await container.UpsertItemAsync(entity, new PartitionKey(userId));
        }
        internal DefaultProviderAccountRequest(IProviderData providerData)
        {
            if (providerData == null)
            {
                throw new ArgumentNullException(nameof(providerData));
            }

            if (string.IsNullOrEmpty(providerData.ProviderId))
            {
                throw new ArgumentException($"{nameof(providerData.ProviderId)} within ProviderData instance must be specified.");
            }

            this.providerData = providerData;
        }
        internal DefaultProviderAccountRequest(IProviderData providerData)
        {
            if (providerData == null)
            {
                throw new ArgumentNullException(nameof(providerData));
            }

            if (string.IsNullOrEmpty(providerData.ProviderId))
            {
                throw new ArgumentException($"{nameof(providerData.ProviderId)} within ProviderData instance must be specified.");
            }

            this.providerData = providerData;
        }
Пример #6
0
        public async Task <Integration> CreateIntegrationAsync(string userId, Provider provider, string providerUserId, IProviderData data)
        {
            Container container = GetIntegrationsContainer();

            var entity = new IntegrationEntity
            {
                Id             = Guid.NewGuid().ToString(),
                UserId         = userId,
                Provider       = provider,
                ProviderUserId = providerUserId,
                ProviderData   = data
            };

            ItemResponse <IntegrationEntity> response = await container.CreateItemAsync(entity, new PartitionKey(entity.UserId));

            return(response.Resource.Map());
        }
 void IProviderAccountAccess.SetProviderData(IProviderData providerData)
     => this.SetProperty(ProviderDataPropertyName, providerData);
        public ProviderDataController()
        {
            ProviderDataFactory factory = new ProviderDataFactory();

            DataFactory = factory.DocumentManagementProviderInstance();
        }
 void IProviderAccountAccess.SetProviderData(IProviderData providerData)
 => this.SetProperty(ProviderDataPropertyName, providerData);
Пример #10
0
        public Commande ProposingBoisson([FromServices] IProviderData providerData, [FromBody] int badgeId)
        {
            Commande commande = providerData.GetLastCommande(badgeId);

            return(commande);
        }
 public Task UpdateIntegrationAsync(string userId, Provider provider, IProviderData integrationData) => throw new System.NotImplementedException();
 public Task <Integration> CreateIntegrationAsync(string userId, Provider provider, string providerUserId, IProviderData data) => throw new System.NotImplementedException();
Пример #13
0
 public TestsModel(IConfiguration config, IInventoryData inventoryData, IProviderData providerData)
 {
     this.config        = config;
     this.inventoryData = inventoryData;
     this.providerData  = providerData;
 }