示例#1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Topic = input.ReadString();
                    break;
                }

                case 18: {
                    global::Ubii.Clients.Client subBuilder = new global::Ubii.Clients.Client();
                    if (typeCase_ == TypeOneofCase.Client)
                    {
                        subBuilder.MergeFrom(Client);
                    }
                    input.ReadMessage(subBuilder);
                    Client = subBuilder;
                    break;
                }

                case 26: {
                    global::Ubii.Devices.Device subBuilder = new global::Ubii.Devices.Device();
                    if (typeCase_ == TypeOneofCase.Device)
                    {
                        subBuilder.MergeFrom(Device);
                    }
                    input.ReadMessage(subBuilder);
                    Device = subBuilder;
                    break;
                }

                case 34: {
                    global::Ubii.Services.Request.TopicSubscription subBuilder = new global::Ubii.Services.Request.TopicSubscription();
                    if (typeCase_ == TypeOneofCase.TopicSubscription)
                    {
                        subBuilder.MergeFrom(TopicSubscription);
                    }
                    input.ReadMessage(subBuilder);
                    TopicSubscription = subBuilder;
                    break;
                }

                case 42: {
                    global::Ubii.Sessions.Session subBuilder = new global::Ubii.Sessions.Session();
                    if (typeCase_ == TypeOneofCase.Session)
                    {
                        subBuilder.MergeFrom(Session);
                    }
                    input.ReadMessage(subBuilder);
                    Session = subBuilder;
                    break;
                }

                case 50: {
                    global::Ubii.Sessions.SessionList subBuilder = new global::Ubii.Sessions.SessionList();
                    if (typeCase_ == TypeOneofCase.SessionList)
                    {
                        subBuilder.MergeFrom(SessionList);
                    }
                    input.ReadMessage(subBuilder);
                    SessionList = subBuilder;
                    break;
                }

                case 58: {
                    global::Ubii.Processing.ProcessingModule subBuilder = new global::Ubii.Processing.ProcessingModule();
                    if (typeCase_ == TypeOneofCase.ProcessingModule)
                    {
                        subBuilder.MergeFrom(ProcessingModule);
                    }
                    input.ReadMessage(subBuilder);
                    ProcessingModule = subBuilder;
                    break;
                }

                case 66: {
                    global::Ubii.Processing.ProcessingModuleList subBuilder = new global::Ubii.Processing.ProcessingModuleList();
                    if (typeCase_ == TypeOneofCase.ProcessingModuleList)
                    {
                        subBuilder.MergeFrom(ProcessingModuleList);
                    }
                    input.ReadMessage(subBuilder);
                    ProcessingModuleList = subBuilder;
                    break;
                }

                case 74: {
                    global::Ubii.Devices.TopicMux subBuilder = new global::Ubii.Devices.TopicMux();
                    if (typeCase_ == TypeOneofCase.TopicMux)
                    {
                        subBuilder.MergeFrom(TopicMux);
                    }
                    input.ReadMessage(subBuilder);
                    TopicMux = subBuilder;
                    break;
                }

                case 82: {
                    global::Ubii.Devices.TopicMuxList subBuilder = new global::Ubii.Devices.TopicMuxList();
                    if (typeCase_ == TypeOneofCase.TopicMuxList)
                    {
                        subBuilder.MergeFrom(TopicMuxList);
                    }
                    input.ReadMessage(subBuilder);
                    TopicMuxList = subBuilder;
                    break;
                }

                case 90: {
                    global::Ubii.Devices.TopicDemux subBuilder = new global::Ubii.Devices.TopicDemux();
                    if (typeCase_ == TypeOneofCase.TopicDemux)
                    {
                        subBuilder.MergeFrom(TopicDemux);
                    }
                    input.ReadMessage(subBuilder);
                    TopicDemux = subBuilder;
                    break;
                }

                case 98: {
                    global::Ubii.Devices.TopicDemuxList subBuilder = new global::Ubii.Devices.TopicDemuxList();
                    if (typeCase_ == TypeOneofCase.TopicDemuxList)
                    {
                        subBuilder.MergeFrom(TopicDemuxList);
                    }
                    input.ReadMessage(subBuilder);
                    TopicDemuxList = subBuilder;
                    break;
                }

                case 106: {
                    global::Ubii.Clients.ClientList subBuilder = new global::Ubii.Clients.ClientList();
                    if (typeCase_ == TypeOneofCase.ClientList)
                    {
                        subBuilder.MergeFrom(ClientList);
                    }
                    input.ReadMessage(subBuilder);
                    ClientList = subBuilder;
                    break;
                }

                case 114: {
                    global::Ubii.Devices.DeviceList subBuilder = new global::Ubii.Devices.DeviceList();
                    if (typeCase_ == TypeOneofCase.DeviceList)
                    {
                        subBuilder.MergeFrom(DeviceList);
                    }
                    input.ReadMessage(subBuilder);
                    DeviceList = subBuilder;
                    break;
                }

                case 122: {
                    global::Ubii.Processing.LockstepProcessingRequest subBuilder = new global::Ubii.Processing.LockstepProcessingRequest();
                    if (typeCase_ == TypeOneofCase.LockstepProcessingRequest)
                    {
                        subBuilder.MergeFrom(LockstepProcessingRequest);
                    }
                    input.ReadMessage(subBuilder);
                    LockstepProcessingRequest = subBuilder;
                    break;
                }
                }
            }
        }
示例#2
0
        public void MergeFrom(ServiceRequest other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Topic.Length != 0)
            {
                Topic = other.Topic;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Client:
                if (Client == null)
                {
                    Client = new global::Ubii.Clients.Client();
                }
                Client.MergeFrom(other.Client);
                break;

            case TypeOneofCase.Device:
                if (Device == null)
                {
                    Device = new global::Ubii.Devices.Device();
                }
                Device.MergeFrom(other.Device);
                break;

            case TypeOneofCase.TopicSubscription:
                if (TopicSubscription == null)
                {
                    TopicSubscription = new global::Ubii.Services.Request.TopicSubscription();
                }
                TopicSubscription.MergeFrom(other.TopicSubscription);
                break;

            case TypeOneofCase.Session:
                if (Session == null)
                {
                    Session = new global::Ubii.Sessions.Session();
                }
                Session.MergeFrom(other.Session);
                break;

            case TypeOneofCase.SessionList:
                if (SessionList == null)
                {
                    SessionList = new global::Ubii.Sessions.SessionList();
                }
                SessionList.MergeFrom(other.SessionList);
                break;

            case TypeOneofCase.ProcessingModule:
                if (ProcessingModule == null)
                {
                    ProcessingModule = new global::Ubii.Processing.ProcessingModule();
                }
                ProcessingModule.MergeFrom(other.ProcessingModule);
                break;

            case TypeOneofCase.ProcessingModuleList:
                if (ProcessingModuleList == null)
                {
                    ProcessingModuleList = new global::Ubii.Processing.ProcessingModuleList();
                }
                ProcessingModuleList.MergeFrom(other.ProcessingModuleList);
                break;

            case TypeOneofCase.TopicMux:
                if (TopicMux == null)
                {
                    TopicMux = new global::Ubii.Devices.TopicMux();
                }
                TopicMux.MergeFrom(other.TopicMux);
                break;

            case TypeOneofCase.TopicMuxList:
                if (TopicMuxList == null)
                {
                    TopicMuxList = new global::Ubii.Devices.TopicMuxList();
                }
                TopicMuxList.MergeFrom(other.TopicMuxList);
                break;

            case TypeOneofCase.TopicDemux:
                if (TopicDemux == null)
                {
                    TopicDemux = new global::Ubii.Devices.TopicDemux();
                }
                TopicDemux.MergeFrom(other.TopicDemux);
                break;

            case TypeOneofCase.TopicDemuxList:
                if (TopicDemuxList == null)
                {
                    TopicDemuxList = new global::Ubii.Devices.TopicDemuxList();
                }
                TopicDemuxList.MergeFrom(other.TopicDemuxList);
                break;

            case TypeOneofCase.ClientList:
                if (ClientList == null)
                {
                    ClientList = new global::Ubii.Clients.ClientList();
                }
                ClientList.MergeFrom(other.ClientList);
                break;

            case TypeOneofCase.DeviceList:
                if (DeviceList == null)
                {
                    DeviceList = new global::Ubii.Devices.DeviceList();
                }
                DeviceList.MergeFrom(other.DeviceList);
                break;

            case TypeOneofCase.LockstepProcessingRequest:
                if (LockstepProcessingRequest == null)
                {
                    LockstepProcessingRequest = new global::Ubii.Processing.LockstepProcessingRequest();
                }
                LockstepProcessingRequest.MergeFrom(other.LockstepProcessingRequest);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public void MergeFrom(ServiceReply other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Success:
                if (Success == null)
                {
                    Success = new global::Ubii.General.Success();
                }
                Success.MergeFrom(other.Success);
                break;

            case TypeOneofCase.Error:
                if (Error == null)
                {
                    Error = new global::Ubii.General.Error();
                }
                Error.MergeFrom(other.Error);
                break;

            case TypeOneofCase.Client:
                if (Client == null)
                {
                    Client = new global::Ubii.Clients.Client();
                }
                Client.MergeFrom(other.Client);
                break;

            case TypeOneofCase.Device:
                if (Device == null)
                {
                    Device = new global::Ubii.Devices.Device();
                }
                Device.MergeFrom(other.Device);
                break;

            case TypeOneofCase.Server:
                if (Server == null)
                {
                    Server = new global::Ubii.Servers.Server();
                }
                Server.MergeFrom(other.Server);
                break;

            case TypeOneofCase.Session:
                if (Session == null)
                {
                    Session = new global::Ubii.Sessions.Session();
                }
                Session.MergeFrom(other.Session);
                break;

            case TypeOneofCase.SessionList:
                if (SessionList == null)
                {
                    SessionList = new global::Ubii.Sessions.SessionList();
                }
                SessionList.MergeFrom(other.SessionList);
                break;

            case TypeOneofCase.ProcessingModule:
                if (ProcessingModule == null)
                {
                    ProcessingModule = new global::Ubii.Processing.ProcessingModule();
                }
                ProcessingModule.MergeFrom(other.ProcessingModule);
                break;

            case TypeOneofCase.ProcessingModuleList:
                if (ProcessingModuleList == null)
                {
                    ProcessingModuleList = new global::Ubii.Processing.ProcessingModuleList();
                }
                ProcessingModuleList.MergeFrom(other.ProcessingModuleList);
                break;

            case TypeOneofCase.StringList:
                if (StringList == null)
                {
                    StringList = new global::Ubii.DataStructure.StringList();
                }
                StringList.MergeFrom(other.StringList);
                break;

            case TypeOneofCase.TopicMux:
                if (TopicMux == null)
                {
                    TopicMux = new global::Ubii.Devices.TopicMux();
                }
                TopicMux.MergeFrom(other.TopicMux);
                break;

            case TypeOneofCase.TopicMuxList:
                if (TopicMuxList == null)
                {
                    TopicMuxList = new global::Ubii.Devices.TopicMuxList();
                }
                TopicMuxList.MergeFrom(other.TopicMuxList);
                break;

            case TypeOneofCase.TopicDemux:
                if (TopicDemux == null)
                {
                    TopicDemux = new global::Ubii.Devices.TopicDemux();
                }
                TopicDemux.MergeFrom(other.TopicDemux);
                break;

            case TypeOneofCase.TopicDemuxList:
                if (TopicDemuxList == null)
                {
                    TopicDemuxList = new global::Ubii.Devices.TopicDemuxList();
                }
                TopicDemuxList.MergeFrom(other.TopicDemuxList);
                break;

            case TypeOneofCase.ClientList:
                if (ClientList == null)
                {
                    ClientList = new global::Ubii.Clients.ClientList();
                }
                ClientList.MergeFrom(other.ClientList);
                break;

            case TypeOneofCase.DeviceList:
                if (DeviceList == null)
                {
                    DeviceList = new global::Ubii.Devices.DeviceList();
                }
                DeviceList.MergeFrom(other.DeviceList);
                break;

            case TypeOneofCase.Service:
                if (Service == null)
                {
                    Service = new global::Ubii.Services.Service();
                }
                Service.MergeFrom(other.Service);
                break;

            case TypeOneofCase.ServiceList:
                if (ServiceList == null)
                {
                    ServiceList = new global::Ubii.Services.ServiceList();
                }
                ServiceList.MergeFrom(other.ServiceList);
                break;

            case TypeOneofCase.LockstepProcessingReply:
                if (LockstepProcessingReply == null)
                {
                    LockstepProcessingReply = new global::Ubii.Processing.LockstepProcessingReply();
                }
                LockstepProcessingReply.MergeFrom(other.LockstepProcessingReply);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    global::Ubii.General.Success subBuilder = new global::Ubii.General.Success();
                    if (typeCase_ == TypeOneofCase.Success)
                    {
                        subBuilder.MergeFrom(Success);
                    }
                    input.ReadMessage(subBuilder);
                    Success = subBuilder;
                    break;
                }

                case 18: {
                    global::Ubii.General.Error subBuilder = new global::Ubii.General.Error();
                    if (typeCase_ == TypeOneofCase.Error)
                    {
                        subBuilder.MergeFrom(Error);
                    }
                    input.ReadMessage(subBuilder);
                    Error = subBuilder;
                    break;
                }

                case 26: {
                    global::Ubii.Clients.Client subBuilder = new global::Ubii.Clients.Client();
                    if (typeCase_ == TypeOneofCase.Client)
                    {
                        subBuilder.MergeFrom(Client);
                    }
                    input.ReadMessage(subBuilder);
                    Client = subBuilder;
                    break;
                }

                case 34: {
                    global::Ubii.Devices.Device subBuilder = new global::Ubii.Devices.Device();
                    if (typeCase_ == TypeOneofCase.Device)
                    {
                        subBuilder.MergeFrom(Device);
                    }
                    input.ReadMessage(subBuilder);
                    Device = subBuilder;
                    break;
                }

                case 42: {
                    global::Ubii.Servers.Server subBuilder = new global::Ubii.Servers.Server();
                    if (typeCase_ == TypeOneofCase.Server)
                    {
                        subBuilder.MergeFrom(Server);
                    }
                    input.ReadMessage(subBuilder);
                    Server = subBuilder;
                    break;
                }

                case 50: {
                    global::Ubii.Sessions.Session subBuilder = new global::Ubii.Sessions.Session();
                    if (typeCase_ == TypeOneofCase.Session)
                    {
                        subBuilder.MergeFrom(Session);
                    }
                    input.ReadMessage(subBuilder);
                    Session = subBuilder;
                    break;
                }

                case 58: {
                    global::Ubii.Sessions.SessionList subBuilder = new global::Ubii.Sessions.SessionList();
                    if (typeCase_ == TypeOneofCase.SessionList)
                    {
                        subBuilder.MergeFrom(SessionList);
                    }
                    input.ReadMessage(subBuilder);
                    SessionList = subBuilder;
                    break;
                }

                case 66: {
                    global::Ubii.Processing.ProcessingModule subBuilder = new global::Ubii.Processing.ProcessingModule();
                    if (typeCase_ == TypeOneofCase.ProcessingModule)
                    {
                        subBuilder.MergeFrom(ProcessingModule);
                    }
                    input.ReadMessage(subBuilder);
                    ProcessingModule = subBuilder;
                    break;
                }

                case 74: {
                    global::Ubii.Processing.ProcessingModuleList subBuilder = new global::Ubii.Processing.ProcessingModuleList();
                    if (typeCase_ == TypeOneofCase.ProcessingModuleList)
                    {
                        subBuilder.MergeFrom(ProcessingModuleList);
                    }
                    input.ReadMessage(subBuilder);
                    ProcessingModuleList = subBuilder;
                    break;
                }

                case 82: {
                    global::Ubii.DataStructure.StringList subBuilder = new global::Ubii.DataStructure.StringList();
                    if (typeCase_ == TypeOneofCase.StringList)
                    {
                        subBuilder.MergeFrom(StringList);
                    }
                    input.ReadMessage(subBuilder);
                    StringList = subBuilder;
                    break;
                }

                case 90: {
                    global::Ubii.Devices.TopicMux subBuilder = new global::Ubii.Devices.TopicMux();
                    if (typeCase_ == TypeOneofCase.TopicMux)
                    {
                        subBuilder.MergeFrom(TopicMux);
                    }
                    input.ReadMessage(subBuilder);
                    TopicMux = subBuilder;
                    break;
                }

                case 98: {
                    global::Ubii.Devices.TopicMuxList subBuilder = new global::Ubii.Devices.TopicMuxList();
                    if (typeCase_ == TypeOneofCase.TopicMuxList)
                    {
                        subBuilder.MergeFrom(TopicMuxList);
                    }
                    input.ReadMessage(subBuilder);
                    TopicMuxList = subBuilder;
                    break;
                }

                case 106: {
                    global::Ubii.Devices.TopicDemux subBuilder = new global::Ubii.Devices.TopicDemux();
                    if (typeCase_ == TypeOneofCase.TopicDemux)
                    {
                        subBuilder.MergeFrom(TopicDemux);
                    }
                    input.ReadMessage(subBuilder);
                    TopicDemux = subBuilder;
                    break;
                }

                case 114: {
                    global::Ubii.Devices.TopicDemuxList subBuilder = new global::Ubii.Devices.TopicDemuxList();
                    if (typeCase_ == TypeOneofCase.TopicDemuxList)
                    {
                        subBuilder.MergeFrom(TopicDemuxList);
                    }
                    input.ReadMessage(subBuilder);
                    TopicDemuxList = subBuilder;
                    break;
                }

                case 122: {
                    global::Ubii.Clients.ClientList subBuilder = new global::Ubii.Clients.ClientList();
                    if (typeCase_ == TypeOneofCase.ClientList)
                    {
                        subBuilder.MergeFrom(ClientList);
                    }
                    input.ReadMessage(subBuilder);
                    ClientList = subBuilder;
                    break;
                }

                case 130: {
                    global::Ubii.Devices.DeviceList subBuilder = new global::Ubii.Devices.DeviceList();
                    if (typeCase_ == TypeOneofCase.DeviceList)
                    {
                        subBuilder.MergeFrom(DeviceList);
                    }
                    input.ReadMessage(subBuilder);
                    DeviceList = subBuilder;
                    break;
                }

                case 138: {
                    global::Ubii.Services.Service subBuilder = new global::Ubii.Services.Service();
                    if (typeCase_ == TypeOneofCase.Service)
                    {
                        subBuilder.MergeFrom(Service);
                    }
                    input.ReadMessage(subBuilder);
                    Service = subBuilder;
                    break;
                }

                case 146: {
                    global::Ubii.Services.ServiceList subBuilder = new global::Ubii.Services.ServiceList();
                    if (typeCase_ == TypeOneofCase.ServiceList)
                    {
                        subBuilder.MergeFrom(ServiceList);
                    }
                    input.ReadMessage(subBuilder);
                    ServiceList = subBuilder;
                    break;
                }

                case 154: {
                    global::Ubii.Processing.LockstepProcessingReply subBuilder = new global::Ubii.Processing.LockstepProcessingReply();
                    if (typeCase_ == TypeOneofCase.LockstepProcessingReply)
                    {
                        subBuilder.MergeFrom(LockstepProcessingReply);
                    }
                    input.ReadMessage(subBuilder);
                    LockstepProcessingReply = subBuilder;
                    break;
                }
                }
            }
        }
示例#5
0
        public void MergeFrom(ServiceReply other)
        {
            if (other == null)
            {
                return;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Success:
                if (Success == null)
                {
                    Success = new global::Ubii.General.Success();
                }
                Success.MergeFrom(other.Success);
                break;

            case TypeOneofCase.Error:
                if (Error == null)
                {
                    Error = new global::Ubii.General.Error();
                }
                Error.MergeFrom(other.Error);
                break;

            case TypeOneofCase.Client:
                if (Client == null)
                {
                    Client = new global::Ubii.Clients.Client();
                }
                Client.MergeFrom(other.Client);
                break;

            case TypeOneofCase.Device:
                if (Device == null)
                {
                    Device = new global::Ubii.Devices.Device();
                }
                Device.MergeFrom(other.Device);
                break;

            case TypeOneofCase.Server:
                if (Server == null)
                {
                    Server = new global::Ubii.Servers.Server();
                }
                Server.MergeFrom(other.Server);
                break;

            case TypeOneofCase.Session:
                if (Session == null)
                {
                    Session = new global::Ubii.Sessions.Session();
                }
                Session.MergeFrom(other.Session);
                break;

            case TypeOneofCase.SessionList:
                if (SessionList == null)
                {
                    SessionList = new global::Ubii.Sessions.SessionList();
                }
                SessionList.MergeFrom(other.SessionList);
                break;

            case TypeOneofCase.Interaction:
                if (Interaction == null)
                {
                    Interaction = new global::Ubii.Interactions.Interaction();
                }
                Interaction.MergeFrom(other.Interaction);
                break;

            case TypeOneofCase.InteractionList:
                if (InteractionList == null)
                {
                    InteractionList = new global::Ubii.Interactions.InteractionList();
                }
                InteractionList.MergeFrom(other.InteractionList);
                break;

            case TypeOneofCase.StringList:
                if (StringList == null)
                {
                    StringList = new global::Ubii.General.StringList();
                }
                StringList.MergeFrom(other.StringList);
                break;

            case TypeOneofCase.TopicMux:
                if (TopicMux == null)
                {
                    TopicMux = new global::Ubii.Devices.TopicMux();
                }
                TopicMux.MergeFrom(other.TopicMux);
                break;

            case TypeOneofCase.TopicMuxList:
                if (TopicMuxList == null)
                {
                    TopicMuxList = new global::Ubii.Devices.TopicMuxList();
                }
                TopicMuxList.MergeFrom(other.TopicMuxList);
                break;

            case TypeOneofCase.TopicDemux:
                if (TopicDemux == null)
                {
                    TopicDemux = new global::Ubii.Devices.TopicDemux();
                }
                TopicDemux.MergeFrom(other.TopicDemux);
                break;

            case TypeOneofCase.TopicDemuxList:
                if (TopicDemuxList == null)
                {
                    TopicDemuxList = new global::Ubii.Devices.TopicDemuxList();
                }
                TopicDemuxList.MergeFrom(other.TopicDemuxList);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }