Show / Hide Table of Contents

Class DataItem

Class DataItem.

Inheritance
System.Object
DataItem
Implements
IDataItem
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: spyderSoft.DataLayer.Core
Assembly: spyderSoft.DataLayer.Core.dll
Syntax
[DataContract]
public abstract class DataItem : IDataItem

Properties

| Improve this Doc View Source

Id

Gets or sets the identifier.

Declaration
[DataMember]
public abstract long Id { get; set; }
Property Value
Type Description
System.Int64

The identifier.

Methods

| Improve this Doc View Source

GetPropertyName<T>(Expression<Func<T>>)

Gets the name of the property.

Declaration
protected static string GetPropertyName<T>(Expression<Func<T>> propertyExpression)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<T>> propertyExpression

The property expression.

Returns
Type Description
System.String

System.String.

Type Parameters
Name Description
T
Exceptions
Type Condition
System.ArgumentNullException

propertyExpression

System.ArgumentException

Invalid argument;propertyExpression or Argument is not a property;propertyExpression

| Improve this Doc View Source

RaiseValueChanged(String)

Raises the ValueChanged event using the propertyName given.

Declaration
protected virtual void RaiseValueChanged(string propertyName)
Parameters
Type Name Description
System.String propertyName

Name of the property.

| Improve this Doc View Source

RaiseValueChanged<TPropertyReturnType>(Expression<Func<TPropertyReturnType>>)

Raises the ValueChanged event using the name from the given property expression.

Declaration
protected virtual void RaiseValueChanged<TPropertyReturnType>(Expression<Func<TPropertyReturnType>> propertyExpression)
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TPropertyReturnType>> propertyExpression

An expression representing the property whose value has changed.

Type Parameters
Name Description
TPropertyReturnType

When using this method the PropertyReturnType specified must be the same as the type of the property that is changing

| Improve this Doc View Source

SetPropertyField<T>(String, ref T, T)

Set the value of field to newValue if they are not equal, and then raise the ValueChanged event using propertyName

Declaration
protected void SetPropertyField<T>(string propertyName, ref T field, T newValue)
Parameters
Type Name Description
System.String propertyName

The name of the property being changed.

T field

The current field value

T newValue

The desired field value

Type Parameters
Name Description
T

The type for propertyName

Events

| Improve this Doc View Source

ValueChanged

An event which is raised when the value of a property is updated

Declaration
public event EventHandler<DataItemEventArgs> ValueChanged
Event Type
Type Description
System.EventHandler<DataItemEventArgs>

Implements

IDataItem
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX