示例#1
0
        public void StreamWriteF(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamWrite with an invalid object.", LogAlertLevel.Error);
                return;
            }
            stream.Writer.Write(thread.GetFloatParameter(1));
        }
示例#2
0
        public void StreamLength(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamLength with an invalid object.", LogAlertLevel.Error);
                return;
            }
            thread.SetReturnValue(stream.Stream.Length);
        }
示例#3
0
        public void StreamPeekDouble(ScriptThread thread)
        {
            ScriptStream stream = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptStream;

            if (stream == null)
            {
                DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called StreamPeekDouble with an invalid object.", LogAlertLevel.Error);
                return;
            }
            long   position = stream.Stream.Position;
            double value    = stream.Reader.ReadDouble();

            stream.Stream.Position = position;
            thread.SetReturnValue(value);
        }
示例#4
0
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }
示例#5
0
 public StreamScriptObject(ScriptStream stream)
 {
     _nativeObject = stream;
 }