本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: IoCLR
public IoCLR(IoState state, string name)
{
isActivatable = true;
this.state = state;
createSlots();
createProtos();
uniqueId = 0;
}
示例5: IoCFunction
public IoCFunction(IoState state, string name, IoMethodFunc func)
{
isActivatable = true;
this.state = state;
createSlots();
createProtos();
uniqueId = 0;
funcName = name;
this.func = func;
}
示例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;
}
示例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;
}
示例8: Main
static void Main()
{
IoState state = new IoState();
state.prompt(state);
}
示例9: createProto
public static new IoCLRAssembly createProto(IoState state)
{
IoCLRAssembly cf = new IoCLRAssembly();
return cf.proto(state) as IoCLRAssembly;
}
示例10: createObject
public static new IoCLRAssembly createObject(IoState state)
{
IoCLRAssembly cf = new IoCLRAssembly();
return cf.proto(state).clone(state) as IoCLRAssembly;
}
示例11: IoSeqObjectHashtable
public IoSeqObjectHashtable(IoState s)
{
state = s;
}
示例12: createObject
public static new IoBlock createObject(IoState state)
{
IoBlock number = new IoBlock();
return number.clone(state) as IoBlock;
}
示例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;
}
示例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;
}
示例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;
}