//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.5448
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Pluto.RelayServer {
    using System;
    using RemObjects.SDK;
    using RemObjects.SDK.Types;
    using RemObjects.SDK.Server;
    
    [RemObjects.SDK.Server.Invoker()]
    [System.Reflection.ObfuscationAttribute(Exclude=true)]
    public class RelayServerResponse_Invoker : RemObjects.SDK.Server.Invoker {
        public RelayServerResponse_Invoker() : 
                base() {
        }
        public static void Invoke_Action_Response(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(1);
            try {
                string SessionID = @__Message.ReadAnsiString("SessionID");
                ActionFetch actionType = ((ActionFetch)(@__Message.Read("actionType", typeof(ActionFetch), RemObjects.SDK.StreamingFormat.Default)));
                bool Success = @__Message.ReadBoolean("Success");
                string ErrorString = @__Message.ReadAnsiString("ErrorString");
                @__ObjectDisposer.Add(actionType);
                ((IRelayServerResponse)(@__Instance)).Action_Response(SessionID, actionType, Success, ErrorString);
                @__Message.InitializeResponseMessage(@__ServerChannelInfo, "RelayServer", "RelayServerResponse", "Action_ResponseResponse");
                @__Message.FinalizeMessage();
                @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roNoResponse;
            }
            finally {
                @__ObjectDisposer.Dispose();
            }
        }
        public static void Invoke_Fetch_Response(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(2);
            try {
                string SessionID = @__Message.ReadAnsiString("SessionID");
                ActionFetch fetchType = ((ActionFetch)(@__Message.Read("fetchType", typeof(ActionFetch), RemObjects.SDK.StreamingFormat.Default)));
                bool Success = @__Message.ReadBoolean("Success");
                string ErrorString = @__Message.ReadAnsiString("ErrorString");
                System.Xml.XmlNode Response = @__Message.ReadXml("Response");
                @__ObjectDisposer.Add(fetchType);
                @__ObjectDisposer.Add(Response);
                ((IRelayServerResponse)(@__Instance)).Fetch_Response(SessionID, fetchType, Success, ErrorString, Response);
                @__Message.InitializeResponseMessage(@__ServerChannelInfo, "RelayServer", "RelayServerResponse", "Fetch_ResponseResponse");
                @__Message.FinalizeMessage();
                @__oResponseOptions = RemObjects.SDK.Server.ResponseOptions.roNoResponse;
            }
            finally {
                @__ObjectDisposer.Dispose();
            }
        }
    }
    [RemObjects.SDK.Activator()]
    [System.Reflection.ObfuscationAttribute(Exclude=true, ApplyToMembers=false)]
    public class RelayServerResponse_Activator : RemObjects.SDK.Server.ServiceActivator {
        public RelayServerResponse_Activator() : 
                base() {
        }
        public override RemObjects.SDK.IROService CreateInstance() {
            return new RelayServerResponse();
        }
    }
}
