FieldUtilities Methods |
The FieldUtilities type exposes the following members.
Name | Description | |
---|---|---|
CalculateHashCodeForValue(Object) |
Calculates the hashcode for value passed in. If the value is null, the hashcode of DBNull.Value is used. If the value is an array,
the hashcode is calculated from the individual values: if the length is larger than 65535, or not a byte array, each value's hashcode is xorred with the
previous one. If the value is a byte array and the length is equal or smaller than 65535, all values are added, multiplied with the index.
| |
CalculateHashCodeForValue(Object, Boolean) |
Calculates the hashcode for value passed in. If the value is null, the hashcode of DBNull.Value is used. If the value is an array,
the hashcode is calculated from the individual values: if the length is larger than 65535, or not a byte array, each value's hashcode is xorred with the
previous one up to 65535 values. If the value is a byte array and the length is equal or smaller than 65535, all values are added, multiplied with the index.
If the value is a string, the invariantculture hashcode is retrieved if the length is smaller than 65535. If the length is 65535 or higher, the
string's hashcode is retrieved using the normal GetHashCode method.
| |
CheckArraysAreEqual |
Performs a per-value compare on the arrays passed in and returns true if the arrays are of the same length and contain the same values.
| |
CheckPrecision |
Checks the precision of the value passed in as string. Assumes value is numeric.
| |
CheckPrecisionAndScale |
Checks the precision and scale of the value passed in as string. Assumes value is numeric.
| |
ConvertValueToEnum |
Converts the value in sourceValue to an instance of the specified enum type. Assumes sourceValue isn't null / DBNull.Value and enumType is an enumType.
If sourceValue is a string, Enum.Parse() will be used, otherwise Enum.ToObject()
| |
CreateArtificialObjectAlias |
Creates the artificial object alias for a field which is in the entity with the name specified.
THe alias is used to make it possible to join a supertype multiple times if fields from different subtypes are in the resultset.
The alias has the format LPAA_actualContainingObjectName. Example: LPAA_CustomerEntity
| |
CreateDefaultValueForType |
Creates the default value for the type specified
| |
CreateFullTypeName |
Creates a full type name, of the format: Type.Fullname, assembly name.
If the assembly is signed, the full assembly name is added, otherwise just the assembly name, not the version, public key token or culture.
| |
CreateRawDataProjectors |
Creates the plain data projectors for hierarchical fetches
| |
DetermineIfFieldShouldBeSet |
Determines if the field should be set to the value passed in.
| |
DetermineNumberOfPkFields |
Determines the number of pk fields for the set of PK fields passed in. Normally this is the # of entries in the PK field collection, however in the case of
a subtype of a targetperentity, all PK fields of the supertypes are also present in this collection and therefore this routine has to determine how
many of these fields are really there.
| |
DetermineRealFullTypeName(Type) |
Determines the name of the real full type of the type passed in, which can be a generic type. If so, the generic type parameter will be used.
| |
DetermineRealFullTypeName(Type, Boolean) |
Determines the name of the real full type of the type passed in, which can be a generic type. If so, the generic type parameter will be used.
| |
DetermineRealType |
Determines the real type of the passed in type. It will unwrap nullable types if unWrapNullableType is true.
| |
DetermineValueToSet |
Determines the value to set for the field specified.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEntityFieldPropertyDescriptors |
Gets the entity field property descriptors for the dummy instance passed in.
| |
GetEntityFieldStates |
Gets the entity field states of the fields in the IList passed in.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetNamesOfChangedFields |
Gets the names of the changed fields. Assumes field sets A and B have the same fields and are equal in size
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PrecalculateEntityMaterializationData |
Precalculates the entity materialization data, which is passed to ReadRowIntoFields.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
ValuesAreEqual |
Compares the two values passed in and checks if they're value-wise the same. This extends 'Equals' in the sense that if the values are
arrays it considers them the same if the values of the arrays are the same as well and the length is the same.
|