예제 #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);
        }
예제 #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);
        }
예제 #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(); });
 }
예제 #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();
    }
예제 #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;
            }
        }
예제 #7
0
        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>();
        }
예제 #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();
     }
 }
예제 #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();
        });
    }
예제 #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.");
                }
            }
        }
예제 #11
0
 private void DeleteFile(Guid fieldId, string path)
 {
     AzureManager.DeleteFile(path);
     SharedInformationRepository.Delete(fieldId);
 }
예제 #12
0
 /// <summary>
 /// Load user from database in list
 /// </summary>
 public async Task LoadUsersAsync()
 {
     EmployeeItem.Clear();
     manager      = AzureManager.DefaultManager;
     EmployeeItem = await manager.GetUserAsync();
 }
예제 #13
0
 public UserCreateViewModel()
 {
     CreateCommand = new Command(OnCreateCommandExecuted);
     UpdateCommand = new Command(OnUpdateCommandExecuted);
     manager       = AzureManager.DefaultManager;
 }
예제 #14
0
 public BaseController(IOptions <AzureSettings> azure)
 {
     Manager = new AzureManager(azure.Value.Cosmos.EndpointUrl, azure.Value.Cosmos.Key);
 }