Пример #1
0
        public static ServiceDescription FromType(Type type)
        {
            var methods = new Dictionary <string, ServiceMethod>();

            foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Instance))
            {
                if (method.IsSpecialName)
                {
                    continue;
                }

                if (methods.ContainsKey(method.Name))
                {
                    throw new PipeRpcException("Pipe RPC does not support method overloading");
                }

                methods.Add(method.Name, ServiceMethod.FromMethodInfo(method));
            }

            return(new ServiceDescription(methods));
        }
Пример #2
0
 public Message(ServiceMethod method, object[] arguments, OperationContext operationContext)
 {
     Method           = method;
     Arguments        = arguments;
     OperationContext = operationContext;
 }