コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataTriggerListFieldMapping"/> class.
 /// </summary>
 /// <param name="sourceDataProcessName">
 /// The source data process name.
 /// </param>
 /// <param name="sourceDataFilterDefinition">
 /// The source data filter definition.
 /// </param>
 /// <param name="destinationFieldName">
 /// Name of the destination field.
 /// </param>
 /// <param name="modificationType">
 /// Type of the modification.
 /// </param>
 /// <param name="fields">
 /// The fields.
 /// </param>
 public DataTriggerListFieldMapping(
     string sourceDataProcessName,
     string sourceDataFilterDefinition,
     string destinationFieldName,
     DataTriggerModificationType modificationType,
     IEnumerable<DataTriggerFieldMapping> fields)
 {
     _dataSources = new ReadOnlyCollection<FieldMappingDataSourceDefinition>(new FieldMappingDataSourceDefinition[0]);
     _sourceDataProcessName = sourceDataProcessName;
     _sourceDataFilterDefinition = sourceDataFilterDefinition;
     _destinationFieldName = destinationFieldName;
     _modificationType = modificationType;
     _fields = new ReadOnlyCollection<DataTriggerFieldMapping>(new List<DataTriggerFieldMapping>(fields));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataTriggerListFieldMapping"/> class.
 /// </summary>
 /// <param name="dataSources">
 /// The data sources.
 /// </param>
 /// <param name="destinationFieldName">
 /// Name of the destination field.
 /// </param>
 /// <param name="modificationType">
 /// Type of the modification.
 /// </param>
 /// <param name="fields">
 /// The fields.
 /// </param>
 public DataTriggerListFieldMapping(
     IEnumerable<FieldMappingDataSourceDefinition> dataSources,
     string destinationFieldName,
     DataTriggerModificationType modificationType,
     IEnumerable<DataTriggerFieldMapping> fields)
 {
     _dataSources = new ReadOnlyCollection<FieldMappingDataSourceDefinition>(dataSources.ToArray());
     _destinationFieldName = destinationFieldName;
     _modificationType = modificationType;
     _fields = new ReadOnlyCollection<DataTriggerFieldMapping>(new List<DataTriggerFieldMapping>(fields));
 }
コード例 #3
0
        private static bool IsMappingExpressionSupported(DataTriggerModificationType modificationType)
        {
            switch (modificationType)
            {
                case DataTriggerModificationType.Insert:
                case DataTriggerModificationType.Update:
                case DataTriggerModificationType.StartVersion:
                case DataTriggerModificationType.Self:
                    return true;

                default:
                    return false;
            }
        }
コード例 #4
0
 private static bool IsFilterSupported(DataTriggerModificationType modificationType)
 {
     return modificationType != DataTriggerModificationType.Insert && modificationType != DataTriggerModificationType.Self;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataTriggerDefinition"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="guid">The unique identifier.</param>
 /// <param name="processToModifySystemName">Name of the process to modify system.</param>
 /// <param name="filterDefinition">The filter definition.</param>
 /// <param name="modificationType">Type of the modification.</param>
 /// <param name="rules">The rules.</param>
 /// <param name="map">The map.</param>
 public DataTriggerDefinition(
     string name,
     Guid guid,
     string processToModifySystemName,
     string filterDefinition,
     DataTriggerModificationType modificationType,
     IEnumerable<IActionRule> rules,
     DataTriggerMap map)
 {
     _name = name;
     _guid = guid;
     _processToModifySystemName = processToModifySystemName;
     _filterDefinition = filterDefinition;
     _modificationType = modificationType;
     _rules = new List<IActionRule>(rules);
     _map = map;
     _triggerType = DataTriggerTypes.Process;
 }
コード例 #6
0
 private static bool IsLinkOrUnlink(DataTriggerModificationType modificationType)
 {
     return modificationType == DataTriggerModificationType.Link || modificationType == DataTriggerModificationType.Unlink;
 }