public override void Write(T currentProperty, PersisterContext <T> context) { string value = currentProperty.StringValue; EditorParamsDefine paraDefine = null; if (currentProperty.Definition.EditorParams.IsNotEmpty()) { base.Register(); paraDefine = JSONSerializerExecute.Deserialize <EditorParamsDefine>(currentProperty.Definition.EditorParams); } if (value.IsNotEmpty()) { if (string.Compare(currentProperty.StringValue, currentProperty.Definition.DefaultValue, true) != 0) { if (paraDefine.ContainsKey("TagPropertyName") == true) { currentProperty.StringValue = PwdCalculate("", string.Format("{0},{1}", context.Properties[paraDefine["TagPropertyName"]].StringValue, value)); } else { currentProperty.StringValue = PwdCalculate("", value); } } } }
public override void Write(T currentProperty, PersisterContext <T> context) { string value = currentProperty.StringValue; if (value.IsNotEmpty()) { var img = JSONSerializerExecute.Deserialize <ImageProperty>(value); if (img != null) { ImagePropertyAdapter.Instance.UpdateContent(img); currentProperty.StringValue = JSONSerializerExecute.Serialize(img); } } }
public void Read() { Dictionary <string, IPropertyPersister <PropertyValue> > dicPers = PropertiesPersisterHelper <PropertyValue> .GetAllPropertiesPersisters(); if (dicPers.Count == 0) { return; } using (PersisterContext <PropertyValue> context = PersisterContext <PropertyValue> .CreatePersisterContext(this, null)) { foreach (PropertyValue item in this) { if (item.Definition.PersisterKey.IsNotEmpty()) { if (dicPers.ContainsKey(item.Definition.PersisterKey)) { dicPers[item.Definition.PersisterKey].Read(item, context); } } } } }
public override void Read(T currentProperty, PersisterContext <T> context) { }
public abstract void Write(TItem currentProperty, PersisterContext <TItem> context);