本文整理汇总了C#中Message.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# Message.Accept方法的具体用法?C# Message.Accept怎么用?C# Message.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Message
的用法示例。
在下文中一共展示了Message.Accept方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Process
/// <inheritdoc/>
public void Process(Message message)
{
message.Accept(this);
++Model.MessageCount;
Model.LastMessageReceivedOn = SysClock.Now();
}
示例2: IsTranslated
public bool IsTranslated(Message message)
{
Result = false;
message.Accept(this);
return Result;
}
示例3: Process
/// <summary>
/// Processes the specified <paramref name="message"/>.
/// </summary>
/// <param name="message">The message to process.</param>
/// <returns><see langword="true"/> if a delay message was processed, otherwise;
/// <see langword="false"/>.</returns>
/// <exception cref="System.ArgumentNullException">
/// Thrown when <paramref name="message"/> is <see langword="null"/>.
/// </exception>
public bool Process(Message message)
{
Guard.NotNull(message, "message");
Delayed = false;
message.Accept(this);
return Delayed;
}
示例4: Process
/// <inheritdoc/>
public void Process(Message message)
{
Guard.NotNull(message, "message");
message.Accept(this);
Drivers.Process(message);
Model.Feed.Process(message);
Model.FastestTimes.Process(message);
Model.Grid.Process(message);
Model.Messages.Process(message);
Model.SpeedCaptures.Process(message);
Model.Weather.Process(message);
}
示例5: Process
/// <inheritdoc/>
public void Process(Message message)
{
message.Accept(this);
}
示例6: Translate
/// <summary>
/// Attempts to translate the specified <paramref name="message"/>.
/// </summary>
/// <param name="message">The message to translate.</param>
/// <returns>The translated message if possible, otherwise; <see langword="null"/>.</returns>
public Message Translate(Message message)
{
Guard.NotNull(message, "message");
Translated = null;
message.Accept(this);
StateEngine.Process(message);
if(Translated != null)
{
StateEngine.Process(Translated);
}
return Translated;
}