internal static void Deserialize(DocumentPropertyBase prop, Dictionary<string, object> fieldDict)
        {
            if (!fieldDict.Any())
                return;

            MappingBase.Deserialize(prop, fieldDict);
            prop.IncludeInAll = fieldDict.GetBool(_INCLUDE_IN_ALL, _INCLUDE_IN_ALL_DEFAULT);
            prop.IndexName = fieldDict.GetStringOrDefault(_INDEX_NAME);
            prop.PropertyType = PropertyTypeEnum.Find(fieldDict.GetString(_TYPE, _PROPERTY_TYPE_DEFAULT.ToString()));
        }
        internal static void Serialize(DocumentPropertyBase prop, Dictionary<string, object> fieldDict)
        {
            if (prop == null)
                return;

            if (fieldDict == null)
                fieldDict = new Dictionary<string, object>();

            fieldDict.AddObject(_TYPE, prop.PropertyType.ToString(), _PROPERTY_TYPE_DEFAULT.ToString());
            MappingBase.Serialize(prop, fieldDict);
            fieldDict.AddObject(_INCLUDE_IN_ALL, prop.IncludeInAll, _INCLUDE_IN_ALL_DEFAULT);
            fieldDict.AddObject(_INDEX_NAME, prop.IndexName, prop.Name);
        }
Example #3
0
 public SearchPiece(DocumentPropertyBase mappingProperty, SearchType searchType, object value)
 {
     MappingProperty = mappingProperty;
     SearchType = searchType;
     Value = value;
 }
Example #4
0
 public SearchPiece(DocumentPropertyBase property, object searchValue, ExpressionType expressionOperator)
 {
     Property = property;
     SearchValue = searchValue;
     Operator = expressionOperator;
 }