Ejemplo n.º 1
0
        public ISymbol AddNewVariable(string id, IDataType datatype)
        {
            if (_variables.ContainsKey(id))
            {
                throw new RulezException(RulezException.Types.IdExists, arguments: new object[] { id, this.ID });
            }
            Variable aVar = new Variable(id: id, datatype: datatype, scope: this);
            _variables.Add(aVar.ID, aVar);

            return aVar;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a Parameter to the Selection Rule
        /// </summary>
        /// <param name="handle"></param>
        /// <param name="typeId"></param>
        /// <returns></returns>
        public ISymbol AddNewParameter(string id, otDataType typeId)
        {
            if (_parameters.ContainsKey(id))
            {
                throw new RulezException(RulezException.Types.IdExists, arguments: new object[] { id, this.ID });
            }
            Variable aVar = new Variable(id:id, typeID:typeId, scope:this);
             _parameters.Add(aVar.ID,aVar);

             return aVar;
        }