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


C# IEndpointInstance.Request方法代码示例

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


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

示例1: Simple

 async void Simple(IEndpointInstance endpoint, SendOptions sendOptions, ILog log)
 {
     #region EnumCallback
     Message message = new Message();
     Status response = await endpoint.Request<Status>(message, sendOptions);
     log.Info("Callback received with response:" + response);
     #endregion
 }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:8,代码来源:Usage.cs

示例2: SendEnumMessage

    static async Task SendEnumMessage(IEndpointInstance endpointInstance)
    {
        Console.WriteLine("Message sent");
        #region SendEnumMessage

        EnumMessage message = new EnumMessage();
        SendOptions sendOptions = new SendOptions();
        sendOptions.SetDestination("Samples.Callbacks.Receiver");
        Status status = await endpointInstance.Request<Status>(message, sendOptions);
        Console.WriteLine("Callback received with status:" + status);
        #endregion
    }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:12,代码来源:Program.cs

示例3: Simple

        async Task Simple(IEndpointInstance endpoint, SendOptions sendOptions, ILog log)
        {

            #region IntCallback

            var message = new Message();
            var response = await endpoint.Request<int>(message, sendOptions)
                .ConfigureAwait(false);
            log.Info("Callback received with response:" + response);

            #endregion
        }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:12,代码来源:Usage.cs

示例4: Simple

        async Task Simple(EndpointConfiguration endpointConfiguration, IEndpointInstance endpoint, SendOptions sendOptions)
        {
            #region 5to6-Callbacks-InstanceId
            endpointConfiguration.ScaleOut().InstanceDiscriminator("uniqueId");
            #endregion

            #region 5to6-Callbacks

            RequestMessage message = new RequestMessage();
            ResponseMessage response = await endpoint.Request<ResponseMessage>(message, sendOptions);

            #endregion
        }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:13,代码来源:Callbacks.cs

示例5: SendIntMessage

    static async Task SendIntMessage(IEndpointInstance endpointInstance)
    {
        Console.WriteLine("Message sent");
        #region SendIntMessage

        IntMessage message = new IntMessage();
        SendOptions sendOptions = new SendOptions();
        sendOptions.SetDestination("Samples.Callbacks.Receiver");
        int response = await endpointInstance.Request<int>(message, sendOptions);
        Console.WriteLine("Callback received with response:" + response);

        #endregion
    }
开发者ID:odelljl,项目名称:docs.particular.net,代码行数:13,代码来源:Program.cs

示例6: SendObjectMessage

    static async Task SendObjectMessage(IEndpointInstance endpointInstance)
    {
        Console.WriteLine("Message sent");

        #region SendObjectMessage

        var message = new ObjectMessage();
        var sendOptions = new SendOptions();
        sendOptions.SetDestination("Samples.Callbacks.Receiver");
        var response = await endpointInstance.Request<ObjectResponseMessage>(message, sendOptions)
            .ConfigureAwait(false);
        Console.WriteLine("Callback received with response property value:" + response.Property);

        #endregion
    }
开发者ID:chriscatilo,项目名称:docs.particular.net,代码行数:15,代码来源:Program.cs


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