Exemplo n.º 1
0
        public ActionBinding(Int32 id, String name, Type actionType, MethodInfo method)
        {
            Id = id;
            Name = name;
            m_ActionType = actionType;

            if (!method.IsStatic)
                throw new GossipScriptException("Method must be static");

            if (method.ReturnType != typeof (void))
                throw new GossipScriptException("Method must return IActionNode");

            ParameterInfo[] parameters = method.GetParameters();
            m_NumParameters = parameters.Length;
            m_ParameterInfo = new TypeAdapter[NumParameters];
            for (int i = 0; i < ParameterInfo.Length; i++)
            {
                GossipType convertedType = TypeConverter.ConvertHostType(parameters[i].ParameterType);
                ParameterInfo[i] = new TypeAdapter(convertedType, parameters[i].ParameterType);
            }
        }
Exemplo n.º 2
0
 public ExtendedTypeAdapter(GossipType gossipType, Type hostType, Int32 data)
 {
     TypeAdapter = new TypeAdapter(gossipType, hostType);
     Data = data;
 }
Exemplo n.º 3
0
 public ExtendedTypeAdapter(GossipType gossipType, Type hostType)
 {
     TypeAdapter = new TypeAdapter(gossipType, hostType);
 }