コード例 #1
0
        public DelegationTrackerEventArgs(DelegationStatus status, TexlNode node,
                                          TexlBinding binding, TexlFunction func, DelegationTelemetryInfo logInfo = null)
        {
            Contracts.AssertValue(node);
            Contracts.AssertValue(binding);
            Contracts.AssertValueOrNull(func);
            Contracts.AssertValueOrNull(logInfo);

            Status  = status;
            Node    = node;
            Binding = binding;
            Func    = func;
            LogInfo = logInfo;
        }
コード例 #2
0
        // Marks telemetry in the rule. Needed in canvas, not needed in PowerFx.Core
        // DelegationTracker.SetDelegationTrackerStatus(DelegationStatus.NotANumberArgType, callNode, binding, this, DelegationTelemetryInfo.CreateEmptyDelegationTelemetryInfo());
        public static void SetDelegationTrackerStatus(DelegationStatus status, TexlNode node, TexlBinding binding, TexlFunction func, DelegationTelemetryInfo logInfo = null)
        {
            Contracts.AssertValue(node);
            Contracts.AssertValue(binding);
            Contracts.AssertValue(func);
            Contracts.AssertValueOrNull(logInfo);

            IExternalRule rule;

            // The rule need not exist on ControlInfo yet. This happens when we are attempting
            // to create a namemap in which case we try to bind the rule before adding it to the control.
            if (!TryGetCurrentRule(binding, out rule))
            {
                return;
            }

            rule.SetDelegationTrackerStatus(node, status, logInfo ?? DelegationTelemetryInfo.CreateEmptyDelegationTelemetryInfo(), func);
        }
コード例 #3
0
 internal void SetDelegationTrackerStatus(DelegationStatus status, TexlNode node,
                                          TexlBinding binding, TexlFunction func, DelegationTelemetryInfo logInfo = null)
 {
     DelegationTrackerEvent?.Invoke(this, new DelegationTrackerEventArgs(status, node, binding, func, logInfo));
 }