• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# JScript.ScriptObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: NumberObject

 protected NumberObject(ScriptObject parent, Object value)
   : base(parent) {
   this.baseType = value.GetType();
   this.value = value;
   this.noExpando = false;
   this.implicitWrapper = false;
 }
开发者ID:ArildF,项目名称:masters,代码行数:7,代码来源:numberobject.cs


示例2: FunctionScope

 internal FunctionScope(ScriptObject parent, bool isMethod) : base(parent)
 {
     base.isKnownAtCompileTime = true;
     this.isMethod = isMethod;
     this.mustSaveStackLocals = false;
     if ((parent != null) && (parent is ActivationObject))
     {
         base.fast = ((ActivationObject) parent).fast;
     }
     else
     {
         base.fast = false;
     }
     this.returnVar = null;
     this.owner = null;
     this.isStatic = false;
     this.nested_functions = null;
     this.fields_for_nested_functions = null;
     if (parent is FunctionScope)
     {
         this.ProvidesOuterScopeLocals = new SimpleHashtable(0x10);
     }
     else
     {
         this.ProvidesOuterScopeLocals = null;
     }
     this.closuresMightEscape = false;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:FunctionScope.cs


示例3: BuiltinFunction

	// Constructor.
	public BuiltinFunction(ScriptObject prototype, String name,
						   MethodInfo method)
			: base(prototype, name)
			{
				this.method = method;
				Object[] attrs = method.GetCustomAttributes
						(typeof(JSFunctionAttribute), false);
				if(attrs == null || attrs.Length == 0)
				{
					this.flags = (JSFunctionAttributeEnum)0;
				}
				else
				{
					this.flags = ((JSFunctionAttribute)(attrs[0]))
							.GetAttributeValue();
				}
				requiredParameters = method.GetParameters().Length;
				lengthValue = requiredParameters;
				if((flags & JSFunctionAttributeEnum.HasThisObject) != 0)
				{
					--lengthValue;
				}
				if((flags & JSFunctionAttributeEnum.HasEngine) != 0)
				{
					--lengthValue;
				}
				if((flags & JSFunctionAttributeEnum.HasVarArgs) != 0)
				{
					--lengthValue;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:32,代码来源:BuiltinFunction.cs


示例4: AddNameTo

 private void AddNameTo(ScriptObject enclosingScope)
 {
     while (enclosingScope is WithObject)
     {
         enclosingScope = enclosingScope.GetParent();
     }
     if (((IActivationObject) enclosingScope).GetLocalField(this.name) == null)
     {
         FieldInfo info;
         if (enclosingScope is ActivationObject)
         {
             if (enclosingScope is FunctionScope)
             {
                 info = ((ActivationObject) enclosingScope).AddNewField(this.name, null, FieldAttributes.Public);
             }
             else
             {
                 info = ((ActivationObject) enclosingScope).AddNewField(this.name, null, FieldAttributes.Static | FieldAttributes.Public);
             }
         }
         else
         {
             info = ((StackFrame) enclosingScope).AddNewField(this.name, null, FieldAttributes.Public);
         }
         JSLocalField field = info as JSLocalField;
         if (field != null)
         {
             field.debugOn = base.context.document.debugOn;
             field.isDefined = true;
         }
         this.field = (JSVariableField) info;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:FunctionExpression.cs


示例5: FunctionObject

	// Constructor.
	internal FunctionObject(FunctionPrototype parent, JFunction defn,
							ScriptObject declaringScope)
			: base(parent, defn.name, Support.ExprListLength(defn.fparams))
			{
				this.defn = defn;
				this.declaringScope = declaringScope;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:8,代码来源:FunctionObject.cs


示例6: LenientErrorPrototype

 internal LenientErrorPrototype(LenientFunctionPrototype funcprot, ScriptObject parent, string name) : base(parent, name)
 {
     base.noExpando = false;
     this.name = name;
     Type type = typeof(ErrorPrototype);
     this.toString = new BuiltinFunction("toString", this, type.GetMethod("toString"), funcprot);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:LenientErrorPrototype.cs


示例7: PackageScope

 public PackageScope(ScriptObject parent)
   : base(parent) {
   this.fast = true;
   this.name = null;
   this.owner = null;
   this.isKnownAtCompileTime = true;
 }
开发者ID:ArildF,项目名称:masters,代码行数:7,代码来源:packagescope.cs


示例8: BlockScope

 public BlockScope(ScriptObject parent, String name, int scopeId)
   : base(parent){
   this.scopeId = scopeId;
   JSField field = (JSField)this.parent.GetField(name+":"+this.scopeId, BindingFlags.Public);
   this.name_table[name] = field;
   this.field_table.Add(field);
 }
开发者ID:ArildF,项目名称:masters,代码行数:7,代码来源:blockscope.cs


示例9: ArrayObject

 internal ArrayObject(ScriptObject prototype, Type subType)
   : base(prototype, subType) {
   this.len = 0;
   this.denseArray = null;
   this.denseArrayLength = 0;
   this.noExpando = false;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:7,代码来源:arrayobject.cs


示例10: NumberObject

 internal NumberObject(ScriptObject parent, object value, bool implicitWrapper) : base(parent, typeof(NumberObject))
 {
     this.baseType = Globals.TypeRefs.ToReferenceContext(value.GetType());
     this.value = value;
     base.noExpando = implicitWrapper;
     this.implicitWrapper = implicitWrapper;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:NumberObject.cs


示例11: DateObject

 internal DateObject(ScriptObject parent, double value)
   : base(parent) {
   this.value = value != value || value > Int64.MaxValue || value < Int64.MinValue
     ? Double.NaN
     : System.Math.Round(value);
   this.noExpando = false;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:7,代码来源:dateobject.cs


示例12: WithObject

 internal WithObject(ScriptObject parent, Object contained_object, bool isSuperType)
   : base(parent) {
   this.contained_object = contained_object;
   this.isKnownAtCompileTime = contained_object is Type ||
                              (contained_object is ClassScope && ((ClassScope)contained_object).noExpando) ||
                              (contained_object is JSObject && ((JSObject)contained_object).noExpando);
   this.isSuperType = isSuperType;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:8,代码来源:withobject.cs


示例13: LenientErrorPrototype

 internal LenientErrorPrototype(LenientFunctionPrototype funcprot, ScriptObject parent, String name)
   : base(parent, name) {
   this.noExpando = false;
   //this.constructor is given a value by the constructor class
   this.name = name;
   Type super = typeof(ErrorPrototype);
   this.toString = new BuiltinFunction("toString", this, super.GetMethod("toString"), funcprot);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:8,代码来源:lenienterrorprototype.cs


示例14: VsaNamedItemScope

 internal VsaNamedItemScope(Object hostObject, ScriptObject parent, VsaEngine engine)
   : base(parent){
   this.namedItem = hostObject;
   if ((this.reflectObj = hostObject as IReflect) == null)
     this.reflectObj = hostObject.GetType();
   this.recursive = false;
   this.engine = engine;
 }
开发者ID:ArildF,项目名称:masters,代码行数:8,代码来源:vsanameditemscope.cs


示例15: LenientFunctionPrototype

 internal LenientFunctionPrototype(ScriptObject parent) : base(parent)
 {
     base.noExpando = false;
     Type type = typeof(FunctionPrototype);
     this.apply = new BuiltinFunction("apply", this, type.GetMethod("apply"), this);
     this.call = new BuiltinFunction("call", this, type.GetMethod("call"), this);
     this.toString = new BuiltinFunction("toString", this, type.GetMethod("toString"), this);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:LenientFunctionPrototype.cs


示例16: ScriptObject

      public VsaEngine engine; //This is only really useful for ScriptFunctions, IActivation objects and prototype objects. It lives here for the sake of simplicity.
      //Prototype objects do not need the scope stack, so in fast mode, all prototype objects can share a common engine.

      internal ScriptObject(ScriptObject parent){
        this.parent = parent;
        this.wrappedMemberCache = null;
        if (this.parent != null)
          this.engine = parent.engine;
        else
          this.engine = null;
      }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:11,代码来源:scriptobject.cs


示例17: LenientFunctionPrototype

 internal LenientFunctionPrototype(ScriptObject parent)
   : base(parent) {
   this.noExpando = false;
   //this.constructor is given a value by ObjectConstructor
   Type super = typeof(FunctionPrototype);
   this.apply = new BuiltinFunction("apply", this, super.GetMethod("apply"), this);
   this.call = new BuiltinFunction("call", this, super.GetMethod("call"), this);
   this.toString = new BuiltinFunction("toString", this, super.GetMethod("toString"), this);
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:9,代码来源:lenientfunctionprototype.cs


示例18: ArgumentsObject

 internal ArgumentsObject(ScriptObject parent, Object[] arguments, FunctionObject function, Closure callee, ScriptObject scope, ArgumentsObject caller)
   : base(parent) {
   this.arguments = arguments;
   this.formal_names = function.formal_parameters;
   this.scope = scope;
   this.callee = callee;
   this.caller = caller;
   this.length = arguments.Length;
   this.noExpando = false;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:10,代码来源:argumentsobject.cs


示例19: ArrayWrapper

 internal ArrayWrapper(ScriptObject prototype, Array value, bool implicitWrapper)
   : base(prototype, typeof(ArrayWrapper)) {
   this.value = value;
   this.implicitWrapper = implicitWrapper;
   if (value != null){
     if (value.Rank != 1)
       throw new JScriptException(JSError.TypeMismatch);
     this.len = (uint) value.Length;
   }else
     this.len = 0;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:11,代码来源:arraywrapper.cs


示例20: ScopeOfClassMemberInitializer

 static internal ClassScope ScopeOfClassMemberInitializer(ScriptObject scope) {
   while (scope != null) {
     if (scope is FunctionScope)
       return null;
     ClassScope cscope = scope as ClassScope;
     if (cscope != null)
       return cscope;
     scope = scope.GetParent();
   }
   return null;
 }
开发者ID:gbarnett,项目名称:shared-source-cli-2.0,代码行数:11,代码来源:classscope.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Vsa.VsaEngine类代码示例发布时间:2022-05-26
下一篇:
C# JScript.EmitContext类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap