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


C# JScript.ScriptObject类代码示例

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


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


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