示例#1
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);
        }