Forge/Editor/DataWindow.cs
/// <summary>
/// Sets the editing state for the given data type in the given entity to the given value.
/// </summary>
Sets the editing state for the given data type in the given entity to the given value.
Sets the editing state for the given data type in the given entity to the given value .
private void SetEditState(IQueryableEntity entity, Type dataType, DataEditState value) {
            int entityId = ((IEntity)entity).UniqueId;
            HashSet<int> hashSet;
            if (_previous.TryGetValue(entityId, out hashSet) == false) {
                hashSet = new HashSet<int>();
                _previous[entityId] = hashSet;
            }
            int dataId = new DataAccessor(dataType).Id;
            switch (value) {
                case DataEditState.Current:
                    hashSet.Remove(dataId);
                    break;
                case DataEditState.Previous:
                    hashSet.Add(dataId);
                    break;
            }
        }
private void SetEditState ( IQueryableEntity entity , Type dataType , DataEditState value ) { int entityId = ( ( IEntity ) entity ) . UniqueId ; HashSet < int > hashSet ; if ( _previous . TryGetValue ( entityId , out hashSet ) == false ) { hashSet = new HashSet < int > ( ) ; _previous [ entityId ] = hashSet ; } int dataId = new DataAccessor ( dataType ) . Id ; switch ( value ) { case DataEditState . Current : hashSet . Remove ( dataId ) ; break ; case DataEditState . Previous : hashSet . Add ( dataId ) ; break ; } }
Sets the editing state for the given data type in the given entity to the given value.
Sets the editing state for the given data type in the given entity to the given value .
entity
IQueryableEntity
dataType
Type
value
DataEditState