Пример #1
0
        public LocalXmlUserSettingsProvider(ILiteObjectService liteObjectService, ILoggerFacade logger)
            : base(liteObjectService, logger)
        {
            var assembly = Assembly.GetEntryAssembly();

            FolderName = Path.Combine(Path.GetDirectoryName(assembly.Location) ?? "", "Settings");
        }
Пример #2
0
        public PersonalXmlUserSettingsProvider(ILiteObjectService liteObjectService, ILoggerFacade logger)
            : base(liteObjectService, logger)
        {
            var assembly        = Assembly.GetEntryAssembly();
            var assemblyCompany = Attribute.GetCustomAttribute(assembly, typeof(AssemblyCompanyAttribute)) as AssemblyCompanyAttribute;
            var company         = assemblyCompany?.Company ?? "IReznykov";
            var assemblyProduct = Attribute.GetCustomAttribute(assembly, typeof(AssemblyProductAttribute)) as AssemblyProductAttribute;
            var product         = assemblyProduct?.Product ?? "Ikc5.Prism.Settings";

            FolderName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), company, product, "Settings");
        }
Пример #3
0
        protected BaseXmlUserSettingsProvider(ILiteObjectService liteObjectService, ILoggerFacade logger = null)
        {
            liteObjectService.ThrowIfNull(nameof(liteObjectService));
            LiteObjectService = liteObjectService;

            //logger.ThrowIfNull(nameof(logger));
            Logger = logger;

            var assembly = Assembly.GetEntryAssembly();

            AppName  = Path.GetFileNameWithoutExtension(assembly.CodeBase);
            TypeName = $"{typeof(T).Namespace}.{typeof(T).Name}";

            // could be broken by 8.3 file name vs. long name issue
            //FileName = $"{AppName}.{TypeName}.xml";
            FileName = $"{TypeName}.xml";
        }
Пример #4
0
 public IsolatedXmlUserSettingsProvider(ILiteObjectService liteObjectService, ILoggerFacade logger)
     : base(liteObjectService, logger)
 {
 }