本文整理汇总了C#中Murmur类的典型用法代码示例。如果您正苦于以下问题:C# Murmur类的具体用法?C# Murmur怎么用?C# Murmur使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Murmur类属于命名空间,在下文中一共展示了Murmur类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
}
示例2: contextAction
public void contextAction(string action, Murmur.User usr, int session, int channelid, _System.Collections.Generic.Dictionary<string, string> context__)
{
contextAction(action, usr, session, channelid, context__, true);
}
示例3: addContextCallback
public void addContextCallback(int session, string action, string text, Murmur.ServerContextCallbackPrx cb, int ctx, _System.Collections.Generic.Dictionary<string, string> context__)
{
IceInternal.Outgoing og__ = handler__.getOutgoing("addContextCallback", Ice.OperationMode.Normal, context__);
try
{
try
{
IceInternal.BasicStream os__ = og__.ostr();
os__.writeInt(session);
os__.writeString(action);
os__.writeString(text);
Murmur.ServerContextCallbackPrxHelper.write__(os__, cb);
os__.writeInt(ctx);
}
catch(Ice.LocalException ex__)
{
og__.abort(ex__);
}
bool ok__ = og__.invoke();
try
{
if(!ok__)
{
try
{
og__.throwUserException();
}
catch(Murmur.InvalidCallbackException)
{
throw;
}
catch(Murmur.ServerBootedException)
{
throw;
}
catch(Ice.UserException ex__)
{
throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
}
}
og__.istr().skipEmptyEncaps();
}
catch(Ice.LocalException ex__)
{
throw new IceInternal.LocalExceptionWrapper(ex__, false);
}
}
finally
{
handler__.reclaimOutgoing(og__);
}
}
示例4: userStateChanged
public void userStateChanged(Murmur.User state, _System.Collections.Generic.Dictionary<string, string> context__)
{
IceInternal.Outgoing og__ = handler__.getOutgoing("userStateChanged", Ice.OperationMode.Idempotent, context__);
try
{
try
{
IceInternal.BasicStream os__ = og__.ostr();
if(state == null)
{
Murmur.User tmp__ = new Murmur.User();
tmp__.write__(os__);
}
else
{
state.write__(os__);
}
}
catch(Ice.LocalException ex__)
{
og__.abort(ex__);
}
bool ok__ = og__.invoke();
if(!og__.istr().isEmpty())
{
try
{
if(!ok__)
{
try
{
og__.throwUserException();
}
catch(Ice.UserException ex__)
{
throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
}
}
og__.istr().skipEmptyEncaps();
}
catch(Ice.LocalException ex__)
{
throw new IceInternal.LocalExceptionWrapper(ex__, false);
}
}
}
finally
{
handler__.reclaimOutgoing(og__);
}
}
示例5: write
public static void write(IceInternal.BasicStream os__, Murmur.User[] v__)
{
if(v__ == null)
{
os__.writeSize(0);
}
else
{
os__.writeSize(v__.Length);
for(int ix__ = 0; ix__ < v__.Length; ++ix__)
{
(v__[ix__] == null ? new Murmur.User() : v__[ix__]).write__(os__);
}
}
}
示例6: setState
private void setState(Murmur.User state, _System.Collections.Generic.Dictionary<string, string> context__, bool explicitContext__)
{
if(explicitContext__ && context__ == null)
{
context__ = emptyContext_;
}
int cnt__ = 0;
while(true)
{
Ice.ObjectDel_ delBase__ = null;
try
{
checkTwowayOnly__("setState");
delBase__ = getDelegate__(false);
ServerDel_ del__ = (ServerDel_)delBase__;
del__.setState(state, context__);
return;
}
catch(IceInternal.LocalExceptionWrapper ex__)
{
handleExceptionWrapperRelaxed__(delBase__, ex__, null, ref cnt__);
}
catch(Ice.LocalException ex__)
{
handleException__(delBase__, ex__, null, ref cnt__);
}
}
}
示例7: getACL
private void getACL(int channelid, out Murmur.ACL[] acls, out Murmur.Group[] groups, out bool inherit, _System.Collections.Generic.Dictionary<string, string> context__, bool explicitContext__)
{
if(explicitContext__ && context__ == null)
{
context__ = emptyContext_;
}
int cnt__ = 0;
while(true)
{
Ice.ObjectDel_ delBase__ = null;
try
{
checkTwowayOnly__("getACL");
delBase__ = getDelegate__(false);
ServerDel_ del__ = (ServerDel_)delBase__;
del__.getACL(channelid, out acls, out groups, out inherit, context__);
return;
}
catch(IceInternal.LocalExceptionWrapper ex__)
{
handleExceptionWrapperRelaxed__(delBase__, ex__, null, ref cnt__);
}
catch(Ice.LocalException ex__)
{
handleException__(delBase__, ex__, null, ref cnt__);
}
}
}
示例8: addCallback
public void addCallback(Murmur.ServerCallbackPrx cb)
{
addCallback(cb, null, false);
}
示例9: setBans
public void setBans(Murmur.Ban[] bans, _System.Collections.Generic.Dictionary<string, string> context__)
{
setBans(bans, context__, true);
}
示例10: setChannelState
public void setChannelState(Murmur.Channel state)
{
setChannelState(state, null, false);
}
示例11: removeContextCallback
public void removeContextCallback(Murmur.ServerContextCallbackPrx cb)
{
removeContextCallback(cb, null, false);
}
示例12: setACL
public void setACL(int channelid, Murmur.ACL[] acls, Murmur.Group[] groups, bool inherit)
{
setACL(channelid, acls, groups, inherit, null, false);
}
示例13: stopped
public void stopped(Murmur.ServerPrx srv, _System.Collections.Generic.Dictionary<string, string> context__)
{
IceInternal.Outgoing og__ = handler__.getOutgoing("stopped", Ice.OperationMode.Normal, context__);
try
{
try
{
IceInternal.BasicStream os__ = og__.ostr();
Murmur.ServerPrxHelper.write__(os__, srv);
}
catch(Ice.LocalException ex__)
{
og__.abort(ex__);
}
bool ok__ = og__.invoke();
if(!og__.istr().isEmpty())
{
try
{
if(!ok__)
{
try
{
og__.throwUserException();
}
catch(Ice.UserException ex__)
{
throw new Ice.UnknownUserException(ex__.ice_name(), ex__);
}
}
og__.istr().skipEmptyEncaps();
}
catch(Ice.LocalException ex__)
{
throw new IceInternal.LocalExceptionWrapper(ex__, false);
}
}
}
finally
{
handler__.reclaimOutgoing(og__);
}
}
示例14: setAuthenticator
public void setAuthenticator(Murmur.ServerAuthenticatorPrx auth)
{
setAuthenticator(auth, null, false);
}