1234567891011121314151617181920212223242526272829303132333435363738 |
- using InABox.Configuration;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- namespace InABox.Core
- {
- /// <summary>
- /// The settings for a given <see cref="IPoster{TEntity, TSettings}"/>.
- /// </summary>
- public abstract class PosterSettings : BaseObject, IGlobalConfigurationSettings
- {
- [NullEditor]
- public string PostableType { get; set; }
- [CheckBoxEditor]
- public bool ScriptEnabled { get; set; }
- [ScriptEditor]
- public string Script { get; set; }
- protected override void Init()
- {
- base.Init();
- Script = "";
- ScriptEnabled = false;
- }
- public abstract string DefaultScript(Type TPostable);
- public string DefaultScript<TPostable>() where TPostable : Entity, IPostable
- {
- return DefaultScript(typeof(TPostable));
- }
- }
- }
|