/// <summary>
        /// Gets the value.
        /// </summary>
        /// <returns>Value type that must match the type of parameter the control was generated for.</returns>
        public override object GetValue()
        {
            var list = new FieldOperationList();

            foreach (var f in _fields)
            {
                list.AddFieldName(f.Field.Name, f.GroupOperation);
            }

            return(list);
        }
Пример #2
0
        /// <summary>
        /// Validates group operations against specified featureset and displays error message on failure.
        /// </summary>
        public static bool ValidateWithMessage(this FieldOperationList operations, IFeatureSet fs)
        {
            if (!operations.Validate(fs))
            {
                var sb = new StringBuilder("Invalid group operations are found: " + Environment.NewLine);

                foreach (var op in operations.Where(op => !op.OperationIsValid))
                {
                    sb.AppendFormat("{0}: {1}{2}", op.FieldName, op.OperationIsValidReason.EnumToString(), Environment.NewLine);
                }

                MessageService.Current.Warn(sb.ToString());

                return(false);
            }

            return(true);
        }
Пример #3
0
 public static FieldStatOperations GetInternal(this FieldOperationList operations)
 {
     return(operations.InternalObject as FieldStatOperations);
 }