using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Artemis.Core.ScriptingProviders
{
///
/// Allows you to implement and register your own scripting provider.
///
public abstract class ScriptingProvider : ScriptingProvider
where TGlobalScript : GlobalScript
where TProfileScript : ProfileScript
{
#region Overrides of PluginFeature
///
internal override void InternalDisable()
{
base.InternalDisable();
while (Scripts.Count > 0)
Scripts[0].Dispose();
}
#endregion
#region Overrides of ScriptingProvider
///
internal override Type ProfileScriptType => typeof(TProfileScript);
///
internal override Type GlobalScriptType => typeof(TGlobalScript);
#endregion
}
///
/// Allows you to implement and register your own scripting provider.
///
/// Note: You can't implement this, implement
/// instead.
///
///
public abstract class ScriptingProvider : PluginFeature
{
protected ScriptingProvider()
{
Scripts = new(InternalScripts);
}
///
/// Gets the name of the scripting language this provider provides
///
public abstract string LanguageName { get; }
///
/// Gets a list of all active scripts belonging to this scripting provider
///
public ReadOnlyCollection