예제 #1
0
 public CsConstructor(bool inheritFromBase, bool isPublic, IEnumerable <Tuple <string, string> > args, IEnumerable <CsStmt> code)
 {
     InheritFromBase = inheritFromBase;
     IsPublic        = isPublic;
     Args.AddRange(args);
     Code.AddRange(code);
 }
예제 #2
0
 public Menu <TAction, TArgs> AddChoices(List <string> choices, List <TAction <TArgs> > actions, List <TArgs> args)
 {
     Choices.AddRange(choices);
     Actions.AddRange(actions);
     Args.AddRange(args);
     return(this);
 }
예제 #3
0
        public int TryAggregate(IReadOnlyList <TArg> args, IAggregateRule <TArg>[] rules)
        {
            bool lockTaken = false;

            try
            {
                Monitor.TryEnter(this, ref lockTaken);
                if (lockTaken)
                {
                    if (_isClosed)
                    {
                        return(-1);
                    }
                    if (rules.All(r => r.CanAggregate(Args, args)))
                    {
                        var startIndex = Args.Count;
                        Args.AddRange(args);
                        return(startIndex);
                    }
                }
                return(-1);
            }
            finally
            {
                if (lockTaken)
                {
                    Monitor.Exit(this);
                }
            }
        }
예제 #4
0
 public CsMethod(string name, string retType, bool isPublic, IEnumerable <Tuple <string, string> > args, IEnumerable <CsStmt> code)
 {
     Name     = name;
     RetType  = retType;
     IsPublic = isPublic;
     Args.AddRange(args);
     Code.AddRange(code);
 }
예제 #5
0
파일: Arguments.cs 프로젝트: Lopla/Language
 public Arguments(params IArgument[] value)
     : this()
 {
     if (value != null)
     {
         Args.AddRange(value);
     }
 }
예제 #6
0
 public GenerateSqlJobCommand(IAppObjectSqlGenerator generator, IFilePlace place, ISqlDialect dialect, AppObject[] objs, ConnectionPack connpack, SqlFormatProperties formatProps)
     : this()
 {
     Generator = generator;
     Place     = place;
     Dialect   = dialect;
     Args.AddRange(objs);
     ConnPack    = connpack;
     FormatProps = formatProps;
 }
예제 #7
0
        protected override void CompileOptions(ToolbarGump toolbar, GumpButton clicked, Point loc, MenuGumpOptions opts)
        {
            if (toolbar == null)
            {
                return;
            }

            base.CompileOptions(toolbar, clicked, loc, opts);

            PlayerMobile user = toolbar.User;

            if (!CanEdit && user.AccessLevel < Toolbars.Access)
            {
                return;
            }

            opts.Replace(
                "Set Value",
                new ListGumpEntry(
                    "Set Command",
                    b => SuperGump.Send(
                        new InputDialogGump(user, toolbar)
            {
                Title     = "Set Command",
                Html      = "Set the command for this Command entry.",
                InputText = base.Value,
                Callback  = (cb, text) =>
                {
                    Value = text;
                    toolbar.Refresh(true);
                }
            }),
                    toolbar.HighlightHue));

            opts.AppendEntry(
                new ListGumpEntry(
                    "Set Args",
                    b => SuperGump.Send(
                        new InputDialogGump(user, toolbar)
            {
                Title     = "Set Command Arguments",
                Html      = "Set the Arguments for this Command entry.\nSeparate your entries with a semi-colon- ;",
                InputText = String.Join(";", Args),
                Callback  = (cb, text) =>
                {
                    Args.Clear();
                    Args.AddRange(text.Split(';'));
                    toolbar.Refresh(true);
                }
            }),
                    toolbar.HighlightHue));
        }
예제 #8
0
 public void Add(params ZMethodNormalArg[] args)
 {
     Args.AddRange(args);
 }
예제 #9
0
 public APIRunnerBase(RestClient client, string resource, Method method, List <KeyValuePair <string, object> > bodyArgs) : this(client, resource, method)
 {
     Args.AddRange(bodyArgs);
 }
예제 #10
0
 public SubProcess(IEnumerable <string> args)
 {
     Args.AddRange(args);
 }
예제 #11
0
        /*
         * public AuthCommand (string value)
         * {
         *      //this.Value = value;
         *      this.Value = value.Trim ();
         * }
         */


        public AuthCommand(string value)
        {
            //this.Value = value;
            this.Value = value.Trim();
            Args.AddRange(Value.Split(' '));
        }
예제 #12
0
 /// <summary>
 /// Appends a collection of query arguments for the URI.
 /// </summary>
 public UrlBuilder WithArgs(IEnumerable <QueryArg> args)
 {
     Args.AddRange(args);
     return(this);
 }
예제 #13
0
 public Menu <TAction, TArgs> AddArgs(List <TArgs> args)
 {
     Args.AddRange(args);
     return(this);
 }