public Argument Extract(Cell cell, Parameter parameter, Command command)
        {
            if (!Regex.IsMatch(cell.Content, @"[@$=\(\)]"))
            {
                if (!Context.Arguments.Any(s => s.Name.Equals(cell.Content)
                    && s.Parameter.ParameterType.Equals(parameter.ParameterType)
                    && s.Command.Id == command.Id))
                {
                    var arg = new Argument
                    {
                        Name = cell.Content,
                        Parameter = parameter,
                        Command = command
                    };
                    return arg;
                }
                return (from a in Context.Arguments
                        where a.Name.Equals(cell.Content)
                              && a.Parameter.ParameterType.Equals(parameter.ParameterType)
                        select a).FirstOrDefault();
            }

            var pType = LatticeEnum.ParamterType.Call.ToString();
            return new Argument
            {
                Name = cell.Content,
                Parameter = (from p in Context.Parameters
                             where p.ParameterType.Equals(pType)
                             select p).FirstOrDefault(),
                Command = command,
                IsValid = false
            };
        }
Example #2
0
        private static void BuildSslpublishoverride(ref Call call)
        {
            var parameters = new List<Parameter>();

            var param1 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Source.ToString(),
                Position = 1
            };

            parameters.Add(param1);

            var param2 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Call.ToString(),
                Position = 2
            };

            parameters.Add(param2);

            var param3 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Fid.ToString(),
                Position = 3
            };

            parameters.Add(param3);

            var param4 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Call.ToString(),
                Position = 4
            };

            parameters.Add(param4);

            var param5 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Boolean.ToString(),
                Position = 5
            };

            parameters.Add(param5);

            call.Parameters = parameters;
        }
Example #3
0
        private static void BuildSslrecordrequest(ref Call call)
        {
            var parameters = new List<Parameter>();

            var param1 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Source.ToString(),
                Position = 1
            };

            parameters.Add(param1);

            var param2 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Instrument.ToString(),
                Position = 2
            };

            parameters.Add(param2);

            var param3 = new Parameter
            {
                ParameterType = LatticeEnum.ParamterType.Fid.ToString(),
                Position = 3
            };

            parameters.Add(param3);

            call.Parameters = parameters;
        }