示例#1
0
        /// <summary>
        /// To View Property
        /// </summary>
        /// <param name="input">Custom View Property</param>
        /// <returns>View Proerty</returns>
        public static ViewProperty ToViewProperty(this CustomViewProperty input)
        {
            List <Policy> policies = new List <Policy>();
            CustomAvailableSelectionPolicy customAvailableSelectionPolicy = input.AvailableSelectionPolicy;

            if (customAvailableSelectionPolicy != null)
            {
                policies.Add(customAvailableSelectionPolicy.ToAvailableSelectionPolicy());
            }
            return(new ViewProperty()
            {
                DisplayName = input.DisplayName,
                Name = input.Name,
                OriginalType = input.OriginalType,
                RawValue = input.RawValue ?? string.Empty,
                Value = input.Value ?? string.Empty,
                Policies = policies
            });
        }
 set => SetValue(CustomViewProperty, value);