Esempio n. 1
0
 public LoginPageViewModel()
 {
     LoginCommand   = new Command(LoginButtonClicked);
     Client         = AzureManager.GetAzureManager(Constants.AzureUrl);
     UserService    = new UserService();
     OfflineManager = OfflineSyncManager.GetOfflineSyncManager(Constants.AzureUrl);
 }
        protected AzureManagerTests(bool useBlobListCache)
        {
            string connectionString = ConfigHelpers.GetConnectionString();
            string containerName    = ConfigHelpers.GetContainerName();

            this.azureManager = new AzureManager(connectionString, containerName, "/Testing", useBlobListCache);
        }
Esempio n. 3
0
        public static bool BindData(string queueMsg, ILogger log = null)
        {
            JsonResult jObject = JsonConvert.DeserializeObject <JsonResult>(queueMsg);
            string     crmURL  = string.Empty;

            try
            {
                crmURL = AzureManager.GetValueFromAzureVault(ConfigurationManager.AppSettings["KeyVaultUrl"] + jObject.OrgUniqueName);
            }
            catch (Exception ex)
            {
                WriteInfoLog(log, "Error in Queue message." + ex.ToString());
            }

            if (!string.IsNullOrEmpty(crmURL))
            {
                var service = CRMManager.GetCRMService(crmURL);

                Entity entityName = new Entity("ait_msteams");
                entityName.Id                     = new Guid(jObject.RecordId);
                entityName["ait_teamsid"]         = jObject.TeamId;
                entityName["ait_groupid"]         = jObject.GroupId;
                entityName["ait_teamslibraryurl"] = jObject.TeamLibraryUrl;
                service.Update(entityName);
                return(true);
            }

            return(false);
        }
Esempio n. 4
0
 public HomePageViewModel(double MinValue = 0, double MaxValue = 0)
 {
     MinPrice       = MinValue;
     MaxPrice       = MaxValue;
     Client         = AzureManager.GetAzureManager(Constants.AzureUrl);
     OfflineManager = OfflineSyncManager.GetOfflineSyncManager(Constants.AzureUrl);
     SyncCommand    = new Command(() => { SyncItems(); });
 }
Esempio n. 5
0
    private void Start()
    {
        m_Error = new Error.ErrorResponse();
        m_PersonCreatedSuccess = new PersonCreateSuccess.PersonCreateSuccessResponse();
        m_TrainingStatus       = new Training.TrainingStatus();
        m_ListOfPersonsInGroup = new List <PersonInGroup.Person>();

        m_AzureManager = GetComponent <AzureManager>();
        m_ApiKey       = m_AzureManager.GetApiKey();
        m_Endpoint     = m_AzureManager.GetEndpoint();
    }
Esempio n. 6
0
        public async Task SetCurrentPosition(IGeographicalPosition currentPosition)
        {
            GeographicalPositionEntity currentPositionEntity = new GeographicalPositionEntity(currentPosition);

            using (AzureManager azureManager = new AzureManager(SettingProvider.Instance.GetString(Constants.STORAGE),
                                                                SettingProvider.Instance.GetInt(Constants.MAXATTEMPTS), SettingProvider.Instance.GetInt(Constants.WAITSECONDS)))
            {
                azureManager.InsertOrReplaceEntity(SettingProvider.Instance.GetString(Constants.WATNAME), currentPositionEntity, true);

                await Task.CompletedTask;
            }
        }
        public ShoppingCartViewModel()
        {
            _connection       = DependencyService.Get <ISQLiteDB>().GetConnection();
            Client            = AzureManager.GetAzureManager(Constants.AzureUrl);
            DeleteItemCommand = new Command(DeleteItemFromSQLLite);
            SubmitCartCommand = new Command(SubmitCartToAzureDB);

            UsersTable       = client.GetOfflineSyncTableReference <User>();
            ItemsTable       = client.GetOfflineSyncTableReference <Item>();
            OrdersTable      = client.GetOfflineSyncTableReference <Order>();
            OrdersItemsTable = client.GetOfflineSyncTableReference <OrderItems>();
        }
Esempio n. 8
0
 // Start is called before the first frame update
 void Start()
 {
     // Check that all managers are present
     m_AzureManager       = FindObjectOfType <AzureManager>();
     m_AzureFaceDetection = FindObjectOfType <AzureFaceDetection>();
     m_CaptureManager     = FindObjectOfType <CaptureManager>();
     if (m_AzureFaceDetection == null || m_AzureManager == null || m_CaptureManager == null)
     {
         Debug.Log(Constants.MANAGERS_NOT_PRESENT);
     }
     else
     {
         Initialize();
     }
 }
Esempio n. 9
0
    // Start is called before the first frame update
    void Start()
    {
        WindowsVoice.speak("こんにちは。写真を登録してください。");

        retrievedHoroscope += OnRetrievedHoroscope;

        StartCoroutine(NetworkManager.GetRequest("http://api.jugemkey.jp/api/horoscope/free/2019/05/20", retrievedHoroscope));

        m_WebcamManager = GameObject.FindGameObjectWithTag("CameraManager").GetComponent <WebcamManager>();
        m_AzureManager  = GameObject.FindGameObjectWithTag("AzureManager").GetComponent <AzureManager>();
        m_BaseManager   = GameObject.Find("BaseManager").GetComponent <BaseManager>();


        m_ActivePersonGroup = GetPersonGroupId();

        m_StatusText    = GameObject.FindGameObjectWithTag("Status").GetComponent <TMPro.TextMeshProUGUI>();
        m_GroupNameText = GameObject.FindGameObjectWithTag("GroupNameText").GetComponent <TMPro.TextMeshProUGUI>();

        m_Endpoint = m_AzureManager.GetEndpoint();
        m_ApiKey   = m_AzureManager.GetApiKey();

        m_CreatePersonButton = GameObject.FindGameObjectWithTag("CreatePersonButton").GetComponent <Button>();
        m_CreatePersonButton.onClick.AddListener(() => {
            if (!m_CreatePersonButtonClicked)
            {
                string name     = GetCurrentPersonName();
                string birthday = GetCurrentPersonBirthday();
                if (!name.Equals("null") && !birthday.Equals("null"))
                {
                    Debug.Log("Checking if person Id exists...");
                    StartCoroutine(CheckPersonIdExists(name, birthday));
                    m_CreatePersonButtonClicked = true;
                }
            }
        });

        m_AddFacesButton = GameObject.FindGameObjectWithTag("AddFacesButton").GetComponent <Button>();
        m_AddFacesButton.onClick.AddListener(() => {
            // TODO : add body
            Debug.Log("Add faces body");
            AddFacesToAzure();
        });
    }
Esempio n. 10
0
        public async Task <IGeographicalPosition> GetCurrentPosition(Guid taxyId, Guid travelId)
        {
            using (AzureManager azureManager = new AzureManager(SettingProvider.Instance.GetString(Constants.STORAGE),
                                                                SettingProvider.Instance.GetInt(Constants.MAXATTEMPTS), SettingProvider.Instance.GetInt(Constants.WAITSECONDS)))
            {
                string partitionKey = travelId.ToString().ToUpperInvariant();
                string rowKey       = taxyId.ToString().ToUpperInvariant();

                var currentPositionWat = azureManager.GetEntity <GeographicalPositionEntity>(SettingProvider.Instance.GetString(Constants.WATNAME), partitionKey, rowKey);

                if (currentPositionWat != null)
                {
                    var currentPosition = new GeographicalPosition(currentPositionWat);

                    return(await Task.FromResult(currentPosition));
                }
                else
                {
                    throw new LogicException("No se encontró la posición actual.");
                }
            }
        }
Esempio n. 11
0
 private void DeleteFile(Guid fieldId, string path)
 {
     AzureManager.DeleteFile(path);
     SharedInformationRepository.Delete(fieldId);
 }
Esempio n. 12
0
 /// <summary>
 /// Load user from database in list
 /// </summary>
 public async Task LoadUsersAsync()
 {
     EmployeeItem.Clear();
     manager      = AzureManager.DefaultManager;
     EmployeeItem = await manager.GetUserAsync();
 }
Esempio n. 13
0
 public UserCreateViewModel()
 {
     CreateCommand = new Command(OnCreateCommandExecuted);
     UpdateCommand = new Command(OnUpdateCommandExecuted);
     manager       = AzureManager.DefaultManager;
 }
Esempio n. 14
0
 public BaseController(IOptions <AzureSettings> azure)
 {
     Manager = new AzureManager(azure.Value.Cosmos.EndpointUrl, azure.Value.Cosmos.Key);
 }