public IEventRequestParametersBuilder <T> AddCustomValues(string customFieldName, string customFieldValue)
        {
            BaseValidator.CheckForNullAndEmptyOrThrow(customFieldName, this.GetType().Name + ".customFieldName");

            BaseValidator.CheckForNullAndEmptyOrThrow(customFieldValue, this.GetType().Name + ".customFieldValue");

            if (null == this.FieldsRawValuesByName)
            {
                Dictionary <string, string> newFields = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
                this.FieldsRawValuesByName = newFields;
            }

            string lowerCaseField = customFieldName.ToLowerInvariant();

            bool keyIsDuplicated = DuplicateEntryValidator.IsDuplicatedFieldsInTheDictionary(this.FieldsRawValuesByName, lowerCaseField);

            if (keyIsDuplicated)
            {
                throw new InvalidOperationException(this.GetType().Name + ".customFieldValue : duplicate fields are not allowed");
            }

            this.FieldsRawValuesByName.Add(lowerCaseField, customFieldValue);

            return(this);
        }
        public IChangeEntityParametersBuilder <T> AddFieldsRawValuesByNameToSet(string fieldName, string fieldValue)
        {
            BaseValidator.CheckForNullAndEmptyOrThrow(fieldName, this.GetType().Name + ".fieldName");

            if (null == this.FieldsRawValuesByName)
            {
                Dictionary <string, string> newFields = new Dictionary <string, string>(StringComparer.Ordinal);
                this.FieldsRawValuesByName = newFields;
            }

            bool keyIsDuplicated = DuplicateEntryValidator.IsDuplicatedFieldsInTheDictionary(this.FieldsRawValuesByName, fieldName);

            if (keyIsDuplicated)
            {
                throw new InvalidOperationException(this.GetType().Name + ".FieldsRawValuesByName : duplicate fields are not allowed");
            }

            this.FieldsRawValuesByName.Add(fieldName, fieldValue);

            return(this);
        }
        public IBaseEntityRequestParametersBuilder <T> AddParametersRawValues(string parameterName, string parameterValue)
        {
            BaseValidator.CheckForNullAndEmptyOrThrow(parameterName, this.GetType().Name + ".parameterName");
            BaseValidator.CheckForNullAndEmptyOrThrow(parameterValue, this.GetType().Name + ".parameterValue");

            if (null == this.ParametersRawValuesByName)
            {
                Dictionary <string, string> newParameters = new Dictionary <string, string>(StringComparer.Ordinal);
                this.ParametersRawValuesByName = newParameters;
            }

            bool keyIsDuplicated = DuplicateEntryValidator.IsDuplicatedFieldsInTheDictionary(this.ParametersRawValuesByName, parameterName);

            if (keyIsDuplicated)
            {
                throw new InvalidOperationException(this.GetType().Name + ".AddParametersRawValues : duplicate fields are not allowed");
            }

            this.ParametersRawValuesByName.Add(parameterName, parameterValue);

            return(this);
        }
        public IRenderingHtmlRequestParametersBuilder <IGetRenderingHtmlRequest> AddRenderingParameterNameValue(string parameterName, string parameterValue)
        {
            BaseValidator.CheckForNullAndEmptyOrThrow(parameterName, this.GetType().Name + ".fieldName");
            BaseValidator.CheckForNullAndEmptyOrThrow(parameterValue, this.GetType().Name + ".fieldValue");

            if (null == this.parametersValuesByName)
            {
                Dictionary <string, string> newFields = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
                this.parametersValuesByName = newFields;
            }

            bool keyIsDuplicated = DuplicateEntryValidator.IsDuplicatedFieldsInTheDictionary(this.parametersValuesByName, parameterName);

            if (keyIsDuplicated)
            {
                throw new InvalidOperationException(this.GetType().Name + ".ParametersValuesByName : duplicate fields are not allowed");
            }

            this.parametersValuesByName.Add(parameterName, parameterValue);

            return(this);
        }