当前位置: 首页>>代码示例>>C#>>正文


C# Tjs2.Variant类代码示例

本文整理汇总了C#中Kirikiri.Tjs2.Variant的典型用法代码示例。如果您正苦于以下问题:C# Variant类的具体用法?C# Variant怎么用?C# Variant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Variant类属于Kirikiri.Tjs2命名空间,在下文中一共展示了Variant类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddArrayElement

 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 public void AddArrayElement(Variant val)
 {
     string ss_add = "add";
     Variant[] args = new Variant[1];
     args[0] = val;
     mVal.AsObjectClosure().FuncCall(0, ss_add, null, args, null);
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:9,代码来源:ExprNode.cs

示例2: NativeClass

 public NativeClass(string name)
     : base()
 {
     mCallFinalize = false;
     mClassName = TJS.MapGlobalStringMap(name);
     mWorkParam = new Variant();
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:7,代码来源:NativeClass.cs

示例3: PostClear

 public virtual void PostClear()
 {
     mName = null;
     mValue = null;
     mValue = new Variant();
     mSymFlags &= ~SYMBOL_USING;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:7,代码来源:SymbolData.cs

示例4: CreateNew

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public override int CreateNew(int flag, string membername, Holder<Dispatch2> result
     , Variant[] param, Dispatch2 objthis)
 {
     // CreateNew
     Dispatch2 dsp = CreateBaseTJSObject();
     // instance initialization
     //int hr = funcCall( 0, null, null, null, dsp); // add member to dsp
     // 生成を高速化するためにメンバコピーを特别处理する形で实装
     dsp.AddClassInstanveInfo(mClassName);
     NativeInstance nativeptr = CreateNativeInstance();
     dsp.SetNativeInstance(mClassIDInternal, nativeptr);
     int hr = CopyAllMembers((CustomObject)dsp);
     if (hr < 0)
     {
         return hr;
     }
     hr = base.FuncCall(0, mClassName, null, param, dsp);
     // call constructor
     // call the constructor
     if (hr == Error.E_MEMBERNOTFOUND)
     {
         hr = Error.S_OK;
     }
     // missing constructor is OK ( is this ugly ? )
     if (hr >= 0)
     {
         result.Set(dsp);
     }
     return hr;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:32,代码来源:NativeClass.cs

示例5: RegExpNI

 public RegExpNI()
 {
     mFlags = RegExpFlagToValue((char)0, 0);
     //mStart = 0;
     //mIndex =0;
     //mLastIndex = 0;
     mArray = new Variant();
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:8,代码来源:RegExpNI.cs

示例6: FuncCall

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public override int FuncCall(int flag, string membername, Variant result, Variant
     [] param, Dispatch2 objthis)
 {
     if (membername != null)
     {
         return base.FuncCall(flag, membername, result, param, objthis);
     }
     return Process(result, param, objthis);
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:11,代码来源:NativeConvertedFunction.cs

示例7: CreateNew

 // create new object
 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public override int CreateNew(int flag, string memberName, Holder<Dispatch2> result
     , Variant[] param, Dispatch2 objThis)
 {
     if (IsNumber(memberName, Result))
     {
         return CreateNewByNum(flag, Result[0], result, param, objThis);
     }
     return base.CreateNew(flag, memberName, result, param, objThis);
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:12,代码来源:ArrayObject.cs

示例8: SelfClear

 public virtual void SelfClear()
 {
     mName = null;
     mHash = 0;
     mFlags = 0;
     mValue = new Variant();
     mNext = null;
     mSymFlags = SYMBOL_INIT;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:9,代码来源:SymbolData.cs

示例9: CreateNewByNum

 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 public virtual int CreateNewByNum(int flag, int num, Holder<Dispatch2> result, Variant
     [] param, Dispatch2 objThis)
 {
     if (mObject == null)
     {
         throw new TJSException(Error.NullAccess);
     }
     return mObject.CreateNewByNum(flag, num, result, param, mObjThis != null ? mObjThis
          : (objThis != null ? objThis : mObject));
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:12,代码来源:VariantClosure.cs

示例10: PropSet

 public override int PropSet(int flag, string membername, Variant param, Dispatch2
     objThis)
 {
     if (membername != null)
     {
         return Error.E_MEMBERNOTFOUND;
     }
     mValue.Set(param);
     return Error.S_OK;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:10,代码来源:SimpleGetSetProperty.cs

示例11: CreateNew

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public override int CreateNew(int flag, string membername, Holder<Dispatch2> result
     , Variant[] param, Dispatch2 objthis)
 {
     int hr = base.CreateNew(flag, membername, result, param, objthis);
     if (hr == Error.E_MEMBERNOTFOUND && (flag & Interface.MEMBERMUSTEXIST) == 0)
     {
         return Error.E_INVALIDTYPE;
     }
     // call operation for void
     return hr;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:13,代码来源:DictionaryObject.cs

示例12: SaveStructuredDataForObject

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public static void SaveStructuredDataForObject(Dispatch2 dsp, AList<Dispatch2> stack
     , TextWriteStreamInterface stream, string indentstr)
 {
     // check object recursion
     int count = stack.Count;
     for (int i = 0; i < count; i++)
     {
         Dispatch2 d = stack[i];
         if (d == dsp)
         {
             // object recursion detected
             stream.Write("null /* object recursion detected */");
             return;
         }
     }
     // determin dsp's object type
     DictionaryNI dicni;
     ArrayNI arrayni;
     if (dsp != null)
     {
         dicni = (DictionaryNI)dsp.GetNativeInstance(DictionaryClass.ClassID);
         if (dicni != null)
         {
             // dictionary
             stack.AddItem(dsp);
             dicni.SaveStructuredData(stack, stream, indentstr);
             stack.Remove(stack.Count - 1);
             return;
         }
         else
         {
             arrayni = (ArrayNI)dsp.GetNativeInstance(ArrayClass.ClassID);
             if (arrayni != null)
             {
                 // array
                 stack.AddItem(dsp);
                 arrayni.SaveStructuredData(stack, stream, indentstr);
                 stack.Remove(stack.Count - 1);
                 return;
             }
             else
             {
                 // other objects
                 stream.Write("null /* (object) \"");
                 // stored as a null
                 Variant val = new Variant(dsp, dsp);
                 stream.Write(LexBase.EscapeC(val.AsString()));
                 stream.Write("\" */");
                 return;
             }
         }
     }
     stream.Write("null");
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:56,代码来源:ArrayNI.cs

示例13: CreateNewByNum

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 /// <exception cref="Kirikiri.Tjs2.TJSException"></exception>
 public virtual int CreateNewByNum(int flag, int num, Holder<Dispatch2> result, Variant
     [] param, Dispatch2 objthis)
 {
     Dispatch2 OBJ1 = ((objthis != null) ? (objthis) : (mDispatch1));
     int hr = mDispatch1.CreateNewByNum(flag, num, result, param, OBJ1);
     if (hr == Error.E_MEMBERNOTFOUND && mDispatch1 != mDispatch2)
     {
         Dispatch2 OBJ2 = ((objthis != null) ? (objthis) : (mDispatch2));
         return mDispatch2.CreateNewByNum(flag, num, result, param, OBJ2);
     }
     return hr;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:14,代码来源:ObjectProxy.cs

示例14: CharacterCodeOf

 /// <exception cref="Kirikiri.Tjs2.VariantException"></exception>
 public static void CharacterCodeOf(Variant val)
 {
     string str = val.AsString();
     if (str != null)
     {
         int v = str[0];
         val.Set(v);
     }
     else
     {
         val.Set(0);
     }
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:14,代码来源:NativeConvertedClassBase.cs

示例15: PropGet

 public override int PropGet(int flag, string membername, Variant result, Dispatch2
     objthis)
 {
     if (membername != null)
     {
         return Error.E_MEMBERNOTFOUND;
     }
     if (result != null)
     {
         result.Set(mValue);
     }
     return Error.S_OK;
 }
开发者ID:fantasydr,项目名称:krkr-cs,代码行数:13,代码来源:SimpleGetSetProperty.cs


注:本文中的Kirikiri.Tjs2.Variant类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。