示例#1
0
文件: Backer.cs 项目: bazer/Modl
 public void SetValue <T>(string name, T value)
 {
     if (SimpleValueBacker.HasValue(name))
     {
         SimpleValueBacker.GetValue(name).Set(value);
     }
     else
     {
         throw new NotImplementedException();
     }
 }
示例#2
0
文件: Backer.cs 项目: bazer/Modl
 public void AddValue(Property property)
 {
     if (property.IsLink)
     {
         RelationValueBacker.AddValue(property.PropertyName, new RelationValue());
     }
     else
     {
         SimpleValueBacker.AddValue(property.PropertyName, new SimpleValue(GetDefault(property.PropertyType)));
     }
 }
示例#3
0
文件: Backer.cs 项目: bazer/Modl
 public T GetValue <T>(string name)
 {
     if (SimpleValueBacker.HasValue(name))
     {
         return((T)SimpleValueBacker.GetValue(name).Get());
     }
     else
     {
         throw new NotImplementedException();
     }
 }
示例#4
0
文件: Backer.cs 项目: bazer/Modl
 internal void ResetValuesToUnmodified()
 {
     SimpleValueBacker.ResetValuesToUnmodified();
     RelationValueBacker.ResetValuesToUnmodified();
 }