Exemple #1
0
        public void Initialize(IFuncInterfaceDescription funcInterface)
        {
            ArgumentCollection argumentsTypes = new ArgumentCollection();

            foreach (IArgumentDescription argumentDescription in funcInterface.Arguments)
            {
                Argument argumentData = new Argument();
                argumentData.Initialize(argumentDescription);
                argumentsTypes.Add(argumentData);
            }

            ParameterDataCollection parameters = new ParameterDataCollection();

            foreach (IArgumentDescription argumentDescription in funcInterface.Arguments)
            {
                parameters.Add(new ParameterData());
            }

            Argument returnType = new Argument();

            returnType.Initialize(funcInterface.Return);

            Type          = funcInterface.FuncType;
            MethodName    = funcInterface.Name;
            ClassType     = funcInterface.ClassType;
            Description   = funcInterface;
            Instance      = string.Empty;
            Parameters    = parameters;
            ParameterType = argumentsTypes;
            ReturnType    = returnType;
        }
Exemple #2
0
        public void Initialize(IFuncInterfaceDescription funcInterface)
        {
            ArgumentCollection argumentsTypes = new ArgumentCollection();

            foreach (IArgumentDescription argumentDescription in funcInterface.Arguments)
            {
                Argument argumentData = new Argument();
                argumentData.Initialize(argumentDescription);
                argumentsTypes.Add(argumentData);
            }

            ParameterDataCollection parameters = new ParameterDataCollection();

            foreach (IArgumentDescription argumentDescription in funcInterface.Arguments)
            {
                ParameterData parameterData = new ParameterData();
                if (null != argumentDescription.DefaultValue)
                {
                    parameterData.Value         = argumentDescription.DefaultValue;
                    parameterData.ParameterType = Data.Sequence.ParameterType.Value;
                }
                parameters.Add(parameterData);
            }

            Type          = funcInterface.FuncType;
            MethodName    = funcInterface.Name;
            ClassType     = funcInterface.ClassType;
            Description   = funcInterface;
            Instance      = string.Empty;
            Parameters    = parameters;
            ParameterType = argumentsTypes;

            if (null != funcInterface.Return)
            {
                Argument returnType = new Argument();
                returnType.Initialize(funcInterface.Return);
                ReturnType = returnType;
            }
        }