/* * Copyright © 2011, Petro Protsyk, Denys Vuika * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System.Collections.Generic; using System.Xml.Serialization; namespace Scripting.SSharp.Runtime.Configuration { /// /// Xml Serializable configuration data class /// [XmlRoot(ConfigSchema.Configuration)] public class ScriptConfiguration { /// /// References section in config xml /// [XmlArray(ConfigSchema.References)] [XmlArrayItem(ConfigSchema.Assembly)] public List References { get; set; } /// /// Types section in config xml /// [XmlArray(ConfigSchema.Types)] [XmlArrayItem(ConfigSchema.Type)] public List Types { get; set; } /// /// Scopes section in config xml /// [XmlArray(ConfigSchema.Scopes)] [XmlArrayItem(ConfigSchema.Scope)] public List Scopes { get; set; } /// /// Settings section in config xml /// [XmlArray(ConfigSchema.Settings)] [XmlArrayItem(ConfigSchema.Item)] public List SettingXml { get; set; } /// /// Operators section in config xml /// [XmlArray(ConfigSchema.Operators)] [XmlArrayItem(ConfigSchema.Operator)] public List Operators { get; set; } /// /// Initialization script /// [XmlElement(ConfigSchema.Initialization)] [XmlText] public string Initialization { get; set; } /// /// Creates empty configuration /// public ScriptConfiguration() { References = new List(); Scopes = new List(); Types = new List(); SettingXml = new List(); Operators = new List(); Initialization = string.Empty; } } }