Пример #1
0
        private bool TryLoadClusterManifest()
        {
            if (string.IsNullOrWhiteSpace(this.FilePath))
            {
                return(false);
            }

            FileInfo fi;

            try
            {
                fi = new FileInfo(this.FilePath);
            }
            catch (Exception e)
            {
                log.Error("Get file info failed: {0}", e.Message);
                return(false);
            }

            if (!fi.Exists)
            {
                log.Error("File not found: {0}", this.FilePath);
                return(false);
            }

            var manifest = Load.ClusterManifest(fi.FullName);

            if (manifest == null)
            {
                return(false);
            }

            try
            {
                SetImageStoreParams(this.data, manifest);
                return(true);
            }
            catch (Exception e)
            {
                log.Error(e, "unable to load cluster data");
                return(false);
            }
        }