Class SearchHelper
Static class with a collection of helper methods used in search
Inherited Members
Namespace: SuperOffice.ErpSync
Assembly: SuperOffice.Plugins.dll
Syntax
public static class SearchHelper
Methods
IsMatch(object, FieldMetadataTypeInfo, SearchRestrictionInfo)
Tries to determine if an object matches a search restriction, using a given field type. Note: List searches must be handled by the connector itself.
Declaration
public static bool IsMatch(object testValue, FieldMetadataTypeInfo testValueType, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
object | testValue | |
FieldMetadataTypeInfo | testValueType | |
SearchRestrictionInfo | restriction |
Returns
Type | Description |
---|---|
bool |
IsMatch(object, SearchRestrictionInfo)
Tries to determine if a typed object (string, int, double, DateTime, bool) matches a search restriction. Note: List searches must be handled by the connector itself.
Declaration
public static bool IsMatch(object testValue, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
object | testValue | |
SearchRestrictionInfo | restriction |
Returns
Type | Description |
---|---|
bool |
IsMatchBool(bool, SearchRestrictionInfo)
Tries if the searchValue matches the restriction
Declaration
public static bool IsMatchBool(bool searchValue, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
bool | searchValue | The bool value to test |
SearchRestrictionInfo | restriction | The restriction to apply |
Returns
Type | Description |
---|---|
bool |
IsMatchDateTime(DateTime, SearchRestrictionInfo, MatchType)
Tries if the searchValue matches the restriction
Declaration
public static bool IsMatchDateTime(DateTime searchValue, SearchRestrictionInfo restriction, DateTimeOperators.MatchType matchType = MatchType.DateAndTime_IgnoreSeconds)
Parameters
Type | Name | Description |
---|---|---|
DateTime | searchValue | The DateTime value to test |
SearchRestrictionInfo | restriction | The restriction to apply |
DateTimeOperators.MatchType | matchType | Default = DateAndTime_IgnoreSeconds |
Returns
Type | Description |
---|---|
bool |
IsMatchDouble(double, SearchRestrictionInfo)
Tries if the searchValue matches the restriction
Declaration
public static bool IsMatchDouble(double searchValue, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
double | searchValue | The double value to test |
SearchRestrictionInfo | restriction | The restriction to apply |
Returns
Type | Description |
---|---|
bool |
IsMatchInt(int, SearchRestrictionInfo)
Tries if the searchValue matches the restriction
Declaration
public static bool IsMatchInt(int searchValue, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
int | searchValue | The int value to test |
SearchRestrictionInfo | restriction | The restriction to apply |
Returns
Type | Description |
---|---|
bool |
IsMatchString(string, SearchRestrictionInfo)
Tries if the searchValue matches the restriction
Declaration
public static bool IsMatchString(string searchValue, SearchRestrictionInfo restriction)
Parameters
Type | Name | Description |
---|---|---|
string | searchValue | The string value to test |
SearchRestrictionInfo | restriction | The restriction to apply |
Returns
Type | Description |
---|---|
bool |