Exemplo n.º 1
0
            public IBuilderWithConstraints Where(FieldProperty property, Action <IConstraintBuilder> constraintBuilderHandler)
            {
                switch (property)
                {
                case FieldProperty.Id:
                case FieldProperty.OptionMaster:
                    return(Where <IConstraintBuilder>(property, constraintBuilderHandler, () => new IdConstraintBuilder()));

                case FieldProperty.Height:
                case FieldProperty.Max:
                case FieldProperty.Min:
                case FieldProperty.OptionCount:
                case FieldProperty.Scale:
                case FieldProperty.TextLength:
                    return(Where <IConstraintBuilder>(property, constraintBuilderHandler, () => new NumberConstraintBuilder()));

                case FieldProperty.Deleted:
                case FieldProperty.Enabled:
                case FieldProperty.Highlight:
                case FieldProperty.Forced:
                case FieldProperty.Match:
                case FieldProperty.Searchable:
                case FieldProperty.Required:
                case FieldProperty.Web:
                case FieldProperty.Copy:
                    return(Where <IConstraintBuilder>(property, constraintBuilderHandler, () => new BoolConstraintBuilder()));

                default:
                    return(Where <IConstraintBuilder>(property, constraintBuilderHandler, () => new ConstraintBuilder()));
                }
            }
Exemplo n.º 2
0
            private IBuilderWithConstraints Where <T>(FieldProperty property, Action <T> constraintBuilderHandler, Func <T> builderFactory) where T : IConstraintBuilder
            {
                var builder = builderFactory();

                // id is special case - id should always be a id constraint builder, so casting should be safe here.
                if (property == FieldProperty.Id)
                {
                    ((IdConstraintBuilder)(object)builder).Append(ids);
                }
                else if (constraints.ContainsKey(property))
                {
                    builder.Append(constraints[property]);
                }

                constraintBuilderHandler(builder);

                // again id special case
                if (property == FieldProperty.Id)
                {
                    ids = ((IdConstraintBuilder)(object)builder).Build();
                }
                else
                {
                    constraints[property] = builder.ToList();
                }
                return(this);
            }
Exemplo n.º 3
0
        static private DataSet GreateSchemaDs()
        {
            DataSet ds = new DataSet("PivotGridLayout");

            ds.Tables.AddRange(new DataTable[] { FieldProperty.GreateSchemaDt(), OptionsView.GreateSchemaDt() });

            return(ds);
        }
Exemplo n.º 4
0
        /// <summary>
        ///     生成查询语句
        /// </summary>
        /// <returns></returns>
        protected new string GenerateSelectSql(Type type, string where = "")
        {
            if (!string.IsNullOrEmpty(where))
            {
                if (!where.TrimStart().StartsWith("WHERE", StringComparison.CurrentCultureIgnoreCase))
                {
                    where = " WHERE " + where;
                }
            }
            var selectSql = new StringBuilder("SELECT ");
            List <FieldProperty> fpmap       = FieldProperty.GetFieldPropertys(type);
            List <FieldProperty> tables      = FieldProperty.GetTables(type);
            FieldProperty        masterTable = fpmap.FirstOrDefault(p => string.IsNullOrEmpty(p.MasterTableField));

            foreach (FieldProperty item in fpmap)
            {
                if (string.IsNullOrEmpty(item.FieldAlias))
                {
                    selectSql.AppendFormat("{0}.[{1}],", item.TableAlias, item.FieldName);
                }
                else
                {
                    selectSql.AppendFormat("{0}.[{1}] {2},", item.TableAlias, item.FieldName, item.FieldAlias);
                }
            }

            //增加扩展字段
            //Type type = typeof(T);
            PropertyInfo[] propertyInfos = type.GetProperties();
            foreach (PropertyInfo info in propertyInfos)
            {
                ExtendedAttribute extended = ExtendedAttribute.GetAttribute(info);
                if (extended != null)
                {
                    var extSql = extended.ExtendedSql;
                    foreach (FieldProperty item in tables)
                    {
                        extSql = extSql.RegexReplace(" " + item.TableName + ".", " " + item.TableAlias + ".", true)
                                 .RegexReplace("(" + item.TableName + ".", "(" + item.TableAlias + ".", true)
                                 .RegexReplace("=" + item.TableName + ".", "=" + item.TableAlias + ".", true);
                    }
                    selectSql.Append("(" + extSql + ") " + info.Name + ",");
                }
            }

            selectSql = selectSql.Remove(selectSql.Length - 1, 1);
            selectSql.AppendLine();
            selectSql.AppendLine(" FROM ");
            selectSql.Append(" " + "".PadLeft(tables.Count - 1, '('));
            selectSql.AppendFormat(" [{0}] {1} ", masterTable.TableName, masterTable.TableAlias);

            string strSql = LeftJoinWhere(where, tables, masterTable, selectSql);

            return(strSql);
        }
Exemplo n.º 5
0
        private void fieldList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (fieldList.SelectedItems.Count == 0 || !(fieldList.SelectedItems[0].Tag is FieldProperty))
            {
                return;
            }

            FieldProperty properties = (FieldProperty)fieldList.SelectedItems[0].Tag;

            propertyGrid.SelectedObject = properties;
        }
Exemplo n.º 6
0
        public Query(string entity, string select, string filter, string orderby, XElement schema, ParameterCollection parameters)
        {
            Entity     = entity;
            Schema     = new XElement(schema);
            Parameters = parameters;

            //
            Select = new Select(string.IsNullOrWhiteSpace(select) ? "*" : select, Entity, Schema);
            List <string>        parameterList = new List <string>();
            IEnumerable <string> properties    = Select.Properties;

            if (!string.IsNullOrWhiteSpace(filter))
            {
                Filter     = new Filter(filter, Entity, Schema);
                properties = properties.Union(Filter.Properties);
                parameterList.AddRange(Filter.Parameters);
            }
            if (!string.IsNullOrWhiteSpace(orderby))
            {
                Orderby    = new Orderby(orderby, Entity, Schema);
                properties = properties.Union(Orderby.Orders.Select(o => o.Property));
            }

            //
            List <Property> propertyList = new List <Property>();
            XElement        entitySchema = Schema.GetEntitySchema(Entity);

            foreach (string property in properties)
            {
                Property oProperty;

                XElement propertySchema = entitySchema.Elements(SchemaVocab.Property).FirstOrDefault(x => x.Attribute(SchemaVocab.Name).Value == property);
                if (propertySchema == null)
                {
                    if (!property.Contains("."))
                    {
                        throw new SyntaxErrorException(string.Format(ErrorMessages.NotFoundProperty, property, Entity));
                    }

                    oProperty = ExtendProperty.GenerateExtendProperty(property, Entity, schema);
                }
                else
                {
                    oProperty = FieldProperty.Create(property, entity, Schema);
                }

                propertyList.Add(oProperty);
            }

            Properties = new PropertyCollection(propertyList, this);

            Parameters.UnionParameters(parameterList);
        }
Exemplo n.º 7
0
        // for $expand
        public void UnionFieldProperties(IEnumerable <string> fieldProperties)
        {
            foreach (string property in fieldProperties)
            {
                if (_query.Properties.Any(p => p.Name == property))
                {
                    continue;
                }

                Property oProperty = FieldProperty.Create(property, _query.Entity, _query.Schema);
                _properties.Add(oProperty);
            }
        }
Exemplo n.º 8
0
 private void InitFieldReader()
 {
     FieldProperty[] select = new FieldProperty[] { FieldProperty.Id, FieldProperty.Name, FieldProperty.Enabled };
     ClientFieldReader    = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Client)); }, select);
     ActivityFieldReader  = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Activity)); }, select);
     ResumeFieldReader    = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Resume)); }, select);
     JobFieldReader       = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Job)); }, select);
     ContractFieldReader  = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Contract)); }, select);
     ProcessFieldReader   = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Process)); }, select);
     CandidateFieldReader = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Person)); }, select);
     RecruiterFieldReader = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Recruiter)); }, select);
     SalesFieldReader     = new HrbcFieldReader((builder) => { return(builder.WhereDeleted(false).WhereResource(ResourceId.Sales)); }, select);
 }
Exemplo n.º 9
0
        static public void ApplyLayOutFromPivotGrid(PivotGridControl pivotGrid, DataSet ds)
        {
            try
            {
                if (ds == null)
                {
                    return;
                }

                FieldProperty.LoadXml_FieldProperty(pivotGrid, ds);
                OptionsView.LoadXml_OtionsView(pivotGrid, ds);
            }
            catch { }
        }
Exemplo n.º 10
0
            protected override string GetFieldPropertyName(FieldProperty property)
            {
                switch (property)
                {
                case FieldProperty.Name:
                case FieldProperty.Id:
                case FieldProperty.Resource:
                case FieldProperty.DataType:
                    return(base.GetFieldPropertyName(property));

                default:
                    return("properties/" + base.GetFieldPropertyName(property));
                }
            }
Exemplo n.º 11
0
        public MainWindowViewModel(
            [NotNull] IAppSettings appSettings
            )
        {
            Working      = new FieldProperty <bool>();
            OnlySave     = new FieldProperty <bool>();
            SavePlusMess = new FieldProperty <bool>(true);
            OnlyMess     = new FieldProperty <bool>();

            PopupBoxText  = new FieldProperty <string>(appSettings.PopupMessage);
            MessagesCount = new FieldProperty <int>(1);

            CurrentApk  = new FieldProperty <string>();
            CurrentSave = new FieldProperty <string>();

            BackupType = new DelegatedProperty <BackupType>(
                valueResolver: () => appSettings.BackupType,
                valueApplier: value => appSettings.BackupType = value
                ).DependsOn(appSettings, nameof(IAppSettings.BackupType));

            AppTheme = new DelegatedProperty <string>(
                valueResolver: () => appSettings.Theme,
                valueApplier: value => appSettings.Theme = value
                ).DependsOn(appSettings, nameof(IAppSettings.Theme));

            AlternativeSigning = new DelegatedProperty <bool>(
                valueResolver: () => appSettings.AlternativeSigning,
                valueApplier: value => appSettings.AlternativeSigning = value
                ).DependsOn(appSettings, nameof(IAppSettings.AlternativeSigning));

            NotificationsEnabled = new DelegatedProperty <bool>(
                valueResolver: () => appSettings.Notifications,
                valueApplier: value => appSettings.Notifications = value
                ).DependsOn(appSettings, nameof(IAppSettings.Notifications));

            Title = new DelegatedProperty <string>(
                valueResolver: FormatTitle,
                valueApplier: null
                ).DependsOn(CurrentApk).AsReadonly();

            EnIsChecked = new DelegatedProperty <bool>(
                valueResolver: () => Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToLower() == "en",
                valueApplier: null
                ).AsReadonly();

            RuIsChecked = new DelegatedProperty <bool>(
                valueResolver: () => !EnIsChecked.Value,
                valueApplier: null
                ).DependsOn(EnIsChecked).AsReadonly();
        }
Exemplo n.º 12
0
        internal static string GetFieldName(FieldProperty propterty)
        {
            switch (propterty)
            {
            case FieldProperty.Id: return("id");

            case FieldProperty.Alias: return("alias");

            case FieldProperty.Resource: return("resource");

            case FieldProperty.DataType: return("dataType");
            }
            return(string.Empty);
        }
Exemplo n.º 13
0
 /// <summary>
 /// 最新のスコープで変数を宣言します.そのスコープから出た時点でその変数は取り除かれます.
 /// </summary>
 /// <param name="name">変数名</param>
 /// <param name="variable">初期値</param>
 public void Declare(string name, ScriptVariable variable, FieldProperty property)
 {
     // スコープが空だったらとりあえずひとつ入っておく
     if (_variableScopes.Count == 0)
     {
         this.EnterScope();
     }
     // 既に宣言されていたらコンソールに警告を表示して値は変えない
     if (_variableScopes[_variableScopes.Count - 1].ContainsKey(name))
     {
         this.Parent.Warn("Cannot declare already declared variable in the block: " + name);
         return;
     }
     _variableScopes[_variableScopes.Count - 1][name] = new VariableField(variable, property);
 }
Exemplo n.º 14
0
        /// <summary>
        /// 既定のコンストラクタ
        /// </summary>
        /// <param name="scriptEnv">スクリプト実行環境</param>
        public VariableStorage(ScriptConsole parent)
            : this()
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent", "'parent' cannot be null");
            }
            this.Parent = parent;
            // Soncoleに登録されている関数を読み取り専用として環境に登録
            FieldProperty readonlyProperty = new FieldProperty();

            readonlyProperty.Readonly = true;
            foreach (string function in parent.GetFunctionNames())
            {
                this.Declare(function, new RegisteredFunctionVariable(function), readonlyProperty);
            }
        }
Exemplo n.º 15
0
        static public DataSet GetLayOutFromPivotGrid(PivotGridControl pivotGrid)
        {
            try
            {
                DataSet ds = GreateSchemaDs();

                FieldProperty.GetPivotGridFieldProperty(pivotGrid, ds);
                OptionsView.GetPivotGridOtionsView(pivotGrid, ds);


                return(ds);
            }
            catch
            {
                return(null);
            }
        }
        public void TestCreateGeneralFieldSettingValidation(FieldProperty fieldProperty, object val)
        {
            Enums.ResourceType resourceType = Enums.ResourceType.Activity;
            string             fieldAlias   = $"{resourceType.ToString()}.{ActivityEventParticipants}";
            XmlResource        resource     = new Activity()
            {
                Id       = "-1",
                Title    = "Test Target Activity",
                Owner    = "1",
                FromDate = Util.ToString(DateTime.Now),
            };

            resource.DictionaryValues[fieldAlias] = new ArrayList()
            {
                new User()
                {
                    Id = "1"
                },
            };

            string id = PublicApiAdapter.CreateAdapterForDefaultConnection().WriteSuccess(resource, cleaner.Delete);

            Assert.That(id, Is.Not.Null.And.Not.Empty, string.Format(Enums.Message.CREATE_RESOURCE_ENTRY_FAILED, resourceType));
        }
Exemplo n.º 17
0
 protected virtual string GetFieldPropertyName(FieldProperty property)
 {
     return(mappingFieldToStr[(FieldProperty)property]);
 }
Exemplo n.º 18
0
 public VariableField(ScriptVariable variable, FieldProperty property)
 {
     this.Variable = variable;
     this.Property = property;
 }
Exemplo n.º 19
0
        public CustomPageField()
        {
            CodeBasedFieldFactory.RegisterFieldType(FieldType, () => new CustomPageField());

            this.documentName = new FieldProperty(this, DocumentNameProperty);
        }
Exemplo n.º 20
0
        public void TestCreateGeneralFieldSettingValidation(Enums.ResourceType resourceType, string fieldName, FieldProperty fieldProperty, object val)
        {
            string fieldAlias = resourceType.ToResourceName() + "." + fieldName;

            WriteValidHelper.CreateSingleItem(resourceType, fieldAlias, 1, cleaner, records, null);
        }
        public void TestReadGeneralFieldSettingValidation(Enums.ResourceType resourceType, ReadInvalidInputTestData.ItemState itemState, string fieldName, FieldProperty fieldProperty, object val)
        {
            var parameters = new Dictionary <string, object>()
            {
                { DeletedDataFields.Partition, AuthenticationInfoProvider.Current.DefaultPartition },
                { DeletedDataFields.ItemState, itemState.ToLowerString() },
                { DeletedDataFields.Condition, $"{resourceType.ToResourceName()}.{fieldName}:eq={fieldValues[fieldName]}" }
            };

            var result = PublicApiAdapter.CreateAdapterForDefaultConnection().ReadSuccess(resourceType.ToString(), parameters);

            Assert.That(result.Code, MustBe.EqualTo(Enums.PublicAPIResultCode.Success), Enums.Message.WRONG_ERROR_CODE);
        }
Exemplo n.º 22
0
        public string GetForeignKey()
        {
            var foreignKeyAttr = FieldProperty.GetCustomAttributes(typeof(LinqToSolrForeignKeyAttribute), false).ToArray()[0] as LinqToSolrForeignKeyAttribute;

            return(foreignKeyAttr.ForeignKey);
        }
Exemplo n.º 23
0
        public void TestCreateGeneralFieldSettingValidation(Enums.ResourceType resourceType, string fieldName, FieldProperty fieldProperty, object val)
        {
            string fieldAlias = resourceType.ToResourceName() + "." + fieldName;

            //Expected 100 error code - field value is specified automatically
            WriteInvalidHelper.CreateSingleItem(resourceType, fieldAlias, Util.ToString(DateTime.Now), Enums.PublicAPIResultCode.ParameterIsInvalid, cleaner, records);
        }
        public void TestCreateGeneralFieldSettingValidation(Enums.ResourceType resourceType, FieldProperty fieldProperty, object val)
        {
            string fieldAlias = $"{resourceType.ToResourceName()}.{AppField}";

            XmlResource resource = ResourceHelper.CreateResourceInstance(records, resourceType);

            resource.DictionaryValues[fieldAlias] = Util.ToString(DateTime.Now, true);
            string id = ResourceHelper.WriteResource(resource, cleaner);

            Assert.That(id, Is.Not.Null.And.Not.Empty, string.Format(Enums.Message.CREATE_RESOURCE_ENTRY_FAILED, resourceType));
        }
Exemplo n.º 25
0
 protected string GetValue(FieldProperty <string> fieldMetadata)
 {
     return(GetValue <string>(fieldMetadata));
 }
Exemplo n.º 26
0
        public void TestCreateGeneralFieldSettingValidation(Enums.ResourceType resourceType, string fieldName, FieldProperty fieldProperty, object val)
        {
            string      resourceName = resourceType.ToResourceName();
            string      fieldAlias   = resourceName + "." + fieldName;
            XmlResource resource     = ResourceHelper.CreateResourceInstance(records, resourceType);

            resource.DictionaryValues[fieldAlias] = Util.ToString(DateTime.Now);
            if (fieldName.Equals(DateTimeSystemField.ActivityToDate))
            {
                resource.DictionaryValues[$"{resourceName}.{DateTimeSystemField.ActivityFromDate}"] = Util.ToString(DateTime.Now);
            }
            if (fieldName.Equals(DateTimeSystemField.PhaseDate))
            {
                List <string> phaseList = OptionFieldHelper.GetOptionList($"Option.P_{resourceName}Phase");
                resource.DictionaryValues[$"{resourceName}.P_Phase"] = new Option()
                {
                    ActualXMLTag = phaseList.First()
                };
            }
            string id = ResourceHelper.WriteResource(resource, cleaner);

            Assert.That(id, Is.Not.Null.And.Not.Empty, string.Format(Enums.Message.CREATE_RESOURCE_ENTRY_FAILED, resourceType));
        }
        /// <inheritdoc />
        public T GetValue()
        {
            var model = GetModel();

            return(model == null ? default(T) : FieldProperty.Compile().Invoke(model));
        }
Exemplo n.º 28
0
        public void TestCreateGeneralFieldSettingValidation(Enums.ResourceType resourceType, string fieldName, FieldProperty fieldProperty, object val)
        {
            string fieldAlias = resourceType.ToResourceName() + "." + fieldName;

            WriteValidHelper.CreateSingleItem(resourceType, fieldAlias, (index) => GetValidFieldValue(resourceType, fieldName, index), cleaner, records,
                                              (actualValue) => VerifyFieldValue(resourceType, fieldName, actualValue), true);
        }
Exemplo n.º 29
0
 set => SetValue(FieldProperty, value);
Exemplo n.º 30
0
 /*
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator activityFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Activity, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Activity, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *  new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator personFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Person, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Person, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *  new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator clientFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Client, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Client, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator contractFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Contract, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Contract, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator jobFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Job, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Job, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator processFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Process, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Process, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator recruiterFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Recruiter, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Recruiter, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator fields =
  *  new HrbcFieldCreator(
  *      (CreateFieldsRequest.IBuilderWithRecord) Enum.GetValues(typeof(Enums.ResourceType)).Cast<ResourceType>().Aggregate<ResourceType, CreateFieldsRequest.IBuilder>(
  *          FieldRequest.CreateFields(), (fields, resource) =>
  *              fields
  *              .Append((ResourceId)(int)resource, HRBCClientPrivate.API.Field.FieldType.Number, $"API automation test field for {resource}",
  *                  builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), $"{resource}-1")
  *              .Append((ResourceId)(int)resource, HRBCClientPrivate.API.Field.FieldType.Number, $"API automation test field for {resource}",
  *                  builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), $"{resource}-2")),
  *      new List<FieldProperty> { FieldProperty.Name });
  *
  * [PrivateApiFixture(Priority = 10, Targets = ActionTargets.Suite)]
  * public HrbcFieldCreator salesFields =
  *  new HrbcFieldCreator(
  *      FieldRequest.CreateFields()
  *      .Append(ResourceId.Sales, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field1")
  *      .Append(ResourceId.Sales, HRBCClientPrivate.API.Field.FieldType.Number, "API automation test field",
  *          builder => builder.Searchable(false).Min(0m).Max(9999999999.0m).Required(false).Scale(2), "field2"),
  *      new List<FieldProperty> { FieldProperty.Name });
  */
 private static HrbcFieldUpdater.FieldSpec CreateFieldUpdateSpecForSingleProperty(Enums.ResourceType resource, string fieldName, FieldProperty property, object data)
 {
     return(new HrbcFieldUpdater.FieldSpec {
         Field = new HrbcField((ResourceId)(int)resource, fieldName), Properties = new Dictionary <FieldProperty, object> {
             { property, data }
         }
     });
 }