예제 #1
0
        public string GetValue(ICrateStorage payloadCrateStorage)
        {
            switch (ValueSource)
            {
            case null:
            case SpecificValueSource:
                return(TextValue);

            case UpstreamValueSrouce:
                if (payloadCrateStorage == null)
                {
                    throw new Exception("Can't resolve upstream value without payload crate storage provided");
                }
                //This is for backward compatibility as controls in existing activites may not be reconfigured to use full field information
                if (SelectedItem == null)
                {
                    return(payloadCrateStorage.FindField(this.selectedKey));
                }
                return(payloadCrateStorage.FindField(SelectedItem));

            default:
                return(null);
            }
        }