本文整理汇总了C#中Murmur.begin_getUsers方法的典型用法代码示例。如果您正苦于以下问题:C# Murmur.begin_getUsers方法的具体用法?C# Murmur.begin_getUsers怎么用?C# Murmur.begin_getUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Murmur
的用法示例。
在下文中一共展示了Murmur.begin_getUsers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Server
public Server(Ice.Communicator iceCommunicator, string clientEndpoint, Murmur.ServerPrx proxy, string name)
{
Users.CollectionChanged += OnUsersCollectionChanged;
ServerProxy = proxy;
Name = name;
try {
var servant = new ServerCallback(this);
var adapter = iceCommunicator.createObjectAdapterWithEndpoints("", clientEndpoint);
var servantProxy = adapter.addWithUUID(servant);
ServerCallbackProxy = Murmur.ServerCallbackPrxHelper.checkedCast(servantProxy);
adapter.activate();
// TODO: Allow user to provide Ice secret
var context = new Dictionary<string, string>();
context["secret"] = "";
ServerProxy.ice_getConnection().setAdapter(adapter);
ServerProxy.addCallback(ServerCallbackProxy, context);
ServerProxy.begin_getUsers().whenCompleted(
users => {
CompleteGetUsers(users);
},
e => {
System.Diagnostics.Debug.WriteLine("Could not get user dictionary for {0}: {1}", Name, e.ToString());
}
);
} catch (Ice.Exception e) {
System.Diagnostics.Debug.WriteLine("Error talking to {0}: {1}", Name, e.ToString());
}
}