小编Nat*_*ate的帖子

如何使用正则表达式将','除非','括在字符串中?

编辑:任何人都可以帮助我使用正则表达式为这样的字符串?:

[Header 1], [Head,er 2], Header 3

这样我就可以把它分成几块:

[Header 1]
[Head,er 2]
Header 3

我已经达到了这个目的:

(?<=,|^).*?(?=,|$)
Run Code Online (Sandbox Code Playgroud)

哪个会给我:

[Header 1]
[Head
,er 2]
Header 3

regex string

11
推荐指数
2
解决办法
6171
查看次数

为什么此插件代码中的CRM 2011实体关系为空?

这是我为CRM 2011编写的插件的一个工作示例.我在此插件的插件注册工具中创建了一个"创建"步骤.这执行得很好.我还为插件注册了"更新"步骤.由于返回的主要联系人为空,因此无法执行.这些步骤都注册为异步.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xrm.Sdk;
using System.ServiceModel;
using System.IO;
using System.Net;

namespace CRMNewsletterPlugin
{
    public class NewsletterSignup : IPlugin
    {
        public void Execute(IServiceProvider serviceProvider)
        {
            ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
            // Obtain the execution context from the service provider.
            IPluginExecutionContext context = (IPluginExecutionContext)
            serviceProvider.GetService(typeof(IPluginExecutionContext));

            tracingService.Trace("Begin load");
            // The InputParameters collection contains all the data passed in the message request.
            if (context.InputParameters.Contains("Target") &&
            context.InputParameters["Target"] is Entity)
            {
                tracingService.Trace("We have a target.");
                // Obtain the target …
Run Code Online (Sandbox Code Playgroud)

.net plugins dynamics-crm-2011

3
推荐指数
1
解决办法
2851
查看次数

标签 统计

.net ×1

dynamics-crm-2011 ×1

plugins ×1

regex ×1

string ×1