public FilterListEntry(PacketPropertyValueFilterForm.PacketClass packetClass,
     PacketPropertyValueFilterForm.ClassMemberPath classProperty,
     object searchValue,
     bool isRecursive,
     string relation,
     string condition)
 {
     this.packetClass = packetClass;
     this.classProperty = classProperty;
     this.searchValue = searchValue;
     this.isRecursive = isRecursive;
     this.relation = relation;
     this.condition = condition;
 }
Exemplo n.º 2
0
 public FilterListEntry(PacketPropertyValueFilterForm.PacketClass packetClass,
                        PacketPropertyValueFilterForm.ClassMemberPath classProperty,
                        object searchValue,
                        bool isRecursive,
                        string relation,
                        string condition)
 {
     this.packetClass   = packetClass;
     this.classProperty = classProperty;
     this.searchValue   = searchValue;
     this.isRecursive   = isRecursive;
     this.relation      = relation;
     this.condition     = condition;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PacketPropertyVariable"/> class.
        /// </summary>
        /// <param name="packetClass">The packet class.</param>
        /// <param name="packetClassMemberPath">The packet class member path.</param>
        /// <param name="name">The name.</param>
        public PacketPropertyVariable(PacketPropertyValueFilterForm.PacketClass packetClass,
                                      PacketPropertyValueFilterForm.ClassMemberPath packetClassMemberPath,
                                      string name)
        {
            PacketPropertyVariableLink loc = new PacketPropertyVariableLink(packetClass, packetClassMemberPath);

            this.links.Add(loc);

            if (null == name)
            {
                name = string.Empty;
            }

            this.name = name;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PacketPropertyVariableLink"/> class.
        /// </summary>
        /// <param name="packetClass">The packet class.</param>
        /// <param name="packetClassMemberPath">The packet class member path.</param>
        public PacketPropertyVariableLink(PacketPropertyValueFilterForm.PacketClass packetClass,
                                          PacketPropertyValueFilterForm.ClassMemberPath packetClassMemberPath)
        {
            // Param checks
            if (null == packetClass)
            {
                throw new ArgumentNullException("packetClass");
            }
            if (null == packetClassMemberPath)
            {
                throw new ArgumentNullException("packetClassMemberPath");
            }

            // Fields initialization
            this.packetClass           = packetClass;
            this.packetClassMemberPath = packetClassMemberPath;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:PacketPropertyVariableLink"/> class.
        /// </summary>
        /// <param name="packetClass">The packet class.</param>
        /// <param name="packetClassMemberPath">The packet class member path.</param>
        public PacketPropertyVariableLink(PacketPropertyValueFilterForm.PacketClass packetClass,
            PacketPropertyValueFilterForm.ClassMemberPath packetClassMemberPath)
        {
            // Param checks
            if (null == packetClass)
            {
                throw new ArgumentNullException("packetClass");
            }
            if (null == packetClassMemberPath)
            {
                throw new ArgumentNullException("packetClassMemberPath");
            }

            // Fields initialization
            this.packetClass = packetClass;
            this.packetClassMemberPath = packetClassMemberPath;
        }
Exemplo n.º 6
0
            /// <summary>
            /// Deserialization constructor.
            /// </summary>
            /// <param name="info">The info.</param>
            /// <param name="context">The context.</param>
            protected FilterListEntry(SerializationInfo info, StreamingContext context)
            {
                try
                {
                    // Support for filters saved before variables were added
                    string val = info.GetString("valueToFind");
                    long   valLong;
                    if (Util.ParseLong(val, out valLong))
                    {
                        searchValue = valLong;
                    }
                    else
                    {
                        searchValue = val;
                    }
                }
                catch
                {
                    // Old field doesn't exist, must be loading new filter
                }

                try
                {
                    this.searchValue = info.GetValue("searchValue", typeof(object));
                }
                catch
                {
                    // New field doesn't exist - must be loading old filter
                }

                // De-serialize data
                this.packetClass   = (PacketClass)info.GetValue("packetClass", typeof(PacketClass));
                this.classProperty = (ClassMemberPath)info.GetValue("classProperty", typeof(ClassMemberPath));
                this.isRecursive   = info.GetBoolean("isRecursive");
                this.relation      = info.GetString("relation");
                this.condition     = info.GetString("condition");
            }
            /// <summary>
            /// Deserialization constructor.
            /// </summary>
            /// <param name="info">The info.</param>
            /// <param name="context">The context.</param>
            protected FilterListEntry(SerializationInfo info, StreamingContext context)
            {
                try
                {
                    // Support for filters saved before variables were added
                    string val = info.GetString("valueToFind");
                    long valLong;
                    if (Util.ParseLong(val, out valLong))
                    {
                        searchValue = valLong;
                    }
                    else
                    {
                        searchValue = val;
                    }
                }
                catch
                {
                    // Old field doesn't exist, must be loading new filter
                }

                try
                {
                    this.searchValue = info.GetValue("searchValue", typeof(object));
                }
                catch
                {
                    // New field doesn't exist - must be loading old filter
                }

                // De-serialize data
                this.packetClass	= (PacketClass)info.GetValue("packetClass", typeof(PacketClass));
                this.classProperty	= (ClassMemberPath)info.GetValue("classProperty", typeof(ClassMemberPath));
                this.isRecursive	= info.GetBoolean("isRecursive");
                this.relation		= info.GetString("relation");
                this.condition		= info.GetString("condition");
            }