コード例 #1
0
        public override void ExecuteInternal(ILocalWorkflowActivityContext localContext)
        {
            //get the passed in value name and default return
            var key          = this.SettingName.Get(localContext.CodeActivityContext);
            var defaultValue = this.DefaultValue.Get(localContext.CodeActivityContext);

            //pull from ExtensionSettings and return default if value is not in the settings.
            var value = localContext.ExtensionSettings.Get <int>(key, defaultValue);

            //return the value
            this.SettingValue.Set(localContext.CodeActivityContext, value);
        }
コード例 #2
0
        public virtual bool ConfigureTelemetrySink(ILocalWorkflowActivityContext localContext)
        {
            if (localContext != null)
            {
                var key = localContext.ExtensionSettings.Get <string>("Telemetry.InstrumentationKey");

                if (!string.IsNullOrEmpty(key))
                {
                    localContext.TracingService.Trace("Retrieved Telemetry Instrumentation Key.");
                    TelemetrySink.ProcessChain.TelemetryProcessors.Add(new SequencePropertyProcessor());
                    TelemetrySink.ProcessChain.TelemetryProcessors.Add(new InstrumentationKeyPropertyProcessor(key));

                    return(true); //telemetry sink is configured.
                }
            }

            return(false); //telmetry sink is not configured.
        }
コード例 #3
0
 /// <summary>
 /// Handler that must be implemented in inheriting class to do the actual work of the WFA.
 /// </summary>
 /// <param name="localContext">Instance of <see cref="ILocalWorkflowActivityContext"/> passed
 /// in from <see cref="Execute(CodeActivityContext)"/>.</param>
 public abstract void ExecuteInternal(ILocalWorkflowActivityContext localContext);
コード例 #4
0
 public override void ExecuteInternal(ILocalWorkflowActivityContext localContext)
 {
     throw new System.NotImplementedException();
 }