本文整理汇总了C#中IGlobal类的典型用法代码示例。如果您正苦于以下问题:C# IGlobal类的具体用法?C# IGlobal怎么用?C# IGlobal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IGlobal类属于命名空间,在下文中一共展示了IGlobal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MaxPlugin
public MaxPlugin(IGlobal globalinterface)
{
this.gi = globalinterface;
RebuildMaterials = false;
RemoveTransparentFaces = true;
Templates = new MaterialLibraryView(Defaults.MaterialLibraryFilename);
}
开发者ID:sebjf,项目名称:dazmaxbridge,代码行数:7,代码来源:MaxBridgePlugin.cs
示例2: InitPrototype
public override void InitPrototype(IGlobal global) {
var Prototype = PrototypeProperty;
Prototype.DefineOwnProperty(new PropertyDescriptor<JsObject>(global, Prototype, "length", GetLengthImpl, SetLengthImpl) { Enumerable = false });
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsArray>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsArray>(ToLocaleStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("concat", global.FunctionClass.New<JsObject>(Concat), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("join", global.FunctionClass.New<JsObject>(Join, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("pop", global.FunctionClass.New<JsObject>(Pop), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("push", global.FunctionClass.New<JsObject>(Push, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("reverse", global.FunctionClass.New<JsObject>(Reverse), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("shift", global.FunctionClass.New<JsObject>(Shift), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("slice", global.FunctionClass.New<JsObject>(Slice, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("sort", global.FunctionClass.New<JsObject>(Sort), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("splice", global.FunctionClass.New<JsObject>(Splice, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("unshift", global.FunctionClass.New<JsObject>(UnShift, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("indexOf", global.FunctionClass.New<JsObject>(IndexOfImpl, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("lastIndexOf", global.FunctionClass.New<JsObject>(LastIndexOfImpl, 1), PropertyAttributes.DontEnum);
if (global.HasOption(Options.Ecmascript5)) {
Prototype.DefineOwnProperty("forEach", global.FunctionClass.New<JsObject>(ForEach, 2), PropertyAttributes.DontEnum);
}
}
开发者ID:robashton,项目名称:ravendb,代码行数:25,代码来源:JsArrayConstructor.cs
示例3: ToPrimitive
public override JsInstance ToPrimitive(IGlobal global) {
if (Value != null && ! (Value is IComparable) )
return global.StringClass.New(Value.ToString());
switch (Convert.GetTypeCode(Value)) {
case TypeCode.Boolean:
return global.BooleanClass.New((bool)Value);
case TypeCode.Char:
case TypeCode.String:
case TypeCode.Object:
return global.StringClass.New(Value.ToString());
case TypeCode.DateTime:
return global.StringClass.New(JsDate.DateToString((DateTime)Value));
case TypeCode.Byte:
case TypeCode.Int16:
case TypeCode.Int32:
case TypeCode.Int64:
case TypeCode.SByte:
case TypeCode.UInt16:
case TypeCode.UInt32:
case TypeCode.UInt64:
case TypeCode.Decimal:
case TypeCode.Double:
case TypeCode.Single:
return global.NumberClass.New(Convert.ToDouble(Value));
default:
return JsUndefined.Instance;
}
}
开发者ID:925coder,项目名称:ravendb,代码行数:30,代码来源:JsObject.cs
示例4: InitPrototype
public override void InitPrototype(IGlobal global) {
var Prototype = PrototypeProperty;
Prototype.DefineOwnProperty("split", global.FunctionClass.New<JsDictionaryObject>(SplitImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("replace", global.FunctionClass.New<JsDictionaryObject>(ReplaceImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("match", global.FunctionClass.New<JsDictionaryObject>(MatchFunc), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("localeCompare", global.FunctionClass.New<JsDictionaryObject>(LocaleCompareImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("substring", global.FunctionClass.New<JsDictionaryObject>(SubstringImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("substr", global.FunctionClass.New<JsDictionaryObject>(SubstrImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("search", global.FunctionClass.New<JsDictionaryObject>(SearchImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("valueOf", global.FunctionClass.New<JsString>(ValueOfImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("concat", global.FunctionClass.New<JsDictionaryObject>(ConcatImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("charAt", global.FunctionClass.New<JsDictionaryObject>(CharAtImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("charCodeAt", global.FunctionClass.New<JsDictionaryObject>(CharCodeAtImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("lastIndexOf", global.FunctionClass.New<JsDictionaryObject>(LastIndexOfImpl, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("indexOf", global.FunctionClass.New<JsDictionaryObject>(IndexOfImpl, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLowerCase", global.FunctionClass.New<JsDictionaryObject>(ToLowerCaseImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleLowerCase", global.FunctionClass.New<JsDictionaryObject>(ToLocaleLowerCaseImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toUpperCase", global.FunctionClass.New<JsDictionaryObject>(ToUpperCaseImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleUpperCase", global.FunctionClass.New<JsDictionaryObject>(ToLocaleUpperCaseImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("slice", global.FunctionClass.New<JsDictionaryObject>(SliceImpl, 2), PropertyAttributes.DontEnum);
#region Properties
Prototype.DefineOwnProperty(new PropertyDescriptor<JsDictionaryObject>(global, Prototype, "length", LengthImpl));
#endregion
}
开发者ID:925coder,项目名称:ravendb,代码行数:28,代码来源:JsStringConstructor.cs
示例5: NativeMethodOverload
public NativeMethodOverload(ICollection<MethodInfo> methods , JsObject prototype, IGlobal global)
: base(prototype)
{
if (global == null)
throw new ArgumentNullException("global");
m_marshaller = global.Marshaller;
foreach (MethodInfo info in methods)
{
Name = info.Name;
break;
}
foreach (var method in methods)
{
if (method.IsGenericMethodDefinition)
m_generics.AddLast(method);
else if (! method.ContainsGenericParameters)
m_methods.AddLast(method);
}
m_overloads = new NativeOverloadImpl<MethodInfo, JsMethodImpl>(
m_marshaller,
new NativeOverloadImpl<MethodInfo, JsMethodImpl>.GetMembersDelegate(this.GetMembers),
new NativeOverloadImpl<MethodInfo, JsMethodImpl>.WrapMmemberDelegate(this.WrapMember)
);
}
开发者ID:cosh,项目名称:Jint,代码行数:27,代码来源:NativeMethodOverload.cs
示例6: JsMathConstructor
public JsMathConstructor(IGlobal global)
: base(global.ObjectClass.PrototypeProperty)
{
Global = global;
var random = new Random();
#region Functions
this["abs"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Abs(d))));
this["acos"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Acos(d))));
this["asin"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Asin(d))));
this["atan"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Atan(d))));
this["atan2"] = global.FunctionClass.New(new Delegates.Func<double, double, JsNumber>((y, x) => Global.NumberClass.New(Math.Atan2(y, x))));
this["ceil"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Ceiling(d))));
this["cos"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Cos(d))));
this["exp"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Exp(d))));
this["floor"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Floor(d))));
this["log"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Log(d))));
this["max"] = global.FunctionClass.New(new Delegates.Func<double, double, JsNumber>((a, b) => Global.NumberClass.New(Math.Max(a, b))));
this["min"] = global.FunctionClass.New(new Delegates.Func<double, double, JsNumber>((a, b) => Global.NumberClass.New(Math.Min(a, b))));
this["pow"] = global.FunctionClass.New(new Delegates.Func<double, double, JsNumber>((a, b) => Global.NumberClass.New(Math.Pow(a, b))));
this["random"] = global.FunctionClass.New(new Delegates.Func<double>(random.NextDouble));
this["round"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Round(d))));
this["sin"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Sin(d))));
this["sqrt"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Sqrt(d))));
this["tan"] = global.FunctionClass.New(new Delegates.Func<double, JsNumber>(d => Global.NumberClass.New(Math.Tan(d))));
#endregion
this["E"] = global.NumberClass.New(Math.E);
this["LN2"] = global.NumberClass.New(Math.Log(2));
this["LN10"] = global.NumberClass.New(Math.Log(10));
this["LOG2E"] = global.NumberClass.New(Math.Log(Math.E, 2));
this["PI"] = global.NumberClass.New(Math.PI);
this["SQRT1_2"] = global.NumberClass.New(Math.Sqrt(0.5));
this["SQRT2"] = global.NumberClass.New(Math.Sqrt(2));
}
开发者ID:cosh,项目名称:Jint,代码行数:35,代码来源:JsMathConstructor.cs
示例7: JsErrorConstructor
public JsErrorConstructor(IGlobal global, string errorType)
: base(global) {
this.errorType = errorType;
Name = errorType;
DefineOwnProperty(PROTOTYPE, global.ObjectClass.New(this), PropertyAttributes.DontEnum | PropertyAttributes.DontDelete | PropertyAttributes.ReadOnly);
}
开发者ID:925coder,项目名称:ravendb,代码行数:7,代码来源:JsErrorConstructor.cs
示例8: InitPrototype
public override void InitPrototype(IGlobal global)
{
Prototype = new JsObject() { Prototype = global.FunctionClass.Prototype };
Prototype.DefineOwnProperty("constructor", this, PropertyAttributes.DontEnum);
#region Methods
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsArray>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsArray>(ToLocaleStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("concat", global.FunctionClass.New<JsObject>(Concat), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("join", global.FunctionClass.New<JsObject>(Join, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("pop", global.FunctionClass.New<JsObject>(Pop), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("push", global.FunctionClass.New<JsObject>(Push, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("reverse", global.FunctionClass.New<JsObject>(Reverse), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("shift", global.FunctionClass.New<JsObject>(Shift), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("slice", global.FunctionClass.New<JsObject>(Slice, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("sort", global.FunctionClass.New<JsObject>(Sort), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("splice", global.FunctionClass.New<JsObject>(Splice, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("unshift", global.FunctionClass.New<JsObject>(UnShift, 1), PropertyAttributes.DontEnum);
#region ES5
Prototype.DefineOwnProperty("indexOf", global.FunctionClass.New<JsObject>(IndexOfImpl, 1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("lastIndexOf", global.FunctionClass.New<JsObject>(LastIndexOfImpl, 1), PropertyAttributes.DontEnum);
#endregion
#endregion
}
开发者ID:Fedorm,项目名称:core-master,代码行数:26,代码来源:JsArrayConstructor.cs
示例9: Init
public void Init(HttpApplication context)
{
System.Xml.XmlDocument _document = new System.Xml.XmlDocument();
_document.Load(Xy.Tools.IO.File.foundConfigurationFile("App", Xy.AppSetting.FILE_EXT));
foreach (System.Xml.XmlNode _item in _document.GetElementsByTagName("Global")) {
string _className = _item.InnerText;
Type _tempCtonrlType = Type.GetType(_className, false, true);
IGlobal _tempGlobal;
if (_tempCtonrlType == null) {
System.Reflection.Assembly asm = System.Reflection.Assembly.Load(_className.Split(',')[0]);
_tempCtonrlType = asm.GetType(_className.Split(',')[1], false, true);
}
_tempGlobal = System.Activator.CreateInstance(_tempCtonrlType) as IGlobal;
if (_tempGlobal != null) {
global = _tempGlobal;
}
}
if (global == null) { global = new EmptyGlobal(); }
global.ApplicationInit(context);
context.BeginRequest += new EventHandler(context_BeginRequest);
context.Error += new EventHandler(context_Error);
context.EndRequest += new EventHandler(context_EndRequest);
_urlManager = URLManage.URLManager.GetInstance();
}
开发者ID:BrookHuang,项目名称:XYFrame,代码行数:25,代码来源:HttpModule.cs
示例10: JsMathConstructor
public JsMathConstructor(IGlobal global)
{
Global = global;
#region Functions
this["abs"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Abs(d)); }));
this["acos"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Acos(d)); }));
this["asin"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Asin(d)); }));
this["atan"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Atan(d)); }));
this["atan2"] = new ClrFunction(new Func<double, double, JsNumber>((y, x) => { return Global.NumberClass.New(Math.Atan2(y, x)); }));
this["ceil"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Ceiling(d)); }));
this["cos"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Cos(d)); }));
this["exp"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Exp(d)); }));
this["floor"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Floor(d)); }));
this["log"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Log(d)); }));
this["max"] = new ClrFunction(new Func<double, double, JsNumber>((a, b) => { return Global.NumberClass.New(Math.Max(a, b)); }));
this["min"] = new ClrFunction(new Func<double, double, JsNumber>((a, b) => { return Global.NumberClass.New(Math.Min(a, b)); }));
this["pow"] = new ClrFunction(new Func<double, double, JsNumber>((a, b) => { return Global.NumberClass.New(Math.Pow(a, b)); }));
this["random"] = global.FunctionClass.New(new Func<double>(() => { return new Random(DateTime.Now.Millisecond).NextDouble(); }));
this["round"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Round(d)); }));
this["sin"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Sin(d)); }));
this["sqrt"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Sqrt(d)); }));
this["tan"] = new ClrFunction(new Func<double, JsNumber>((d) => { return Global.NumberClass.New(Math.Tan(d)); }));
#endregion
this["E"] = global.NumberClass.New(Math.E);
this["LN2"] = global.NumberClass.New(Math.Log(2));
this["LN10"] = global.NumberClass.New(Math.Log(10));
this["LOG2E"] = global.NumberClass.New(Math.Log(Math.E, 2));
this["PI"] = global.NumberClass.New(Math.PI);
this["SQRT1_2"] = global.NumberClass.New(Math.Sqrt(0.5));
this["SQRT2"] = global.NumberClass.New(Math.Sqrt(2));
}
开发者ID:pusp,项目名称:o2platform,代码行数:33,代码来源:JsMathConstructor.cs
示例11: JsStringConstructor
public JsStringConstructor(IGlobal global)
: base(global) {
DefineOwnProperty(PROTOTYPE, global.ObjectClass.New(this), PropertyAttributes.ReadOnly | PropertyAttributes.DontDelete | PropertyAttributes.DontEnum);
Name = "String";
this["fromCharCode"] = global.FunctionClass.New<JsDictionaryObject>(FromCharCodeImpl);
}
开发者ID:925coder,项目名称:ravendb,代码行数:7,代码来源:JsStringConstructor.cs
示例12: JsArguments
public JsArguments(IGlobal global, JsFunction callee, JsInstance[] arguments)
: base()
{
this.args = arguments;
this.global = global;
Prototype = global.ObjectClass.New();
// Add the named parameters
for (int i = 0; i < Math.Max(arguments.Length, callee.Arguments.Count); i++)
{
ValueDescriptor d = new ValueDescriptor(this, i < callee.Arguments.Count ? callee.Arguments[i] : i.ToString());
d.Set(this, i < arguments.Length ? arguments[i] : JsUndefined.Instance);
if (i < callee.Arguments.Count)
this.DefineOwnProperty(callee.Arguments[i], d);
this.DefineOwnProperty(i.ToString(), d);
}
length = arguments.Length;
calleeDescriptor = new ValueDescriptor(this, "callee");
DefineOwnProperty("callee", calleeDescriptor);
calleeDescriptor.Set(this, callee);
DefineOwnProperty("length", new PropertyDescriptor<JsArguments>(global, this, "length", GetLength));
DefineOwnProperty("array", new PropertyDescriptor<JsArguments>(global, this, "array", GetArray));
}
开发者ID:Fedorm,项目名称:core-master,代码行数:25,代码来源:JsArguments.cs
示例13: MaxSceneServerUtilityDescriptor
public MaxSceneServerUtilityDescriptor(IGlobal global)
{
this.global = global;
// The two numbers used for class id have to be unique/random
classID = global.Class_ID.Create(681601651, 1321680997);
}
开发者ID:sebjf,项目名称:maxbridge,代码行数:7,代码来源:MaxSceneServerUtility.cs
示例14: InitPrototype
public override void InitPrototype(IGlobal global)
{
//Prototype = global.FunctionClass;
Prototype.DefineOwnProperty("constructor", this, PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("UTC", new JsFunctionWrapper(UTCImpl), PropertyAttributes.DontEnum);
#region Static Methods
Prototype.DefineOwnProperty("now", new ClrFunction(new Func<JsDate>(() => { return Global.DateClass.New(DateTime.Now); })), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("parse", new JsFunctionWrapper(ParseImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("parseLocale", new JsFunctionWrapper(ParseLocaleImpl), PropertyAttributes.DontEnum);
#endregion
#region Methods
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toDateString", global.FunctionClass.New<JsDictionaryObject>(ToDateStringImpl, 0), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toTimeString", global.FunctionClass.New<JsDictionaryObject>(ToTimeStringImpl, 0), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsDictionaryObject>(ToLocaleStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleDateString", global.FunctionClass.New<JsDictionaryObject>(ToLocaleDateStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleTimeString", global.FunctionClass.New<JsDictionaryObject>(ToLocaleTimeStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("valueOf", global.FunctionClass.New<JsDictionaryObject>(ValueOfImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getTime", global.FunctionClass.New<JsDictionaryObject>(GetTimeImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getFullYear", global.FunctionClass.New<JsDictionaryObject>(GetFullYearImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCFullYear", global.FunctionClass.New<JsDictionaryObject>(GetUTCFullYearImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getMonth", global.FunctionClass.New<JsDictionaryObject>(GetMonthImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCMonth", global.FunctionClass.New<JsDictionaryObject>(GetUTCMonthImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getDate", global.FunctionClass.New<JsDictionaryObject>(GetDateImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCDate", global.FunctionClass.New<JsDictionaryObject>(GetUTCDateImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getDay", global.FunctionClass.New<JsDictionaryObject>(GetDayImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCDay", global.FunctionClass.New<JsDictionaryObject>(GetUTCDayImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getHours", global.FunctionClass.New<JsDictionaryObject>(GetHoursImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCHours", global.FunctionClass.New<JsDictionaryObject>(GetUTCHoursImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getMinutes", global.FunctionClass.New<JsDictionaryObject>(GetMinutesImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCMinutes", global.FunctionClass.New<JsDictionaryObject>(GetUTCMinutesImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getSeconds", global.FunctionClass.New<JsDictionaryObject>(GetSecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCSeconds", global.FunctionClass.New<JsDictionaryObject>(GetUTCSecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getMilliseconds", global.FunctionClass.New<JsDictionaryObject>(GetMillisecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getUTCMilliseconds", global.FunctionClass.New<JsDictionaryObject>(GetUTCMillisecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("getTimezoneOffset", global.FunctionClass.New<JsDictionaryObject>(GetTimezoneOffsetImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setTime", global.FunctionClass.New<JsDictionaryObject>(SetTimeImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setMilliseconds", global.FunctionClass.New<JsDictionaryObject>(SetMillisecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCMilliseconds", global.FunctionClass.New<JsDictionaryObject>(SetUTCMillisecondsImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setSeconds", global.FunctionClass.New<JsDictionaryObject>(SetSecondsImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCSeconds", global.FunctionClass.New<JsDictionaryObject>(SetUTCSecondsImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setMinutes", global.FunctionClass.New<JsDictionaryObject>(SetMinutesImpl, 3), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCMinutes", global.FunctionClass.New<JsDictionaryObject>(SetUTCMinutesImpl, 3), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setHours", global.FunctionClass.New<JsDictionaryObject>(SetHoursImpl, 4), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCHours", global.FunctionClass.New<JsDictionaryObject>(SetUTCHoursImpl, 4), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setDate", global.FunctionClass.New<JsDictionaryObject>(SetDateImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCDate", global.FunctionClass.New<JsDictionaryObject>(SetUTCDateImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setMonth", global.FunctionClass.New<JsDictionaryObject>(SetMonthImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCMonth", global.FunctionClass.New<JsDictionaryObject>(SetUTCMonthImpl, 2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setFullYear", global.FunctionClass.New<JsDictionaryObject>(SetFullYearImpl, 3), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("setUTCFullYear", global.FunctionClass.New<JsDictionaryObject>(SetUTCFullYearImpl, 3), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toUTCString", global.FunctionClass.New<JsDictionaryObject>(ToUTCStringImpl), PropertyAttributes.DontEnum);
#endregion
}
开发者ID:Fedorm,项目名称:core-master,代码行数:59,代码来源:JsDateConstructor.cs
示例15: InitPrototype
public override void InitPrototype(IGlobal global) {
//Prototype = global.FunctionClass;
var Prototype = PrototypeProperty;
Prototype.DefineOwnProperty("name", global.StringClass.New(errorType), PropertyAttributes.DontEnum | PropertyAttributes.DontDelete | PropertyAttributes.ReadOnly);
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
}
开发者ID:925coder,项目名称:ravendb,代码行数:8,代码来源:JsErrorConstructor.cs
示例16: JsBooleanConstructor
public JsBooleanConstructor(IGlobal global)
: base(global) {
Name = "Boolean";
DefineOwnProperty(PROTOTYPE, global.ObjectClass.New(this), PropertyAttributes.DontEnum | PropertyAttributes.DontDelete | PropertyAttributes.ReadOnly);
True = New(true);
False = New(false);
}
开发者ID:lorinbeer,项目名称:Jint.Phone,代码行数:9,代码来源:JsBooleanConstructor.cs
示例17: InitPrototype
public override void InitPrototype(IGlobal global)
{
Prototype = new JsObject() { Prototype = global.FunctionClass.Prototype };
Prototype.DefineOwnProperty("constructor", this, PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsDictionaryObject>(ToString2), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsDictionaryObject>(ToString2), PropertyAttributes.DontEnum);
}
开发者ID:pusp,项目名称:o2platform,代码行数:9,代码来源:JsBooleanConstructor.cs
示例18: InitPrototype
public override void InitPrototype(IGlobal global) {
var Prototype = PrototypeProperty;
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsInstance>(ToStringImpl,1), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsInstance>(ToLocaleStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toFixed", global.FunctionClass.New<JsInstance>(ToFixedImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toExponential", global.FunctionClass.New<JsInstance>(ToExponentialImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toPrecision", global.FunctionClass.New<JsInstance>(ToPrecisionImpl), PropertyAttributes.DontEnum);
}
开发者ID:925coder,项目名称:ravendb,代码行数:9,代码来源:JsNumberConstructor.cs
示例19: InitPrototype
public override void InitPrototype(IGlobal global) {
var Prototype = PrototypeProperty;
//Prototype = global.ObjectClass.New(this);
Prototype.DefineOwnProperty("toString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("toLocaleString", global.FunctionClass.New<JsDictionaryObject>(ToStringImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("lastIndex", global.FunctionClass.New<JsRegExp>(GetLastIndex), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("exec", global.FunctionClass.New<JsRegExp>(ExecImpl), PropertyAttributes.DontEnum);
Prototype.DefineOwnProperty("test", global.FunctionClass.New<JsRegExp>(TestImpl), PropertyAttributes.DontEnum);
}
开发者ID:joelmartinez,项目名称:Jint.Phone,代码行数:10,代码来源:JsRegExpConstructor.cs
示例20: JsDateConstructor
protected JsDateConstructor(IGlobal global, bool initializeUTC)
: base(global) {
Name = "Date";
DefineOwnProperty(PROTOTYPE, global.ObjectClass.New(this), PropertyAttributes.DontEnum | PropertyAttributes.DontDelete | PropertyAttributes.ReadOnly);
DefineOwnProperty("now", new ClrFunction(new Func<JsDate>(() => { return Global.DateClass.New(DateTime.Now); }), global.FunctionClass.PrototypeProperty), PropertyAttributes.DontEnum);
DefineOwnProperty("parse", new JsFunctionWrapper(ParseImpl, global.FunctionClass.PrototypeProperty), PropertyAttributes.DontEnum);
DefineOwnProperty("parseLocale", new JsFunctionWrapper(ParseLocaleImpl, global.FunctionClass.PrototypeProperty), PropertyAttributes.DontEnum);
DefineOwnProperty("UTC", new JsFunctionWrapper(UTCImpl, global.FunctionClass.PrototypeProperty), PropertyAttributes.DontEnum);
}
开发者ID:925coder,项目名称:ravendb,代码行数:10,代码来源:JsDateConstructor.cs
注:本文中的IGlobal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论