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); }
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); }