Пример #1
0
        public static LDDEnvironment Create(string programFilesPath, string applicationDataPath)
        {
            var lddEnv = new LDDEnvironment()
            {
                ProgramFilesPath    = programFilesPath,
                ApplicationDataPath = applicationDataPath,
            };

            lddEnv.Validate();
            return(lddEnv);
        }
Пример #2
0
        public static void Initialize()
        {
            lock (InitializationLock)
            {
                if (HasInitialized)
                {
                    return;
                }

                _InstalledEnvironment = FindInstalledEnvironment();
                HasInitialized        = true;
            }
        }
Пример #3
0
        public static LDDEnvironment FindInstalledEnvironment()
        {
            string installDir = FindInstallFolder();

            if (!string.IsNullOrEmpty(installDir))
            {
                var lddEnv = new LDDEnvironment()
                {
                    ProgramFilesPath    = installDir,
                    ApplicationDataPath = FindAppDataFolder(),
                    UserCreationPath    = FindUserFolder()
                };
                lddEnv.Validate();
                return(lddEnv);
            }

            return(null);
        }
Пример #4
0
 public static void SetOverride(LDDEnvironment environment)
 {
     CustomEnvironment = environment;
 }
Пример #5
0
 public bool IsEqual(LDDEnvironment other)
 {
     return(ProgramFilesPath.Equals(other.ProgramFilesPath, StringComparison.InvariantCultureIgnoreCase) &&
            ApplicationDataPath.Equals(other.ApplicationDataPath, StringComparison.InvariantCultureIgnoreCase));
 }