public static void Initialize()
        {
            if (!CloudBackedStore.DirectoryExists(CertDir))
            {
#if DEBUG
                var url = "http://127.0.0.1:10000/devstoreaccount1/components/";
#else
                var url = string.Format("http://{0}.blob.core.windows.net/components/", RoleEnvironment.GetConfigurationSettingValue("StorageName"));
#endif

                CloudBackedStore.Grab(CertDir, "\\makecert.exe", "components", url + "makecert.exe");
            }
        }
Beispiel #2
0
        public static void Initialize()
        {
            //First get a reference to the local file structure.
            localStorage = RoleEnvironment.GetLocalResource("scratchpad");

            //Check to see if we have already grabbed the component files.
            if (!CloudBackedStore.DirectoryExists(ComponetDir))
            {
#if DEBUG
                var url = "http://127.0.0.1:10000/devstoreaccount1/components/";
#else
                var url = string.Format("http://{0}.blob.core.windows.net/components/", RoleEnvironment.GetConfigurationSettingValue("StorageName"));
#endif
                CloudBackedStore.Grab(ComponetDir, "\\test.jpg", "components", url + "test.jpg");

                foreach (var app in OdiAppRepo.Apps)
                {
                    if (!string.IsNullOrEmpty(app.PackageName))
                    {
                        CloudBackedStore.Grab(ComponetDir, "\\" + app.PackageName, "components", url + app.PackageName);
                    }

                    if (!string.IsNullOrEmpty(app.ConfName))
                    {
                        CloudBackedStore.Grab(ComponetDir, "\\" + app.ConfName, "components", url + app.ConfName);
                    }

                    var req = app.RequiredFiles;

                    if (req != null)
                    {
                        foreach (var file in req)
                        {
                            CloudBackedStore.Grab(ComponetDir, "\\" + file, "components", url + file);
                        }
                    }
                }
            }
        }