Ejemplo n.º 1
0
        public virtual void ReloadFromSource(ILocalizationSource dataSource)
        {
            var newData = dataSource.BuildResources();

            if (newData != null)
            {
                newData.Compile();
                DataProvider.SetResources(newData);
                if (!String.IsNullOrEmpty(Options.CompiledDataFileName))
                {
                    using (var stream = new FileStream(Options.CompiledDataFileName, FileMode.Create, FileAccess.Write))
                    {
                        this.DataProvider.SaveResources(stream);
                    }
                }
            }
        }