Esempio n. 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Input first number:");
            var x = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Operation:");
            var operation = Console.ReadLine();

            Console.WriteLine("Input second number:");
            var y = Convert.ToInt32(Console.ReadLine());

            OperatorEnum?myOperator = GetOperator(operation);

            if (myOperator.HasValue)
            {
                var calculation = new Calculation();
                var result      = calculation.Calculate(x, y, myOperator.Value);

                Console.WriteLine($"{x} {operation} {y} = {result}");
            }
            else
            {
                Console.WriteLine("Invalid operator !");
            }

            Console.ReadLine();
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContactListFilterNotificationPredicates" /> class.
        /// </summary>


        /// <param name="Column">Column.</param>



        /// <param name="ColumnType">ColumnType.</param>



        /// <param name="_Operator">_Operator.</param>



        /// <param name="Value">Value.</param>



        /// <param name="Range">Range.</param>



        /// <param name="Inverted">Inverted.</param>



        /// <param name="AdditionalProperties">AdditionalProperties.</param>


        public ContactListFilterNotificationPredicates(string Column = null, ColumnTypeEnum?ColumnType = null, OperatorEnum?_Operator = null, string Value = null, ContactListFilterNotificationRange Range = null, bool?Inverted = null, Object AdditionalProperties = null)
        {
            this.Column = Column;



            this.ColumnType = ColumnType;



            this._Operator = _Operator;



            this.Value = Value;



            this.Range = Range;



            this.Inverted = Inverted;



            this.AdditionalProperties = AdditionalProperties;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyFilter" /> class.
 /// </summary>
 /// <param name="left">The key that uniquely identifies a queryable address in Lusid..</param>
 /// <param name="_operator">The available values are: Equals, NotEquals, GreaterThan, GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo, In.</param>
 /// <param name="right">right.</param>
 /// <param name="rightOperandType">The available values are: Absolute, Property.</param>
 public PropertyFilter(string left = default(string), OperatorEnum?_operator = default(OperatorEnum?), Object right = default(Object), RightOperandTypeEnum?rightOperandType = default(RightOperandTypeEnum?))
 {
     this.Left             = left;
     this.Operator         = _operator;
     this.Right            = right;
     this.RightOperandType = rightOperandType;
 }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SuggestSearchCriteria" /> class.
        /// </summary>


        /// <param name="EndValue">The end value of the range. This field is used for range search types..</param>



        /// <param name="Values">A list of values for the search to match against.</param>



        /// <param name="StartValue">The start value of the range. This field is used for range search types..</param>



        /// <param name="Fields">Field names to search against.</param>



        /// <param name="Value">A value for the search to match against.</param>



        /// <param name="_Operator">How to apply this search criteria against other criteria.</param>



        /// <param name="Group">Groups multiple conditions.</param>


        public SuggestSearchCriteria(string EndValue = null, List <string> Values = null, string StartValue = null, List <string> Fields = null, string Value = null, OperatorEnum?_Operator = null, List <SuggestSearchCriteria> Group = null)
        {
            this.EndValue = EndValue;



            this.Values = Values;



            this.StartValue = StartValue;



            this.Fields = Fields;



            this.Value = Value;



            this._Operator = _Operator;



            this.Group = Group;
        }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FormFieldConditionPredicate" /> class.
 /// </summary>
 /// <param name="FieldLocationIndex">Index of the location of the form field used in the predicate.</param>
 /// <param name="FieldName">Name of the field whose value is the basis of predicate.</param>
 /// <param name="_Operator">Operator to be applied on the value of the predicate field..</param>
 /// <param name="Value">Value to compare against the value of the predicate&#39;s form field, using the specified operator.</param>
 public FormFieldConditionPredicate(int?FieldLocationIndex = default(int?), string FieldName = default(string), OperatorEnum?_Operator = default(OperatorEnum?), string Value = default(string))
 {
     this.FieldLocationIndex = FieldLocationIndex;
     this.FieldName          = FieldName;
     this._Operator          = _Operator;
     this.Value = Value;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContentFacetFilterItem" /> class.
 /// </summary>
 /// <param name="Name">Name.</param>
 /// <param name="Type">Type.</param>
 /// <param name="_Operator">_Operator.</param>
 /// <param name="Values">Values.</param>
 public ContentFacetFilterItem(string Name = null, TypeEnum?Type = null, OperatorEnum?_Operator = null, List <string> Values = null)
 {
     this.Name      = Name;
     this.Type      = Type;
     this._Operator = _Operator;
     this.Values    = Values;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CampaignRuleParameters" /> class.
 /// </summary>
 /// <param name="Operator">The operator for comparison. Required for a CampaignRuleCondition..</param>
 /// <param name="Value">The value for comparison. Required for a CampaignRuleCondition..</param>
 /// <param name="Priority">The priority to set a campaign to. Required for the 'setCampaignPriority' action..</param>
 /// <param name="DialingMode">The dialing mode to set a campaign to. Required for the 'setCampaignDialingMode' action..</param>
 public CampaignRuleParameters(OperatorEnum?Operator = null, string Value = null, PriorityEnum?Priority = null, DialingModeEnum?DialingMode = null)
 {
     this.Operator    = Operator;
     this.Value       = Value;
     this.Priority    = Priority;
     this.DialingMode = DialingMode;
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResponseFilter" /> class.
 /// </summary>
 /// <param name="Name">Field to filter on. Allowed values are &#39;name&#39; and &#39;libraryId. (required).</param>
 /// <param name="_Operator">Filter operation: IN, EQUALS, NOTEQUALS. (required).</param>
 /// <param name="Values">Values to filter on. (required).</param>
 public ResponseFilter(string Name = null, OperatorEnum?_Operator = null, List <string> Values = null)
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for ResponseFilter and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "_Operator" is required (not null)
     if (_Operator == null)
     {
         throw new InvalidDataException("_Operator is a required property for ResponseFilter and cannot be null");
     }
     else
     {
         this._Operator = _Operator;
     }
     // to ensure "Values" is required (not null)
     if (Values == null)
     {
         throw new InvalidDataException("Values is a required property for ResponseFilter and cannot be null");
     }
     else
     {
         this.Values = Values;
     }
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Criteria" /> class.
 /// </summary>
 /// <param name="Key">The criteria key. (required).</param>
 /// <param name="Values">The criteria values. (required).</param>
 /// <param name="ShouldIgnoreCase">Should criteria be case insensitive. (required).</param>
 /// <param name="Operator">The comparison operator..</param>
 public Criteria(string Key = null, List <string> Values = null, bool?ShouldIgnoreCase = null, OperatorEnum?Operator = null)
 {
     this.Key              = Key;
     this.Values           = Values;
     this.ShouldIgnoreCase = ShouldIgnoreCase;
     this.Operator         = Operator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="NumberCondition" /> class.
 /// </summary>
 /// <param name="_Operator">_Operator.</param>
 /// <param name="Value1">Value1.</param>
 /// <param name="Value2">Value2.</param>
 /// <param name="ValueFormat">ValueFormat.</param>
 public NumberCondition(OperatorEnum?_Operator = default(OperatorEnum?), ConditionValue Value1 = default(ConditionValue), ConditionValue Value2 = default(ConditionValue), string ValueFormat = default(string))
 {
     this._Operator   = _Operator;
     this.Value1      = Value1;
     this.Value2      = Value2;
     this.ValueFormat = ValueFormat;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalyticsQueryPredicate" /> class.
        /// </summary>


        /// <param name="Type">Optional type, can usually be inferred.</param>



        /// <param name="Dimension">Left hand side for dimension predicates.</param>



        /// <param name="PropertyType">Left hand side for property predicates.</param>



        /// <param name="Property">Left hand side for property predicates.</param>



        /// <param name="Metric">Left hand side for metric predicates.</param>



        /// <param name="_Operator">Optional operator, default is matches.</param>



        /// <param name="Value">Right hand side for dimension, property, or metric predicates.</param>



        /// <param name="Range">Right hand side for property or metric predicates.</param>


        public AnalyticsQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, PropertyTypeEnum?PropertyType = null, string Property = null, MetricEnum?Metric = null, OperatorEnum?_Operator = null, string Value = null, NumericRange Range = null)
        {
            this.Type = Type;



            this.Dimension = Dimension;



            this.PropertyType = PropertyType;



            this.Property = Property;



            this.Metric = Metric;



            this._Operator = _Operator;



            this.Value = Value;



            this.Range = Range;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DomainResourceConditionNode" /> class.
 /// </summary>
 /// <param name="VariableName">VariableName.</param>
 /// <param name="Operator">Operator.</param>
 /// <param name="Operands">Operands.</param>
 /// <param name="Conjunction">Conjunction.</param>
 /// <param name="Terms">Terms.</param>
 public DomainResourceConditionNode(string VariableName = null, OperatorEnum?Operator = null, List <DomainResourceConditionValue> Operands = null, ConjunctionEnum?Conjunction = null, List <DomainResourceConditionNode> Terms = null)
 {
     this.VariableName = VariableName;
     this.Operator     = Operator;
     this.Operands     = Operands;
     this.Conjunction  = Conjunction;
     this.Terms        = Terms;
 }
Esempio n. 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FlowObservationQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="_Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension predicates.</param>
 /// <param name="Range">Right hand side for dimension predicates.</param>
 public FlowObservationQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, OperatorEnum?_Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this._Operator = _Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
Esempio n. 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SlotPos" /> class.
 /// </summary>
 /// <param name="_operator">_operator.</param>
 /// <param name="key">key.</param>
 /// <param name="value">value.</param>
 /// <param name="y">y.</param>
 /// <param name="x">x.</param>
 public SlotPos(OperatorEnum?_operator = default(OperatorEnum?), string key = default(string), Vector2i value = default(Vector2i), int?y = default(int?), int?x = default(int?))
 {
     this.Operator = _operator;
     this.Key      = key;
     this.Value    = value;
     this.Y        = y;
     this.X        = x;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RoutingStatusDetailQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="_Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension predicates.</param>
 /// <param name="Range">Right hand side for dimension predicates.</param>
 public RoutingStatusDetailQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, OperatorEnum?_Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this._Operator = _Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
Esempio n. 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResolutionDetailQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Metric">Left hand side for metric predicates.</param>
 /// <param name="Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for metric predicates.</param>
 /// <param name="Range">Right hand side for metric predicates.</param>
 public ResolutionDetailQueryPredicate(TypeEnum?Type = null, MetricEnum?Metric = null, OperatorEnum?Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type     = Type;
     this.Metric   = Metric;
     this.Operator = Operator;
     this.Value    = Value;
     this.Range    = Range;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TranscriptAggregateQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension predicates.</param>
 /// <param name="Range">Right hand side for dimension predicates.</param>
 public TranscriptAggregateQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, OperatorEnum?Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this.Operator  = Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConversationAggregateQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="_Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension predicates.</param>
 /// <param name="Range">Right hand side for dimension predicates.</param>
 public ConversationAggregateQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, OperatorEnum?_Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this._Operator = _Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
Esempio n. 19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InventoryDimension" /> class.
 /// </summary>
 /// <param name="_operator">_operator.</param>
 /// <param name="key">key.</param>
 /// <param name="value">value.</param>
 /// <param name="columns">columns.</param>
 /// <param name="rows">rows.</param>
 public InventoryDimension(OperatorEnum?_operator = default(OperatorEnum?), string key = default(string), Vector2i value = default(Vector2i), int?columns = default(int?), int?rows = default(int?))
 {
     this.Operator = _operator;
     this.Key      = key;
     this.Value    = value;
     this.Columns  = columns;
     this.Rows     = rows;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="UserDetailQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension predicates.</param>
 /// <param name="Range">Right hand side for dimension predicates.</param>
 public UserDetailQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, OperatorEnum?Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this.Operator  = Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventCondition" /> class.
 /// </summary>
 /// <param name="Key">The event key. (required).</param>
 /// <param name="Values">The event values. (required).</param>
 /// <param name="Operator">The comparison operator..</param>
 /// <param name="StreamType">The stream type for which this condition can be satisfied. (required).</param>
 /// <param name="SessionType">The session type for which this condition can be satisfied. (required).</param>
 /// <param name="EventName">The name of the event for which this condition can be satisfied..</param>
 public EventCondition(string Key = null, List <string> Values = null, OperatorEnum?Operator = null, StreamTypeEnum?StreamType = null, string SessionType = null, string EventName = null)
 {
     this.Key         = Key;
     this.Values      = Values;
     this.Operator    = Operator;
     this.StreamType  = StreamType;
     this.SessionType = SessionType;
     this.EventName   = EventName;
 }
Esempio n. 22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConditionalGroupRoutingRule" /> class.
 /// </summary>
 /// <param name="Queue">The queue being evaluated for this rule.  For rule 1, this is always the current queue, so should not be specified..</param>
 /// <param name="Metric">The queue metric being evaluated.</param>
 /// <param name="Operator">The operator that compares the actual value against the condition value.</param>
 /// <param name="ConditionValue">The limit value, beyond which a rule evaluates as true.</param>
 /// <param name="Groups">The group(s) to activate if the rule evaluates as true.</param>
 /// <param name="WaitSeconds">The number of seconds to wait in this rule, if it evaluates as true, before evaluating the next rule.  For the final rule, this is ignored, so need not be specified..</param>
 public ConditionalGroupRoutingRule(DomainEntityRef Queue = null, MetricEnum?Metric = null, OperatorEnum?Operator = null, double?ConditionValue = null, List <MemberGroup> Groups = null, int?WaitSeconds = null)
 {
     this.Queue          = Queue;
     this.Metric         = Metric;
     this.Operator       = Operator;
     this.ConditionValue = ConditionValue;
     this.Groups         = Groups;
     this.WaitSeconds    = WaitSeconds;
 }
Esempio n. 23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContactListFilterPredicate" /> class.
 /// </summary>
 /// <param name="Column">Contact list column from the ContactListFilter&#39;s contactList..</param>
 /// <param name="ColumnType">The type of data in the contact column..</param>
 /// <param name="_Operator">The operator for this ContactListFilterPredicate..</param>
 /// <param name="Value">Value with which to compare the contact&#39;s data. This could be text, a number, or a relative time. A value for relative time should follow the format PxxDTyyHzzM, where xx, yy, and zz specify the days, hours and minutes. For example, a value of P01DT08H30M corresponds to 1 day, 8 hours, and 30 minutes from now. To specify a time in the past, include a negative sign before each numeric value. For example, a value of P-01DT-08H-30M corresponds to 1 day, 8 hours, and 30 minutes in the past. You can also do things like P01DT00H-30M, which would correspond to 23 hours and 30 minutes from now (1 day - 30 minutes)..</param>
 /// <param name="Range">A range of values. Required for operators BETWEEN and IN..</param>
 /// <param name="Inverted">Inverts the result of the predicate (i.e., if the predicate returns true, inverting it will return false)..</param>
 public ContactListFilterPredicate(string Column = null, ColumnTypeEnum?ColumnType = null, OperatorEnum?_Operator = null, string Value = null, ContactListFilterRange Range = null, bool?Inverted = null)
 {
     this.Column     = Column;
     this.ColumnType = ColumnType;
     this._Operator  = _Operator;
     this.Value      = Value;
     this.Range      = Range;
     this.Inverted   = Inverted;
 }
Esempio n. 24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConversationDetailQueryPredicate" /> class.
 /// </summary>
 /// <param name="Type">Optional type, can usually be inferred.</param>
 /// <param name="Dimension">Left hand side for dimension predicates.</param>
 /// <param name="Metric">Left hand side for metric predicates.</param>
 /// <param name="Operator">Optional operator, default is matches.</param>
 /// <param name="Value">Right hand side for dimension or metric predicates.</param>
 /// <param name="Range">Right hand side for dimension or metric predicates.</param>
 public ConversationDetailQueryPredicate(TypeEnum?Type = null, DimensionEnum?Dimension = null, MetricEnum?Metric = null, OperatorEnum?Operator = null, string Value = null, NumericRange Range = null)
 {
     this.Type      = Type;
     this.Dimension = Dimension;
     this.Metric    = Metric;
     this.Operator  = Operator;
     this.Value     = Value;
     this.Range     = Range;
 }
Esempio n. 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DialerContactlistfilterConfigChangeFilterPredicate" /> class.
 /// </summary>
 /// <param name="Column">The contact list column.</param>
 /// <param name="ColumnType">Whether a contact column is numeric or alphabetic.</param>
 /// <param name="Operator">The comparison operator.</param>
 /// <param name="Value">The value the predicate applies to.</param>
 /// <param name="Range">Range.</param>
 /// <param name="Inverted">Whether or not to invert to result of evaluating the predicate.</param>
 public DialerContactlistfilterConfigChangeFilterPredicate(string Column = null, ColumnTypeEnum?ColumnType = null, OperatorEnum?Operator = null, string Value = null, DialerContactlistfilterConfigChangeRange Range = null, bool?Inverted = null)
 {
     this.Column     = Column;
     this.ColumnType = ColumnType;
     this.Operator   = Operator;
     this.Value      = Value;
     this.Range      = Range;
     this.Inverted   = Inverted;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DialerContactlistfilterConfigChangeFilterPredicate" /> class.
 /// </summary>
 /// <param name="Column">Column.</param>
 /// <param name="ColumnType">ColumnType.</param>
 /// <param name="_Operator">_Operator.</param>
 /// <param name="Value">Value.</param>
 /// <param name="Range">Range.</param>
 /// <param name="Inverted">Inverted.</param>
 /// <param name="AdditionalProperties">AdditionalProperties.</param>
 public DialerContactlistfilterConfigChangeFilterPredicate(string Column = null, ColumnTypeEnum?ColumnType = null, OperatorEnum?_Operator = null, string Value = null, DialerContactlistfilterConfigChangeRange Range = null, bool?Inverted = null, Object AdditionalProperties = null)
 {
     this.Column               = Column;
     this.ColumnType           = ColumnType;
     this._Operator            = _Operator;
     this.Value                = Value;
     this.Range                = Range;
     this.Inverted             = Inverted;
     this.AdditionalProperties = AdditionalProperties;
 }
Esempio n. 27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Condition" /> class.
 /// </summary>
 /// <param name="Type">The type of the condition.</param>
 /// <param name="Inverted">Indicates whether to evaluate for the opposite of the stated condition; default is false.</param>
 /// <param name="AttributeName">An attribute name associated with the condition (applies only to certain rule conditions).</param>
 /// <param name="Value">A value associated with the condition.</param>
 /// <param name="ValueType">Determines the type of the value associated with the condition.</param>
 /// <param name="_Operator">An operation type for condition evaluation.</param>
 /// <param name="Codes">List of wrap-up code identifiers (used only in conditions of type &#39;wrapupCondition&#39;).</param>
 public Condition(TypeEnum?Type = null, bool?Inverted = null, string AttributeName = null, string Value = null, ValueTypeEnum?ValueType = null, OperatorEnum?_Operator = null, List <string> Codes = null)
 {
     this.Type          = Type;
     this.Inverted      = Inverted;
     this.AttributeName = AttributeName;
     this.Value         = Value;
     this.ValueType     = ValueType;
     this._Operator     = _Operator;
     this.Codes         = Codes;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RuleSetNotificationConditions" /> class.
 /// </summary>
 /// <param name="Type">Type.</param>
 /// <param name="Inverted">Inverted.</param>
 /// <param name="AttributeName">AttributeName.</param>
 /// <param name="Value">Value.</param>
 /// <param name="ValueType">ValueType.</param>
 /// <param name="_Operator">_Operator.</param>
 /// <param name="Codes">Codes.</param>
 /// <param name="AdditionalProperties">AdditionalProperties.</param>
 public RuleSetNotificationConditions(string Type = null, bool?Inverted = null, string AttributeName = null, string Value = null, ValueTypeEnum?ValueType = null, OperatorEnum?_Operator = null, List <string> Codes = null, Object AdditionalProperties = null)
 {
     this.Type                 = Type;
     this.Inverted             = Inverted;
     this.AttributeName        = AttributeName;
     this.Value                = Value;
     this.ValueType            = ValueType;
     this._Operator            = _Operator;
     this.Codes                = Codes;
     this.AdditionalProperties = AdditionalProperties;
 }
Esempio n. 29
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AttributeFilterItem" /> class.
        /// </summary>


        /// <param name="Id">Id.</param>



        /// <param name="_Operator">_Operator.</param>



        /// <param name="Values">Values.</param>


        public AttributeFilterItem(string Id = null, OperatorEnum?_Operator = null, List <string> Values = null)
        {
            this.Id = Id;



            this._Operator = _Operator;



            this.Values = Values;
        }
Esempio n. 30
0
        private static OperatorEnum GetOperator(this ColumnFilter filter)
        {
            OperatorEnum?result = null;

            switch (filter.Operation.ToLower())
            {
            case "equlas":
            case "equals":
                result = OperatorEnum.Equals;
                break;

            case "notEquals":
                result = OperatorEnum.NotEquals;
                break;

            case "lessthan":
                result = OperatorEnum.LessThan;
                break;

            case "greaterthan":
                result = OperatorEnum.GreaterThan;
                break;

            case "contains":
                result = OperatorEnum.Contains;
                break;

            case "notcontains":
                result = OperatorEnum.NotContains;
                break;

            case "startswith":
                result = OperatorEnum.StartsWith;
                break;

            case "endswith":
                result = OperatorEnum.EndsWith;
                break;

            default:
                result = null;
                break;
            }
            if (!result.HasValue)
            {
                throw new InvalidOperationException();
            }
            return(result.Value);
        }