当前位置: 首页>>代码示例>>C#>>正文


C# ProcessId.ToString方法代码示例

本文整理汇总了C#中LanguageExt.ProcessId.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ProcessId.ToString方法的具体用法?C# ProcessId.ToString怎么用?C# ProcessId.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LanguageExt.ProcessId的用法示例。


在下文中一共展示了ProcessId.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateMessage

 internal static RemoteMessageDTO CreateMessage(object message, ProcessId to, ProcessId sender, Message.Type type, Message.TagSpec tag) =>
     new RemoteMessageDTO()
     {
         Type        = (int)type,
         Tag         = (int)tag,
         To          = to.Path,
         RequestId   = -1,
         MessageId   = Guid.NewGuid(),
         Sender      = sender.ToString(),
         ReplyTo     = sender.ToString(),
         ContentType = message == null
                         ? null
                         : message.GetType().AssemblyQualifiedName,
         Content     = message == null
                         ? null
                         : JsonConvert.SerializeObject(message, ActorConfig.Default.JsonSerializerSettings)
     };
开发者ID:JamesTryand,项目名称:language-ext,代码行数:17,代码来源:UserControlMessage.cs

示例2: ProcessFmt

 private static string ProcessFmt(ProcessId pid) =>
     pid.IsValid
         ? pid.ToString()
         : "no-sender";
开发者ID:JamesTryand,项目名称:language-ext,代码行数:4,代码来源:DeadLetter.cs

示例3: CreateMessage

 internal static RemoteMessageDTO CreateMessage(object message, ProcessId to, ProcessId sender, Message.Type type, Message.TagSpec tag, Option<SessionId> sessionId) =>
     new RemoteMessageDTO
     {
         Type        = (int)type,
         Tag         = (int)tag,
         To          = to.ToString(),
         RequestId   = -1,
         MessageId   = Guid.NewGuid(),
         Sender      = sender.ToString(),
         ReplyTo     = sender.ToString(),
         ContentType = message == null
                         ? null
                         : message.GetType().AssemblyQualifiedName,
         Content     = message == null
                         ? null
                         : JsonConvert.SerializeObject(message, ActorSystemConfig.Default.JsonSerializerSettings),
         SessionId   = sessionId.Map(s => s.Value).IfNoneUnsafe(() => null)
     };
开发者ID:OlduwanSteve,项目名称:language-ext,代码行数:18,代码来源:UserControlMessage.cs

示例4: CreateResponse

 internal static RemoteMessageDTO CreateResponse(ActorResponse res, ProcessId to, ProcessId sender, Option<SessionId> sessionId) =>
     new RemoteMessageDTO
     {
         Type        = (int)Message.Type.User,
         Tag         = (int)Message.TagSpec.UserReply,
         Child       = null,
         Exception   = res.IsFaulted
                         ? "RESPERR"
                         : null,
         To          = to.ToString(),
         RequestId   = res.RequestId,
         MessageId   = Guid.NewGuid(),
         Sender      = res.ReplyFrom.ToString(),
         ReplyTo     = res.ReplyTo.ToString(),
         ContentType = res.Message.GetType().AssemblyQualifiedName,
         Content     = JsonConvert.SerializeObject(res.Message, ActorSystemConfig.Default.JsonSerializerSettings),
         SessionId   = sessionId.Map(s => s.Value).IfNoneUnsafe(() => null)
     };
开发者ID:OlduwanSteve,项目名称:language-ext,代码行数:18,代码来源:UserControlMessage.cs

示例5: CreateRequest

 internal static RemoteMessageDTO CreateRequest(ActorRequest req, ProcessId to, ProcessId sender) =>
     new RemoteMessageDTO
     {
         Type        = (int)Message.Type.User,
         Tag         = (int)Message.TagSpec.UserAsk,
         Child       = null,
         Exception   = null,
         To          = to.Path,
         RequestId   = req.RequestId,
         MessageId   = Guid.NewGuid(),
         Sender      = sender.ToString(),
         ReplyTo     = req.ReplyTo.ToString(),
         ContentType = req.Message.GetType().AssemblyQualifiedName,
         Content     = JsonConvert.SerializeObject(req.Message, ActorSystemConfig.Default.JsonSerializerSettings)
     };
开发者ID:plouh,项目名称:language-ext,代码行数:15,代码来源:UserControlMessage.cs


注:本文中的LanguageExt.ProcessId.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。