コード例 #1
0
        public IPluginExecutionContext Next(int stage, int dept, string message, string primaryEntityName, Guid primaryEntityId, bool async)
        {
            var next = new PluginExecutionContext(stage, dept, message, primaryEntityName, primaryEntityId, async);

            next.parentContext = this;
            return(next);
        }
コード例 #2
0
        public static PluginExecutionContext ForMethodWithTarget(System.Reflection.MethodInfo method, Microsoft.Xrm.Sdk.Entity target)
        {
            var stage   = method.Name.ToStage();
            var message = method.Name.ToMessage();

            var result = new PluginExecutionContext(stage, 0, message, target.LogicalName, target.Id, method.Name.Contains("Async"));

            result.InputParameters["Target"] = target;
            return(result);
        }