Ejemplo n.º 1
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (!string.IsNullOrEmpty((string)value))
            {
                IDynamics365TeamsProvider provider = (IDynamics365TeamsProvider)context.Instance;
                List <Dynamics365Team>    teams    = provider.GetTeams();
                string id = Regex.Match((string)value, CoreUtility.FieldMatchPattern).Groups[1].Value;
                return(teams.FirstOrDefault(x => x.ID.ToString() == id));
            }

            return(null);
        }
Ejemplo n.º 2
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            IDynamics365TeamsProvider provider = (IDynamics365TeamsProvider)context.Instance;

            return(new StandardValuesCollection(provider.GetTeams()));
        }