Esempio n. 1
0
 public static void Invoke_MethodWithoutParameters(RemObjects.SDK.IROService @__Instance, RemObjects.SDK.IMessage @__Message, RemObjects.SDK.Server.IServerChannelInfo @__ServerChannelInfo, out RemObjects.SDK.Server.ResponseOptions @__oResponseOptions)
 {
     ((ITestService)(@__Instance)).MethodWithoutParameters();
     @__Message.InitializeResponseMessage(@__ServerChannelInfo, "TestLibrary", "TestService", "MethodWithoutParametersResponse");
     @__Message.FinalizeMessage();
     @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roNoResponse;
 }
Esempio n. 2
0
 public static void Invoke_MethodWithResult(RemObjects.SDK.IROService @__Instance, RemObjects.SDK.IMessage @__Message, RemObjects.SDK.Server.IServerChannelInfo @__ServerChannelInfo, out RemObjects.SDK.Server.ResponseOptions @__oResponseOptions)
 {
     string param1 = @__Message.ReadUtf8String("param1");
     int param2 = @__Message.ReadInt32("param2");
     bool Result;
     Result = ((ITestService)(@__Instance)).MethodWithResult(param1, param2);
     @__Message.InitializeResponseMessage(@__ServerChannelInfo, "TestLibrary", "TestService", "MethodWithResultResponse");
     @__Message.WriteBoolean("Result", Result);
     @__Message.FinalizeMessage();
     @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roDefault;
 }
Esempio n. 3
0
		public void ServerLog(object Sender, RemObjects.InternetPack.CommandBased.ClientLogArgs ea)
		{
			if (fDoShowFtpClientLog)
			{
				String lIcon = " ";
				switch (ea.Direction)
				{
					case RemObjects.InternetPack.Events.TransferDirection.Receive:
						lIcon = "<";
						break;
					case RemObjects.InternetPack.Events.TransferDirection.Send:
						lIcon = ">";
						break;
					case RemObjects.InternetPack.Events.TransferDirection.None:
						lIcon = "!";
						break;
				}

				Console.WriteLine("[{0}] {1}", lIcon, ea.Text);
			}
		}
Esempio n. 4
0
 public static void Invoke_MethodWithComplexTypes(RemObjects.SDK.IROService @__Instance, RemObjects.SDK.IMessage @__Message, RemObjects.SDK.Server.IServerChannelInfo @__ServerChannelInfo, out RemObjects.SDK.Server.ResponseOptions @__oResponseOptions)
 {
     RemObjects.SDK.ObjectDisposer @__ObjectDisposer = new RemObjects.SDK.ObjectDisposer(4);
     try {
         TestStructure[] data = ((TestStructure[])(@__Message.Read("data", typeof(TestStructure[]), RemObjects.SDK.StreamingFormat.Default)));
         TestStructure singleStructure = ((TestStructure)(@__Message.Read("singleStructure", typeof(TestStructure), RemObjects.SDK.StreamingFormat.Default)));
         TestEnum expectedResult = ((TestEnum)(@__Message.Read("expectedResult", typeof(TestEnum), RemObjects.SDK.StreamingFormat.Default)));
         @__ObjectDisposer.Add(data);
         @__ObjectDisposer.Add(singleStructure);
         @__ObjectDisposer.Add(expectedResult);
         TestStructure Result;
         Result = ((ITestService)(@__Instance)).MethodWithComplexTypes(data, singleStructure, expectedResult);
         @__ObjectDisposer.Add(Result);
         @__Message.InitializeResponseMessage(@__ServerChannelInfo, "TestLibrary", "TestService", "MethodWithComplexTypesResponse");
         @__Message.Write("Result", Result, typeof(TestStructure), RemObjects.SDK.StreamingFormat.Default);
         @__Message.FinalizeMessage();
         @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roDefault;
     }
     finally {
         @__ObjectDisposer.Dispose();
     }
 }
Esempio n. 5
0
 public static ITestService Create(RemObjects.SDK.IMessage message, RemObjects.SDK.IClientChannel clientChannel)
 {
     return new TestService_Proxy(message, clientChannel);
 }
Esempio n. 6
0
 public override void WriteComplex(RemObjects.SDK.Serializer aSerializer)
 {
     if (aSerializer.RecordStrictOrder) {
         aSerializer.WriteUtf8String("FieldA", FieldA);
         aSerializer.WriteInt64("FieldB", FieldB);
         aSerializer.WriteBoolean("FieldC", FieldC);
     }
     else {
         aSerializer.WriteUtf8String("FieldA", FieldA);
         aSerializer.WriteInt64("FieldB", FieldB);
         aSerializer.WriteBoolean("FieldC", FieldC);
     }
 }
Esempio n. 7
0
 public override void ReadComplex(RemObjects.SDK.Serializer aSerializer)
 {
     if (aSerializer.RecordStrictOrder) {
         FieldA = aSerializer.ReadUtf8String("FieldA");
         FieldB = aSerializer.ReadInt64("FieldB");
         FieldC = aSerializer.ReadBoolean("FieldC");
     }
     else {
         FieldA = aSerializer.ReadUtf8String("FieldA");
         FieldB = aSerializer.ReadInt64("FieldB");
         FieldC = aSerializer.ReadBoolean("FieldC");
     }
 }
Esempio n. 8
0
 public TestService_Proxy(RemObjects.SDK.IRemoteService remoteService, string interfaceName)
     : base(remoteService, interfaceName)
 {
 }
Esempio n. 9
0
 public TestService_Proxy(RemObjects.SDK.IRemoteService remoteService)
     : base(remoteService)
 {
 }
Esempio n. 10
0
 public static IWindowsPhonePushProviderService Create(RemObjects.SDK.IRemoteService aRemoteService)
 {
     return new WindowsPhonePushProviderService_Proxy(aRemoteService);
 }
Esempio n. 11
0
 public WindowsPhonePushProviderService_AsyncProxy(RemObjects.SDK.IRemoteService aRemoteService)
     : base(aRemoteService)
 {
 }
Esempio n. 12
0
		private void Ftp_OnTransferProgress(object aSender, RemObjects.InternetPack.Events.TransferProgressEventArgs ea)
		{
			Console.Write(".");
		}
Esempio n. 13
0
        void ScriptEngine_DebugTracePoint(Object sender, RemObjects.Script.ScriptDebugEventArgs e)
        {
            if (e.SourceSpan.IsValid)
            {
                Invoke(new Action(delegate
                {
                    tbMain.Document.MarkerStrategy.RemoveAll(a => (a.TextMarkerType == ICSharpCode.TextEditor.Document.TextMarkerType.SolidBlock && a.Color == Color.Red));
                    Int32 lStart = tbMain.Document.PositionToOffset(new ICSharpCode.TextEditor.TextLocation(e.SourceSpan.Start.Column - 1, e.SourceSpan.Start.Line - 1));
                    Int32 lEnd = tbMain.Document.PositionToOffset(new ICSharpCode.TextEditor.TextLocation(e.SourceSpan.End.Column - 1, e.SourceSpan.End.Line - 1));
                    tbMain.Document.MarkerStrategy.AddMarker(new ICSharpCode.TextEditor.Document.TextMarker(lStart, lEnd - lStart + 1, ICSharpCode.TextEditor.Document.TextMarkerType.SolidBlock, Color.Red));
                    tbMain.Refresh();
                }));
            }
            else
            {
                Invoke(new Action(delegate
                {
                    tbMain.Document.MarkerStrategy.RemoveAll(a => (a.TextMarkerType == ICSharpCode.TextEditor.Document.TextMarkerType.SolidBlock && a.Color == Color.Red));
                    tbMain.Refresh();
                }));
            }
            Invoke(new Action(delegate
            {
                lvLocals.Items.Clear();
                for (Int32 i = ScriptEngine.CallStack.Count - 1; i >= 0; i--)
                {
                    var el = ScriptEngine.CallStack[i];
                    ListViewItem item = new ListViewItem("[METHOD]");
                    item.SubItems.Add(el.Method ?? null);
                    lvLocals.Items.Add(item);
                    item = new ListViewItem("this");
                    item.SubItems.Add(el.This == null ? "this" : el.This.ToString());
                    lvLocals.Items.Add(item);

                    foreach (var name in el.Frame.Names())
                    {
                        item = new ListViewItem(name);
                        var val = el.Frame.GetBindingValue(name, false);
                        item.SubItems.Add(val == null ? "(null)" : val.ToString());
                        lvLocals.Items.Add(item);
                    }
                }
            }));
        }
Esempio n. 14
0
 public WindowsPhonePushProviderService_AsyncProxy(RemObjects.SDK.IMessage aMessage, RemObjects.SDK.IClientChannel aClientChannel)
     : base(aMessage, aClientChannel)
 {
 }
	    public virtual Connection CreateClientConnection(RemObjects.InternetPack.Core.Binding aBinding)
    	{
			throw new InvalidOperationException();
	    }
		public override Connection CreateClientConnection(RemObjects.InternetPack.Core.Binding aBinding)
		{
			return new ClientSSLConnection(aBinding, this);
		}
Esempio n. 17
0
 public WindowsPhonePushProviderService_AsyncProxy(RemObjects.SDK.IRemoteService aRemoteService, string aOverrideInterfaceName)
     : base(aRemoteService, aOverrideInterfaceName)
 {
 }
Esempio n. 18
0
 public static ITestService Create(RemObjects.SDK.IRemoteService remoteService)
 {
     return new TestService_Proxy(remoteService);
 }
Esempio n. 19
0
		public SSLConnection(RemObjects.InternetPack.Core.Binding aBinding)
			:base(aBinding)
		{
		}
Esempio n. 20
0
 void ScriptEngine_DebugThreadExit(Object sender, RemObjects.Script.ScriptDebugEventArgs e)
 {
     Invoke(new Action(delegate
         {
             tbMain.Document.MarkerStrategy.RemoveAll(a => (a.TextMarkerType == ICSharpCode.TextEditor.Document.TextMarkerType.SolidBlock && a.Color == Color.Red));
             tbMain.Refresh();
         }));
 }
Esempio n. 21
0
 public WindowsPhonePushProviderService_AsyncProxy(RemObjects.SDK.IMessage aMessage, RemObjects.SDK.IClientChannel aClientChannel, string aOverrideInterfaceName)
     : base(aMessage, aClientChannel, aOverrideInterfaceName)
 {
 }
Esempio n. 22
0
 public static void Invoke_MethodWithSimpleParameters(RemObjects.SDK.IROService @__Instance, RemObjects.SDK.IMessage @__Message, RemObjects.SDK.Server.IServerChannelInfo @__ServerChannelInfo, out RemObjects.SDK.Server.ResponseOptions @__oResponseOptions)
 {
     string paramA = @__Message.ReadUtf8String("paramA");
     int paramB = @__Message.ReadInt32("paramB");
     ((ITestService)(@__Instance)).MethodWithSimpleParameters(paramA, paramB);
     @__Message.InitializeResponseMessage(@__ServerChannelInfo, "TestLibrary", "TestService", "MethodWithSimpleParametersResponse");
     @__Message.FinalizeMessage();
     @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roNoResponse;
 }
Esempio n. 23
0
 public TestService_Proxy(RemObjects.SDK.IMessage message, RemObjects.SDK.IClientChannel clientChannel)
     : base(message, clientChannel)
 {
 }
Esempio n. 24
0
			IClientSSLConnectionSettings aSettings
			) 
			: base(aSocket)
		{
			fDataSocket = new ElClientSSLSocket();
			fDataSocket.Socket = aSocket;
			InitializeSSLSocket(aSettings);
			((ElClientSSLSocket)fDataSocket).Connect(remoteEndPoint);
		}

		public ClientSSLConnection(
Esempio n. 25
0
 public TestService_Proxy(RemObjects.SDK.IMessage message, RemObjects.SDK.IClientChannel clientChannel, string interfaceName)
     : base(message, clientChannel, interfaceName)
 {
 }
Esempio n. 26
0
        private void httpServer_OnHttpRequest(object aSender, RemObjects.InternetPack.Http.OnHttpRequestArgs ea)
        {
            string lRequestPath = ea.Request.Header.RequestPath;
            Invoke(new MethodInvoker(delegate()
            {
                lb_Log.Items.Add(lRequestPath);
            }));


            switch (ea.Request.Header.RequestPath)
            {
                case "/":
                case "/home":
                    ea.Response.ContentString = sWelcome;
                    ea.Response.Header.SetHeaderValue("Content-Type", "text/html");
                    break;

                case "/bytes":
                    byte[] lBuffer = new byte[256];
                    Random lRandom = new Random();
                    lRandom.NextBytes(lBuffer);
                    ea.Response.ContentBytes = lBuffer;
                    ea.Response.Header.SetHeaderValue("Content-Disposition", "filename=random.bin");
                    ea.Response.Header.SetHeaderValue("Content-Type", "application/binary");
                    break;

                case "/error":
                    ea.Response.SendError(555, "Custom Error", "A custom error message");
                    break;

                case "/file":
                    string lExeName = this.GetType().Assembly.Location;
                    try
                    {
                        ea.Response.ContentStream = new FileStream(lExeName,
                          FileMode.Open, FileAccess.Read, FileShare.Read);
                        ea.Response.Header.SetHeaderValue("Content-Disposition",
                          String.Format("filename=\"{0}\"", Path.GetFileName(lExeName)));
                        ea.Response.Header.SetHeaderValue("Content-Type", "application/binary");
                        ea.Response.CloseStream = true; /* default, anyway */
                    }
                    catch (Exception e)
                    {
                        ea.Response.SendError(404, String.Format("File {0} not found", lExeName), e);
                    }
                    break;

                default:
                    ea.Response.SendError(404, "requested path not found");
                    break;
            }

        }
Esempio n. 27
0
 public static IWindowsPhonePushProviderService Create(RemObjects.SDK.IMessage aMessage, RemObjects.SDK.IClientChannel aClientChannel)
 {
     return new WindowsPhonePushProviderService_Proxy(aMessage, aClientChannel);
 }