當前位置: 首頁>>代碼示例>>C#>>正文


C# io.IoState類代碼示例

本文整理匯總了C#中io.IoState的典型用法代碼示例。如果您正苦於以下問題:C# IoState類的具體用法?C# IoState怎麽用?C# IoState使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


IoState類屬於io命名空間,在下文中一共展示了IoState類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: createObject

 public static IoString createObject(IoState state, string symbol)
 {
     IoString str = new IoString();
     str = str.clone(state) as IoString;
     str.value = symbol;
     return str;
 }
開發者ID:ChadSki,項目名稱:research-io,代碼行數:7,代碼來源:IoSeq.cs

示例2: newWithDouble

        public static IoNumber newWithDouble(IoState state, double n)
        {
            IoNumber fab = new IoNumber();
            IoNumber num = state.protoWithInitFunc(fab.name) as IoNumber;
            num = num.clone(state) as IoNumber;
            num.isInteger = false;
            num.doubleValue = n;

            if (Double.Equals(n, 0) ||
                (!Double.IsInfinity(n) && !Double.IsNaN(n) &&
                !n.ToString(CultureInfo.InvariantCulture).Contains(".") &&
                !n.ToString(CultureInfo.InvariantCulture).Contains("E") &&
                !n.ToString(CultureInfo.InvariantCulture).Contains("e")
                )
            )
            {
                try
                {
                    num.longValue = Convert.ToInt32(n);
                    num.isInteger = true;
                }
                catch (OverflowException oe)
                {

                }
            }
            return num;
        }
開發者ID:devaspot,項目名稱:io,代碼行數:28,代碼來源:IoNumber.cs

示例3: createObject

 public static IoSeq createObject(IoState state, string symbol)
 {
     IoSeq seq = new IoSeq();
     seq = seq.clone(state) as IoSeq;
     seq.value = symbol;
     return seq;
 }
開發者ID:devaspot,項目名稱:io,代碼行數:7,代碼來源:IoSeq.cs

示例4: IoCLR

 public IoCLR(IoState state, string name)
 {
     isActivatable = true;
     this.state = state;
     createSlots();
     createProtos();
     uniqueId = 0;
 }
開發者ID:ChadSki,項目名稱:research-io,代碼行數:8,代碼來源:IoCLR.cs

示例5: IoCFunction

 public IoCFunction(IoState state, string name, IoMethodFunc func)
 {
     isActivatable = true;
     this.state = state;
     createSlots();
     createProtos();
     uniqueId = 0;
     funcName = name;
     this.func = func;
 }
開發者ID:devaspot,項目名稱:io,代碼行數:10,代碼來源:IoCFunction.cs

示例6: clone

 public override IoObject clone(IoState state)
 {
     IoCLRObject proto = state.protoWithInitFunc(name) as IoCLRObject;
     IoCLRObject result = new IoCLRObject();
     result.isActivatable = true;
     uniqueIdCounter++;
     result.uniqueId = uniqueIdCounter;
     result.state = state;
     result.createProtos();
     result.createSlots();
     result.protos.Add(proto);
     return result;
 }
開發者ID:devaspot,項目名稱:io,代碼行數:13,代碼來源:IoCLRObject.cs

示例7: proto

        public override IoObject proto(IoState state)
        {
            IoCLRAssembly pro = new IoCLRAssembly();
            pro.state = state;
            pro.uniqueId = 0;
            pro.createSlots();
            pro.createProtos();
            pro.isActivatable = true;
            state.registerProtoWithFunc(pro.name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto)));
            //pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("namespaces", new IoMethodFunc(IoCLRAssembly.slotNamespaces)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return pro;
        }
開發者ID:stangelandcl,項目名稱:io-clr,代碼行數:18,代碼來源:IoCLRAssembly.cs

示例8: Main

 static void Main()
 {
     IoState state = new IoState();
     state.prompt(state);
 }
開發者ID:stangelandcl,項目名稱:io-clr,代碼行數:5,代碼來源:Program.cs

示例9: createProto

 public static new IoCLRAssembly createProto(IoState state)
 {
     IoCLRAssembly cf = new IoCLRAssembly();
     return cf.proto(state) as IoCLRAssembly;
 }
開發者ID:stangelandcl,項目名稱:io-clr,代碼行數:5,代碼來源:IoCLRAssembly.cs

示例10: createObject

 public static new IoCLRAssembly createObject(IoState state)
 {
     IoCLRAssembly cf = new IoCLRAssembly();
     return cf.proto(state).clone(state) as IoCLRAssembly;
 }
開發者ID:stangelandcl,項目名稱:io-clr,代碼行數:5,代碼來源:IoCLRAssembly.cs

示例11: IoSeqObjectHashtable

 public IoSeqObjectHashtable(IoState s)
 {
     state = s;
 }
開發者ID:devaspot,項目名稱:io,代碼行數:4,代碼來源:IoObject.cs

示例12: createObject

 public static new IoBlock createObject(IoState state)
 {
     IoBlock number = new IoBlock();
     return number.clone(state) as IoBlock;
 }
開發者ID:stangelandcl,項目名稱:io-clr,代碼行數:5,代碼來源:IoBlock.cs

示例13: proto

        public override IoObject proto(IoState state)
        {
            IoMap pro = new IoMap();
            pro.state = state;
            pro.createSlots();
            pro.createProtos();
            pro.map = new Hashtable();
            state.registerProtoWithFunc(pro.name, new IoStateProto(pro.name, pro, new IoStateProtoFunc(pro.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("at", new IoMethodFunc(IoMap.slotAt)),
                new IoCFunction("atPut", new IoMethodFunc(IoMap.slotAtPut)),
                new IoCFunction("atIfAbsentPut", new IoMethodFunc(IoMap.slotAtIfAbsentPut)),
                new IoCFunction("empty", new IoMethodFunc(IoMap.slotEmpty)),
                new IoCFunction("size", new IoMethodFunc(IoMap.slotSize)),
                new IoCFunction("removeAt", new IoMethodFunc(IoMap.slotRemoveAt)),
                new IoCFunction("hasKey", new IoMethodFunc(IoMap.slotHasKey)),
                new IoCFunction("hasValue", new IoMethodFunc(IoMap.slotHasValue)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return pro;
        }
開發者ID:ChadSki,項目名稱:research-io,代碼行數:24,代碼來源:IoMap.cs

示例14: proto

        public override IoObject proto(IoState state)
        {
            IoString pro = new IoString();
            pro.state = state;
            //    pro.tag.cloneFunc = new IoTagCloneFunc(this.clone);
            //    pro.tag.compareFunc = new IoTagCompareFunc(this.compare);
            pro.createSlots();
            pro.createProtos();
            state.registerProtoWithFunc(name, new IoStateProto(name, pro, new IoStateProtoFunc(this.proto)));
            pro.protos.Add(state.protoWithInitFunc("Object"));

            IoCFunction[] methodTable = new IoCFunction[] {
                new IoCFunction("appendStr", new IoMethodFunc(IoString.slotAppendStr)),
                new IoCFunction("at", new IoMethodFunc(IoString.slotAt)),
                new IoCFunction("reverse", new IoMethodFunc(IoString.slotReverse)),
            };

            pro.addTaglessMethodTable(state, methodTable);
            return pro;
        }
開發者ID:ChadSki,項目名稱:research-io,代碼行數:20,代碼來源:IoSeq.cs

示例15: clone

 public override IoObject clone(IoState state)
 {
     IoString proto = state.protoWithInitFunc(name) as IoString;
     IoString result = new IoString();
     result.state = state;
     result.value = proto.value;
     result.createProtos();
     result.createSlots();
     result.protos.Add(proto);
     return result;
 }
開發者ID:ChadSki,項目名稱:research-io,代碼行數:11,代碼來源:IoSeq.cs


注:本文中的io.IoState類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。