Пример #1
0
        private void WriteTextFileSettings(string settingsJson)
        {
            var settings = new SenseNet.ContentRepository.Settings(Node.LoadNode(Repository.SettingsFolderPath))
            {
                Name = "TextFiles.settings"
            };

            settings.Binary.SetStream(RepositoryTools.GetStreamFromString(settingsJson));
            settings.Save();
        }
Пример #2
0
        private void WriteNonTextSettings(string name, byte[] buffer)
        {
            var settings = new SenseNet.ContentRepository.Settings(Node.LoadNode(Repository.SettingsFolderPath))
            {
                Name = name
            };

            settings.Binary.ContentType = "application/octet-stream";
            settings.Binary.SetStream(new MemoryStream(buffer));
            settings.Save();
        }