예제 #1
0
        public void UpdateChannelAttributes(ChannelAPI.ChannelData channelData, List <bnet.protocol.attribute.Attribute> attributeList, RPCContextDelegate callback)
        {
            UpdateChannelStateRequest updateChannelStateRequest = new UpdateChannelStateRequest();

            bnet.protocol.channel.ChannelState channelState = new bnet.protocol.channel.ChannelState();
            foreach (bnet.protocol.attribute.Attribute val in attributeList)
            {
                channelState.AddAttribute(val);
            }
            updateChannelStateRequest.SetStateChange(channelState);
            this.m_rpcConnection.QueueRequest(this.m_channelService.Id, 4u, updateChannelStateRequest, callback, (uint)channelData.m_objectId);
        }
예제 #2
0
        public void UpdateChannelAttributes(ChannelAPI.ChannelData channelData, List <Attribute> attributeList, RPCContextDelegate callback)
        {
            UpdateChannelStateRequest updateChannelStateRequest = new UpdateChannelStateRequest();

            bnet.protocol.channel.ChannelState channelState = new bnet.protocol.channel.ChannelState();
            using (List <Attribute> .Enumerator enumerator = attributeList.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    Attribute current = enumerator.get_Current();
                    channelState.AddAttribute(current);
                }
            }
            updateChannelStateRequest.SetStateChange(channelState);
            this.m_rpcConnection.QueueRequest(this.m_channelService.Id, 4u, updateChannelStateRequest, callback, (uint)channelData.m_objectId);
        }