예제 #1
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            if (!string.IsNullOrEmpty((string)value))
            {
                IDynamics365SolutionsProvider provider  = (IDynamics365SolutionsProvider)context.Instance;
                List <Dynamics365Solution>    solutions = provider.GetSolutions();
                string schemaName = Regex.Match((string)value, CoreUtility.FieldMatchPattern).Groups[1].Value;
                return(solutions.FirstOrDefault(solution => solution.UniqueName == schemaName));
            }

            return(null);
        }
예제 #2
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            IDynamics365SolutionsProvider provider = (IDynamics365SolutionsProvider)context.Instance;

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