本文整理汇总了C#中Mooege.Net.MooNet.MooNetClient.UnmapLocalObjectId方法的典型用法代码示例。如果您正苦于以下问题:C# MooNetClient.UnmapLocalObjectId方法的具体用法?C# MooNetClient.UnmapLocalObjectId怎么用?C# MooNetClient.UnmapLocalObjectId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mooege.Net.MooNet.MooNetClient
的用法示例。
在下文中一共展示了MooNetClient.UnmapLocalObjectId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveSubscriber
/// <summary>
/// Removes a given subscriber and unmaps the object's dynamic ID.
/// </summary>
/// <param name="client">The client to remove.</param>
public void RemoveSubscriber(MooNetClient client)
{
if (!this.Subscribers.Contains(client))
{
Logger.Warn("Attempted to remove non-subscriber {0}", client.Connection.RemoteEndPoint.ToString());
return;
}
// Unmap the object from the client
client.UnmapLocalObjectId(this.DynamicId);
this.Subscribers.Remove(client);
// We don't need to do a notify nor respond to the client with anything since the client will ultimately act
// like the object never existed in the first place
foreach (var subscriber in this.Subscribers)
this.NotifySubscriptionAdded(subscriber);
}