public CswNbtFieldTypeRuleMetaDataList(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            IdSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_FK, SubFieldName.Id);
            IdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            IdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            IdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            IdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            SubFields.add(IdSubField);

            TypeSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Type);
            TypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            TypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            TypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            TypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            SubFields.add(TypeSubField);

            TextSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, SubFieldName.Text);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(TextSubField);
        }//ctor
Exemple #2
0
 public FeatureObjectPointer(SubFields ffpt)
 {
     this.TagIndex = ffpt.TagIndex;
     this.Tags     = ffpt.Tags;
     this.Values   = ffpt.Values;
     FeatureList   = new List <Feature>(); //consider intializing with 2 for speadup
 }
Exemple #3
0
        public CswNbtFieldTypeRuleLink(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            TextSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Text);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(TextSubField, true);

            HrefSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Big, CswEnumNbtSubFieldName.Href);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            HrefSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(HrefSubField);
        }//ctor
        public CswNbtFieldTypeRuleMTBF(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            StartDateTimeSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.StartDateTime, true);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            StartDateTimeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(StartDateTimeSubField);

            UnitsSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, SubFieldName.Units, true);
            UnitsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            UnitsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            UnitsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            UnitsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            UnitsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            SubFields.add(UnitsSubField);

            ValueSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Numeric, SubFieldName.Value, true);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            SubFields.add(ValueSubField, true);
        }//ctor
        public CswNbtFieldTypeRuleBlob(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            FileNameSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Name);
            FileNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            FileNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(FileNameSubField);

            ContentTypeSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, SubFieldName.ContentType);
            ContentTypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ContentTypeSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ContentTypeSubField);

            DateModifiedSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2_Date, SubFieldName.DateModified);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            DateModifiedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(DateModifiedSubField);

            //BlobSubField = new CswNbtSubField( CswEnumNbtPropColumn.Field1, CswEnumNbtSubFieldName.Blob );
            //BlobSubField.SupportedFilterModes.Add( CswEnumNbtFilterMode.NotNull |
            //                           CswEnumNbtFilterMode.Null;
            //SubFields.add( BlobSubField );
        }//ctor
        public CswNbtFieldTypeRuleScientific(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            BaseSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Numeric, SubFieldName.Base, true);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            BaseSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(BaseSubField);

            ExponentSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2_Numeric, SubFieldName.Exponent, true);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ExponentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ExponentSubField);
        }//ctor
 /// <summary>
 /// Gets the first subfield.
 /// </summary>
 /// <param name="code">The code.</param>
 /// <returns>SubField.</returns>
 public SubField GetFirstSubField
 (
     char code
 )
 {
     return(SubFields.FirstOrDefault(sf => sf.Code.SameChar(code)));
 }
Exemple #8
0
        public CswNbtFieldTypeRuleList(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            // ValueSubField - Field1
            ValueSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, CswEnumNbtSubFieldName.Value);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ValueSubField);

            //TextSubField - Field2
            TextSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, CswEnumNbtSubFieldName.Text);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(TextSubField);
        }//ctor
        public CswNbtFieldTypeRuleTimeInterval(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            IntervalSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Interval, true);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            IntervalSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(IntervalSubField);

            StartDateSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Date, SubFieldName.StartDateTime, true);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            StartDateSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(StartDateSubField);

            ClobDataSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.ClobData, CswEnumNbtSubFieldName.Value);
            ClobDataSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ClobDataSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ClobDataSubField);
        }//ctor
 public VectorRecordPointer(SubFields vrpt)
 {
     this.TagIndex = vrpt.TagIndex;
     this.Tags     = vrpt.Tags;
     this.Values   = vrpt.Values;
     VectorList    = new List <Vector>(); //consider intializing with 2 for speadup
 }
        /// <summary>
        /// Вывод поля в порядке алфавита
        /// кодов подполей.
        /// </summary>
        /// <returns></returns>
        public string ToSortedText()
        {
            StringBuilder result = new StringBuilder();

            if (!string.IsNullOrEmpty(Text))
            {
                result.Append(Text);
            }
            foreach (SubField subField
                     in SubFields.OrderBy(sf => sf.CodeString.ToUpperInvariant()))
            {
                string subText = string.Format
                                 (
                    "^{0}{1}",
                    subField.CodeString.ToUpperInvariant(),
                    subField.Text
                                 );
                if (!string.IsNullOrEmpty(subText))
                {
                    result.Append(subText);
                }
            }

            return(result.ToString());
        }
Exemple #12
0
        public CswNbtFieldTypeRuleSequence(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            SequenceSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Sequence);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            SequenceSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(SequenceSubField);

            SequenceNumberSubField = new CswNbtSubField(_CswNbtFieldResources, SequenceNumberColumn, SubFieldName.Number);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            SequenceNumberSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(SequenceNumberSubField);
        }//ctor
 /// <summary>
 /// Adds the sub field.
 /// </summary>
 /// <param name="code">The code.</param>
 /// <param name="text">The text.</param>
 /// <returns>RecordField.</returns>
 public RecordField AddSubField
 (
     char code,
     string text
 )
 {
     SubFields.Add(new SubField(code, text));
     return(this);
 }
        public CswNbtFieldTypeRuleQuantity(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            QuantitySubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Numeric, SubFieldName.Value, true);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            QuantitySubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(QuantitySubField, true);

            UnitIdSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_FK, SubFieldName.NodeID, true);
            UnitIdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            UnitIdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            UnitIdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            UnitIdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            UnitIdSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.In);
            SubFields.add(UnitIdSubField);

            UnitNameSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Name);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            UnitNameSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(UnitNameSubField);

            Val_kg_SubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2_Numeric, CswEnumNbtSubFieldName.Val_kg, true);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            Val_kg_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(Val_kg_SubField);

            Val_Liters_SubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field3_Numeric, CswEnumNbtSubFieldName.Val_Liters, true);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            Val_Liters_SubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(Val_Liters_SubField);
        }//ctor
Exemple #15
0
        public void NullValue_WithCreateElementOnInspectionAttribute_IsNotPropagatedToSubFields()
        {
            var instance = new SubFields();

            Assert.That(instance.ConcreteTypeC, Is.Null);
            Element.SetTarget(instance);
            Assert.That(instance.ConcreteTypeC, Is.Not.Null);
            Assert.That(instance.ConcreteTypeC.ConcreteTypeA, Is.Null);
        }
        public CswNbtFieldTypeRuleLogical(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            CheckedSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Checked);
            CheckedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            CheckedSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            SubFields.add(CheckedSubField);
        }//ctor
 /// <summary>
 /// Перечень подполей с указанным кодом.
 /// </summary>
 /// <param name="code">Искомый код подполя.</param>
 /// <remarks>Сравнение кодов происходит без учета
 /// регистра символов.</remarks>
 /// <returns>Найденные подполя.</returns>
 public SubField[] GetSubField
 (
     char code
 )
 {
     SubField[] result = SubFields
                         .Where(_ => _.Code.SameChar(code))
                         .ToArray();
     return(result);
 }
Exemple #18
0
        public CswNbtFieldTypeRuleUserSelect(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            SelectedUserIdsSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.ClobData, CswEnumNbtSubFieldName.NodeID);
            SelectedUserIdsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            SelectedUserIdsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            SelectedUserIdsSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(SelectedUserIdsSubField);
        }//ctor
        public CswNbtFieldTypeRuleMultiList(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            ValueSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.ClobData, SubFieldName.Value);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ValueSubField);
        }//ctor
        /// <summary>
        /// Adds the sub fields.
        /// </summary>
        /// <param name="subFields">The sub fields.</param>
        /// <returns>RecordField.</returns>
        public RecordField AddSubFields
        (
            IEnumerable <SubField> subFields
        )
        {
            SubFields.AddRange
            (
                subFields.NonNullItems()
            );

            return(this);
        }
Exemple #21
0
        public CswNbtFieldTypeRuleComments(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);


            CommentSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.ClobData, SubFieldName.Comments);     //bz # 6628: Gestalt instead of Field1
            CommentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            CommentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            CommentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            CommentSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(CommentSubField);
        }//ctor
Exemple #22
0
        public CswNbtFieldTypeRuleMol(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            MolSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Mol);
            // BZ 8638
            //MolSubField.SupportedFilterModes.Add( CswEnumNbtFilterMode.NotNull |
            //                          CswEnumNbtFilterMode.Null;
            MolSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            MolSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(MolSubField);
        }//ctor
Exemple #23
0
        public CswNbtFieldTypeRuleLogicalSet(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            //CheckedSubField = new CswNbtSubField(CswEnumNbtPropColumn.Field1, CswNbtFieldTypeRule.SubFieldName. );
            //CheckedSubField.SupportedFilterModes.Add( CswEnumNbtFilterMode.Equals;
            //SubFields.add( CheckedSubField );

            ClobDataSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.ClobData, CswEnumNbtSubFieldName.Value);
            ClobDataSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ClobDataSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ClobDataSubField);
        }//ctor
        public CswNbtFieldTypeRuleMemo(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);


            TextSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Gestalt, SubFieldName.Text);     //bz # 6628: Gestalt instead of Field1
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Begins);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Ends);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Contains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotContains);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            TextSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(TextSubField);
        }//ctor
Exemple #25
0
        public CswNbtFieldTypeRuleNumber(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            ValueSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Numeric, SubFieldName.Value, true);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Equals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotEquals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThanOrEquals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.GreaterThan);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThan);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.LessThanOrEquals);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.NotNull);
            ValueSubField.SupportedFilterModes.Add(CswEnumNbtFilterMode.Null);
            SubFields.add(ValueSubField);
        }//ctor
Exemple #26
0
        public CswNbtFieldTypeRuleButton(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            StateSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Value);
            SubFields.add(StateSubField);

            MenuOptionsSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, SubFieldName.Options);
            SubFields.add(MenuOptionsSubField);

            DisplayNameField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field3, SubFieldName.Name);
            SubFields.add(DisplayNameField);

            IconSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field4, SubFieldName.Icon);
            SubFields.add(IconSubField);
        }//ctor
        public CswNbtFieldTypeRulePassword(CswNbtFieldResources CswNbtFieldResources)
        {
            _CswNbtFieldResources       = CswNbtFieldResources;
            _CswNbtFieldTypeRuleDefault = new CswNbtFieldTypeRuleDefaultImpl(_CswNbtFieldResources);

            EncryptedPasswordSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1, SubFieldName.Password);
            //// BZ 8638
            //EncryptedPasswordSubField.SupportedFilterModes.Add( CswEnumNbtFilterMode.NotNull |
            //                                        CswEnumNbtFilterMode.Null;
            SubFields.add(EncryptedPasswordSubField);

            ChangedDateSubField = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field1_Date, SubFieldName.ChangedDate);
            SubFields.add(ChangedDateSubField);

            PreviouslyUsedPasswords = new CswNbtSubField(_CswNbtFieldResources, CswEnumNbtPropColumn.Field2, SubFieldName.PreviouslyUsedPasswords);
            SubFields.add(PreviouslyUsedPasswords);
        }//ctor
        /// <summary>
        /// Sets the sub field.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="text">The text.</param>
        /// <returns></returns>
        /// <remarks>Устанавливает значение только первого
        /// подполя с указанным кодом (если в поле их несколько)!
        /// </remarks>
        public RecordField SetSubField
        (
            char code,
            string text
        )
        {
            SubField subField = SubFields
                                .Find(_ => _.Code.SameChar(code));

            if (subField == null)
            {
                subField = new SubField(code, text);
                SubFields.Add(subField);
            }
            subField.Text = text;
            return(this);
        }
        /// <summary>
        /// Replaces the sub field.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="oldValue">The old value.</param>
        /// <param name="newValue">The new value.</param>
        /// <returns>RecordField.</returns>
        public RecordField ReplaceSubField
        (
            char code,
            string oldValue,
            string newValue
        )
        {
            var found = SubFields
                        .Where(sf => sf.Code.SameChar(code) &&
                               (string.CompareOrdinal(sf.Text, oldValue) == 0));

            foreach (SubField subField in found)
            {
                subField.Text = newValue;
            }
            return(this);
        }
        /// <summary>
        /// Removes the sub field.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <returns></returns>
        /// <remarks>Удаляет все повторения подполей
        /// с указанным кодом.
        /// </remarks>
        public RecordField RemoveSubField
        (
            char code
        )
        {
            code = char.ToLowerInvariant(code);
            SubField[] found = SubFields
                               .FindAll(_ => char.ToLowerInvariant(_.Code) == code)
                               .ToArray();

            foreach (SubField subField in found)
            {
                SubFields.Remove(subField);
            }

            return(this);
        }