public ApplicationProfile(ProfileCache profileCache)
 {
     _profileCache    = profileCache;
     _startupPath     = Application.StartupPath.Trim();
     _userName        = System.Environment.UserName;
     _AssemblyVersion = GetAssemblyVersion();
     _profileCache.Store("DataPath", DataPath);
     _profileCache.Store("SystemProfileXml", SystemProfileXml);
     _profileCache.Store("UserName", UserName);
     _profileCache.Store("Version", Version);
 }
Exemple #2
0
        public int FetchInt(string groupName, string elementName)
        {
            int value = (int)ContainerElement.Descendants(groupName).First().Element(elementName);

            ProfileCache.Store(elementName, value.ToString());
            return(value);
        }
Exemple #3
0
        public bool FetchBool(string groupName, string elementName)
        {
            bool value = (bool)ContainerElement.Descendants(groupName).First().Element(elementName);

            ProfileCache.Store(elementName, value.ToString());
            return(value);
        }
Exemple #4
0
        public string Fetch(string groupName, string elementName)
        {
            string value = (string)ContainerElement.Descendants(groupName).First().Element(elementName);

            value = Substitute(value);
            ProfileCache.Store(elementName, value);
            return(value);
        }
Exemple #5
0
 public ApplicationProfile(ProfileCache profileCache)
 {
     _profileCache = profileCache;
     GetCustomAttributes();
     _masterDataPath  = GetMasterDataPath();
     _dataPath        = GetApplicationDataPath();
     _assemblyVersion = GetAssemblyVersion();
     _profileCache.Store("MasterDataPath", MasterDataPath);
     _profileCache.Store("DataPath", DataPath);
     _profileCache.Store("SystemProfileXml", SystemProfileXml);
     _profileCache.Store("UserName", UserName);
     _profileCache.Store("Version", Version);
     _profileCache.Store("AssemblyTitle", AssemblyTitle);
     _profileCache.Store("AssemblyProduct", AssemblyProduct);
 }