예제 #1
0
    internal T Do <T>(params object[] f) where T : FBCompositor
    {
        this.children = new BNode[f.Length];
        for (int i = 0; i < f.Length; i++)
        {
            switch (Classificator.Classificate(f[i]))
            {
            case Classificator.NodeValue.BNode:
                children[i] = (BNode)f[i];
                break;

            case Classificator.NodeValue.FuncStatus:
                children[i] = new FBNode().SetAction <FBNode>((Func <FBStatus>)f[i]).Final(name + "_fnstatus");
                break;

            case Classificator.NodeValue.FuncBool:
                children[i] = new Encapsulator().Final <Encapsulator>(name + "_fn", (Func <bool>)f[i]);
                break;

            default:
                Debug.Log("undefined classification");
                break;
            }
        }
        return((T)this);
    }
 public void Setup()
 {
     m_Method = new Encapsulator()
     {
         Start = k_Start, End = k_End
     };
 }
예제 #3
0
        static void Main(string[] args)
        {
            Welcome();

            var dev = new SonyDevice("hub");

            dev.Alias.Add("xbox", "action");

            Kon.WriteLine("Device Model: " + dev.Info.Model);
            Kon.WriteLine("HDMI IRCode: " + dev.Command.Code["Hdmi1"]);
            Kon.WriteLine("Netflix: " + dev.Apps.List["Netflix"]);
            Kon.WriteLine("<test><green><tags>abcdefg\n<testagain>", WriteParameters.MinimalProcessing);
            Kon.WriteLine("Write this with and Indent prefix. Let's see if it works as I expect the program to work.", PrefixType.Indent);
            Kon.WriteLine("Test", WriteParameters.OffTheRecord);
            Kon.WriteLine("The quick brown fox jumps over the lazy dog.\nThe quick brown fox jumps over the lazy dog.");
            Kon.WriteLine("The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. ");
            Kon.WriteLine("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789<green>abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz<magenta>ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbb");
            Kon.WriteLine("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS<green>TUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstu vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", LongTextFormatting.Truncate);
            Kon.WriteLine("test...");
            Kon.WriteLine(@"https://www.bing.com/search?q=remove+string+from+index+c%23&form=EDGEAR&qs=PF&cvid=d00610ea914c4bc9b5c105a59bd118a6&cc=US&setlang=en-US&plvar=0");

            var colorsplitter = new Color.Splitter(SplitMode.Word, Palette.Rainbow);

            Kon.WriteLine("The quick brown fox jumps over the lazy dog in \"rainbow\" colors", colorsplitter);

            Encapsulator tag = new Encapsulator("<red>", "</>");

            Kon.WriteLine("This should be red.".Encapsulate(tag).Encapsulate("([{<"));

            //WriteLog();

            while (true)
            {
                //string read = Kon.ReadLine();

                //ParseCommand(read);
            }
        }