Esempio n. 1
0
 public void Build(ICommandBuilder builder)
 {
     builder.AddCommand("<using,CSharpAddon.List.Usings>", (IVaraibles varaibles) =>
     {
         string use            = varaibles.Get("using");
         var namespaces        = Information?.UsedNamespaces.Where(x => x.EndsWith(use));
         var name              = namespaces.FirstOrDefault();
         LineFinder lineFinder = new LineFinder();
         lineFinder.AddLineBelow(1, "using " + name + ";");
     });
 }
Esempio n. 2
0
 public void Build(ICommandBuilder builder)
 {
     builder.AddCommand("<type,[function|class]><attribute,CSharpAddon.List.Attributes>", (IVaraibles x) =>
     {
         string attribute      = x.Get("attribute");
         LineFinder lineFinder = new LineFinder();
         if (lineFinder.FindLine(MakeController.SelectTypeFinder(x)))
         {
             //SendKeys.SendWait("{END}");
             //SendKeys.SendWait(", ");
             SendKeys.SendWait("^({Enter})[" + attribute + "]{LEFT}");
         }
     });
 }
Esempio n. 3
0
        public void ChangeAccessModifier(Func <string, List <string> > action, string value)
        {
            LineFinder lineFine = new LineFinder();

            if (lineFine.FindLine(action))
            {
                if (!lineFine.FindWord(regex.AccessModifier))
                {
                    SendKeys.SendWait("{left}");
                    SendKeys.SendWait("{HOME}");
                }

                SendKeys.SendWait(value);
            }
        }
Esempio n. 4
0
 public void Build(ICommandBuilder builder)
 {
     builder.AddCommand("<type,CSharpAddon.List.Types>", (IVaraibles x) =>
     {
         string type           = x.Get("type");
         LineFinder lineFinder = new LineFinder();
         if (lineFinder.FindLine(regex.FindDefinitions))
         {
             SendKeys.SendWait("{END}");
             var line = lineFinder.GetLine();
             SendKeys.SendWait(line.Contains(":")?",":": ");
             SendKeys.SendWait(type);
         }
     });
 }