using System; using System.Collections.Specialized; using System.Net; using System.Net.Http; using System.Web; using Jint; using Jint.Native.Object; using Jint.Runtime.Descriptors; using Jint.Runtime.Interop; namespace BililiveRecorder.Core.Scripting.Runtime { internal class JintDotnet : ObjectInstance { public JintDotnet(Engine engine) : base(engine) { } protected override void Initialize() { this.FastSetProperty("Dns", new PropertyDescriptor(TypeReference.CreateTypeReference(this._engine, typeof(Dns)), false, false, false)); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); AddTypeAsProperty(); void AddTypeAsProperty() => this.FastSetProperty(typeof(T).Name, new PropertyDescriptor(TypeReference.CreateTypeReference(this._engine), false, false, false)); } } }