public SendProp Clone(IEntity forEnt) { CheckDisposed(); SendProp cloned = new SendProp(forEnt, Definition); cloned.m_Value = Value; cloned.m_LastChangedTick = LastChangedTick; return(cloned); }
private void Prop_ValueChanged(SendProp prop) { Debug.Assert(ReferenceEquals(prop.Entity, Entity)); Debug.Assert((!Entity.InPVS && Property == null) || prop == Property); var newValue = Decoder(prop.Value); //Debug.Assert(Value?.Equals(newValue) != true); Value = newValue; m_ValueChanged = true; }
private void Entity_PropertyAdded(SendProp prop) { if (prop.Definition.FullName == PropertyName) { Property = prop; if (prop.ValueChanged.Add(Prop_ValueChanged)) { // First add only if (prop.Value != null) { Prop_ValueChanged(prop); } } } }