Пример #1
0
    private void Awake()
    {
        // Allows this class instance to behave like a singleton
        instance = this;

        GameObject dt = GameObject.Find("DebugText");

        if (dt != null)
        {
            _myText            = dt.GetComponent <Text>();
            IsDebugTextEnabled = (_myText != null);
        }
        else
        {
            IsDebugTextEnabled = false;
        }

        // Attempt to load secrets
        SecretHelper.LoadSecrets(this);

        string connString;

        // Check to see if this is necessary for standalone desktop builds
#if !WINDOWS_UWP
        connString = ConnectionString.Replace("https", "http").Replace("HTTPS", "http").Replace("Https", "http");
#else
        connString = ConnectionString;
#endif
        // Initialize the Cloud Storage Account based on the connection string
        // TO DO: Switch to SAS tokens to eliminate the need to embed connection strings in the app
        StorageAccount = CloudStorageAccount.Parse(connString);
    }
Пример #2
0
 public static async Task TempRun()
 {
     // TODO: Use something sophisticated
     var fileSystem = new WindowsFileSystemClient(AppSettings.Instance.RootDirectory);
     var cloudDrive = new AzureBlobStorageClient(AppSettings.Instance.AzureBlobConnectionString);
     var engine     = new Engine(fileSystem, cloudDrive);
     await engine.Run();
 }
Пример #3
0
        public static IStorageClient GetStorageClient()
        {
            IStorageClient client = new AzureBlobStorageClient();

            if (CurrentSite.IsAvailable)
            {
                client.AddClientOption<Boolean>(CloudStorageOptions.UseCdn, CurrentSite.Configuration.IsCdnEnabled);
                client.AddClientOption<Boolean>(CloudStorageOptions.UseHttps, CurrentSite.Configuration.IsCdnEnabled);
            }

            return client;
        }
 public ValuesController(AzureBlobStorageClient storageClient)
 {
     _storageClient = storageClient;
 }
 public void Init()
 {
     storage = new AzureBlobStorageClient(AppSettings.Instance.AzureBlobConnectionString);
 }