本文整理汇总了C#中Messages类的典型用法代码示例。如果您正苦于以下问题:C# Messages类的具体用法?C# Messages怎么用?C# Messages使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Messages类属于命名空间,在下文中一共展示了Messages类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: sendMessage
public override void sendMessage(Messages.AbstractMessage message)
{
foreach (AbstractTransever trans in base.connections)
{
trans.sendMessage(message);
}
}
开发者ID:thedamoes,项目名称:Gravitation,代码行数:7,代码来源:TCPServerTransever.cs
示例2: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
uint RoomId = Packet.PopWiredUInt();
string Password = Packet.PopFixedString();
Session.GetMessageHandler().PrepareRoomForUser(RoomId, Password);
}
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:7,代码来源:OpenFlatConnectionEvent.cs
示例3: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
Session.SendMessage(new UserObjectComposer(Session.GetHabbo()));
Session.SendMessage(new UserPerksComposer());
Session.GetHabbo().InitMessenger(); // Temporary fixxx
}
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:7,代码来源:InfoRetrieveEvent.cs
示例4: HandleChatMessage
private void HandleChatMessage(Messages.ChatMessage chatMessageMsg)
{
if (chatMessageMsg.From == _userName)
_serverActor.Tell(chatMessageMsg);
else
_consoleActor.Tell(new Messages.StatusMessage(chatMessageMsg.Message,StatusMessageType.Success));
}
开发者ID:jagmeet-chaudhary,项目名称:ChatApp,代码行数:7,代码来源:ChatClientActor.cs
示例5: InterceptResponse
public void InterceptResponse(ref Messages.InterDomainMessageResponse response)
{
RoutedInterDomainMessage ridm = (RoutedInterDomainMessage)response.Message;
lock (_postRequestors)
{
foreach (sRoute srt in ridm.PostInterceptRoutes)
{
if (_postRequestors.ContainsKey(srt))
{
foreach (IInterDomainMessagePostRequestInterceptor idmpri in _postRequestors[srt])
{
if (!response.HasIntercepted(idmpri.GetType()))
{
object tmp;
idmpri.InterceptResponse(response, out tmp);
if (tmp != null)
{
response = Messages.InterDomainMessageResponse.SwapResponse(response, tmp);
response.MarkInterceptor(idmpri.GetType());
}
}
}
}
}
}
}
开发者ID:roger-castaldo,项目名称:MultiDomain,代码行数:26,代码来源:MessageController.cs
示例6: subCallback
public void subCallback(Messages.std_msgs.String msg)
{
Dispatcher.Invoke(new Action(() =>
{
l.Content = "Receieved:\n" + msg.data;
}), new TimeSpan(0,0,1));
}
开发者ID:rvlietstra,项目名称:ROS.NET,代码行数:7,代码来源:MainWindow.xaml.cs
示例7: MessageSent
public void MessageSent(int chatId, int UsrId, Messages message)
{
if (_connections.IfExists(UsrId))
{
Clients.Client(_connections.GetConnection(UsrId)).NewChatCreated(message);
}
}
开发者ID:BKova,项目名称:DUMPIC-HotSale,代码行数:7,代码来源:ChatHub.cs
示例8: Resolve
public string Resolve(Messages.Field field)
{
var f = spec.Fields.Single(c => c.Name == field.Name);
var fixType = f.Type;
var clrType = typeMap[fixType];
var @enum = f.Values.Any();
if (@enum && clrType == "bool")
{
return clrType;
}
else if (@enum)
{
return field.Name;
}
else
{
var nullableMark = string.Empty;
if (field.Required == false && clrType != "string")
{
nullableMark = "?";
}
return string.Format("{0}{1}", clrType, nullableMark);
}
}
开发者ID:unreadable,项目名称:QuickFixn.Wrapper,代码行数:26,代码来源:TypeResolver.cs
示例9: HandleChatMessage
private void HandleChatMessage(Messages.ChatMessage chatMessage)
{
foreach(var participant in _participants.Where(x=>x.Key != chatMessage.From))
{
participant.Value.Tell(chatMessage);
}
}
开发者ID:jagmeet-chaudhary,项目名称:ChatApp,代码行数:7,代码来源:ChatServerActor.cs
示例10: Post
public MessagesResponse Post(Messages request)
{
if (request.Message.Id > 0)
{
Bm2s.Data.Common.BLL.User.Message item = Datas.Instance.DataStorage.Messages[request.Message.Id];
item.Body = request.Message.Body;
item.IsShortMessage = request.Message.IsShortMessage;
item.SendDate = request.Message.SendDate;
item.Subject = request.Message.Subject;
item.UserId = request.Message.User.Id;
}
else
{
Bm2s.Data.Common.BLL.User.Message item = new Data.Common.BLL.User.Message()
{
Body = request.Message.Body,
IsShortMessage = request.Message.IsShortMessage,
SendDate = request.Message.SendDate,
Subject = request.Message.Subject,
UserId = request.Message.User.Id
};
Datas.Instance.DataStorage.Messages.Add(item);
request.Message.Id = item.Id;
}
MessagesResponse response = new MessagesResponse();
response.Messages.Add(request.Message);
return response;
}
开发者ID:Csluikidikilest,项目名称:Bm2sServer,代码行数:30,代码来源:MessagesService.cs
示例11: Process
private static Response Process(string input, string[] args)
{
try
{
switch (args[0])
{
case "compile":
return Compiler.Compile(JsonConvert.DeserializeObject<CompileRequest>(input));
case "nunit":
return NUnitTester.Test(JsonConvert.DeserializeObject<TestRequest>(input));
case "nugetpack":
return NuGetter.Pack(JsonConvert.DeserializeObject<NuGetPackRequest>(input));
case "nugetpush":
return NuGetter.Push(JsonConvert.DeserializeObject<NuGetPushRequest>(input));
case "nugetrestore":
return NuGetter.Restore(JsonConvert.DeserializeObject<NuGetRestoreRequest>(input));
default:
throw new ApplicationException("Unsupported type '" + args[0] + "'");
}
}
catch (Exception e)
{
var messages = new Messages();
messages.Add(Message.CreateError(e.ToString()));
return new Response(messages);
}
}
开发者ID:penartur,项目名称:micro-build-server,代码行数:27,代码来源:Program.cs
示例12: HandleRegisterUser
private void HandleRegisterUser(Messages.RegisterUser x)
{
if(!string.IsNullOrEmpty(x.UserName))
{
registeredUsers.Add(x.UserName);
}
}
开发者ID:jagmeet-chaudhary,项目名称:ChatApp,代码行数:7,代码来源:ChatServerCoordinatorActor.cs
示例13: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
Silverwave.HabboHotel.Users.Habbo targetHabbo = Session.GetHabbo();
if (targetHabbo == null)
{
return;
}
uint Id = Packet.PopWiredUInt();
RoomData Data = SilverwaveEnvironment.GetGame().GetRoomManager().GenerateRoomData(Id);
if (Data == null || Session.GetHabbo().FavoriteRooms.Count >= 30 || Session.GetHabbo().FavoriteRooms.Contains(Id))
{
// send packet that favourites is full.
return;
}
Session.GetHabbo().FavoriteRooms.Add(Id);
Session.SendMessage(new UpdateFavouriteRoomComposer(Id, true));
using (IQueryAdapter dbClient = SilverwaveEnvironment.GetDatabaseManager().getQueryreactor())
{
dbClient.runFastQuery("INSERT INTO user_favorites (user_id,room_id) VALUES (" + Session.GetHabbo().Id + "," + Id + ")");
}
}
开发者ID:BjkGkh,项目名称:Custom-R2,代码行数:26,代码来源:AddFavouriteRoomEvent.cs
示例14: Messages
//
// GET: /account/messages/{accountName}/{number}
// GET: /account/messages/name={accountName}/{number}
// GET: /account/messages/id={accountId}/{number}
public ActionResult Messages(string accountName, Guid? accountId, int number)
{
Answer output;
try
{
if (accountId == null && accountName == null)
{
output = new Answer(new Error("Account missing"));
Response.StatusCode = 400; // Bad Request
}
else
{
var realId = accountId ?? Storage.Account.GetId(accountName);
// get lasts messages from account accoutName
var personalListId = Storage.List.GetPersonalList(realId);
var listMsgs = Storage.Msg.GetListsMsgTo(new HashSet<Guid> {personalListId}, DateTime.Now, number);
// convert, looking forward XML serialization
var listMsgsOutput = new Messages(listMsgs, Storage);
output = new Answer(listMsgsOutput);
}
}
catch (Exception exception)
{
// Result is an non-empty error XML element
output = new Answer(HandleError(exception));
}
return Serialize(output);
}
开发者ID:ismaelbelghiti,项目名称:Tigwi,代码行数:37,代码来源:AccountController.cs
示例15: SearchReceivedEventArgs
internal SearchReceivedEventArgs(Messages.DiscoveryMessage message, System.Net.IPEndPoint sender)
{
ServiceType = message.Service.ServiceType;
MaxWaitTime = message.MaxWaitTime;
ReceivedContent = message.Content;
Sender = sender;
}
开发者ID:simongh,项目名称:Discovery,代码行数:7,代码来源:SearchReceivedEventArgs.cs
示例16: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
if (System.Configuration.PopBoolean("MOTD.Notifitation.Enabled"))
{
Session.WriteComposer(new MOTDNotificationComposer(System.Configuration.PopString("MOTD.Notifitation.Message")));
}
}
开发者ID:devMextur,项目名称:Tazqon,代码行数:7,代码来源:Global.cs
示例17: ProtobufMessageEncodingBindingElement
static ProtobufMessageEncodingBindingElement()
{
//TODO: use http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx
//TODO: or http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx
//NOTE: used compiled messages to save start uo time
_proto = new Messages();
}
开发者ID:OpenSharp,项目名称:NDceRpc,代码行数:7,代码来源:ProtobufMessageEncodingBindingElement+.cs
示例18: Invoke
public void Invoke(Session Session, Messages.PacketEvent Packet)
{
string Name = Packet.PopString();
string Model = Packet.PopString();
System.IOStreamer.AppendLine("Caption: {0}, Model: {1}", Name, Model);
}
开发者ID:devMextur,项目名称:Tazqon,代码行数:7,代码来源:Navigator.cs
示例19: Parse
public void Parse(HabboHotel.GameClients.GameClient Session, Messages.ClientMessage Packet)
{
string Junk = Packet.PopFixedString();
string MachineId = Packet.PopFixedString();
Session.MachineId = MachineId;
}
开发者ID:BjkGkh,项目名称:07052014,代码行数:7,代码来源:UniqueIDEvent.cs
示例20: rosoutCallback
public static void rosoutCallback(Messages.rosgraph_msgs.Log msg)
{
string pfx = "[?]";
switch (msg.level)
{
case Log.DEBUG:
pfx = "[DEBUG]";
break;
case Log.ERROR:
pfx = "[ERROR]";
break;
case Log.FATAL:
pfx = "[FATAL]";
break;
case Log.INFO:
pfx = "[INFO]";
break;
case Log.WARN:
pfx = "[WARN]";
break;
}
TimeData td = ROS.GetTime().data;
Console.WriteLine("["+td.sec+"."+td.nsec+"]: "+pfx+": "+msg.msg+" ("+msg.file+" ("+msg.function+" @"+msg.line+"))");
pub.publish(msg);
}
开发者ID:rvlietstra,项目名称:ROS.NET,代码行数:25,代码来源:RosOut.cs
注:本文中的Messages类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论