Пример #1
0
        internal ScriptedPropertyRule AddScriptedPropertyRule(string name, string type, string code, string sourceText)
        {
            if (this[name] != null)
            {
                throw new ClrPlusException("Attempt to add the same scripted rule again. [{0}/{1}]".format(name, type));
            }
            var property = new ScriptedPropertyRule(this, name, type, code, sourceText);

            _properties.Add(property);
            return(property);
        }
Пример #2
0
 internal ScriptedPropertyRule AddScriptedPropertyRule(string name, string type, string code, string sourceText)
 {
     if (this[name] != null) {
         throw new ClrPlusException("Attempt to add the same scripted rule again. [{0}/{1}]".format(name, type));
     }
     var property = new ScriptedPropertyRule(this, name, type, code, sourceText);
     _properties.Add(property);
     return property;
 }