Forge/Editor/DataWindow.cs
/// <summary>
/// Returns the data instance that should be edited based on the given edit state and data
/// type.
/// </summary>
Returns the data instance that should be edited based on the given edit state and data
type.
Returns the data instance that should be edited based on the given edit state and data type .
private static Data.IData GetEditedData(IQueryableEntity entity,
            DataEditState editState, Type dataType) {
            var accessor = new DataAccessor(dataType);
            switch (editState) {
                case DataEditState.Current:
                    return entity.Current(accessor);
                case DataEditState.Previous:
                    return entity.Previous(accessor);
            }
            throw new InvalidOperationException("Unknown edit state");
        }
private static Data . IData GetEditedData ( IQueryableEntity entity , DataEditState editState , Type dataType ) { var accessor = new DataAccessor ( dataType ) ; switch ( editState ) { case DataEditState . Current : return entity . Current ( accessor ) ; case DataEditState . Previous : return entity . Previous ( accessor ) ; } throw new InvalidOperationException ( " " ) ; }
Returns the data instance that should be edited based on the given edit state and data
type.
Returns the data instance that should be edited based on the given edit state and data type .
entity
IQueryableEntity
editState
DataEditState
dataType
Type