예제 #1
0
        internal SchemaCombinator FindCombinator(int id)
        {
            SchemaCombinator combinator = methods.Find(val => val.id == id);

            if (combinator == null)
            {
                combinator = constructors.Find(val => val.id == id);
                if (combinator == null)
                {
                    throw new DecodeException("Combinator not found: " + id.ToString(CultureInfo.InvariantCulture));
                }
            }

            return(combinator);
        }
예제 #2
0
        internal SchemaCombinator FindCombinator(string name)
        {
            SchemaCombinator combinator = methods.Find(val => val.method == name);

            if (combinator == null)
            {
                combinator = constructors.Find(val => val.predicate == name);
                if (combinator == null)
                {
                    throw new ArgumentOutOfRangeException(name);
                }
            }

            return(combinator);
        }
예제 #3
0
 internal string[] FindTypes(SchemaCombinator combinator)
 {
     return [email protected](val => val.type).ToArray();
 }
예제 #4
0
 internal Argument[] FindArguments(SchemaCombinator combinator)
 {
     return [email protected](val => new Argument(val.name, val.type)).ToArray();
 }
예제 #5
0
 internal string[] FindTypes(SchemaCombinator combinator)
 {
     return([email protected](val => val.type).ToArray());
 }
예제 #6
0
 internal Argument[] FindArguments(SchemaCombinator combinator)
 {
     return([email protected](val => new Argument(val.name, val.type)).ToArray());
 }