예제 #1
0
        private static MethodDescription[] GetMethodDescriptions(
            string remotedInterfaceKindName,
            Type remotedInterfaceType,
            MethodReturnCheck methodReturnCheck)
        {
            EnsureValidMethods(remotedInterfaceKindName, remotedInterfaceType, methodReturnCheck);
            var methods = remotedInterfaceType.GetMethods().Select(
                methodInfo => MethodDescription.Create(remotedInterfaceKindName, methodInfo)).ToList();

            return(methods.ToArray());
        }
        private static MethodDescription[] GetMethodDescriptions(
            string remotedInterfaceKindName,
            Type remotedInterfaceType,
            MethodReturnCheck methodReturnCheck)
        {
            EnsureValidMethods(remotedInterfaceKindName, remotedInterfaceType, methodReturnCheck);
            var methods            = remotedInterfaceType.GetMethods();
            var methodDescriptions = new MethodDescription[methods.Length];

            for (int i = 0; i < methods.Length; i++)
            {
                methodDescriptions[i] = MethodDescription.Create(remotedInterfaceKindName, methods[i]);
            }
            return(methodDescriptions);
        }