예제 #1
0
파일: Helper.cs 프로젝트: zhouwb168/CodeHub
        public static Entity GetEntity(bool success, string message)
        {
            SimpleProperty property1 = new SimpleProperty("Success", typeof(bool));
            SimpleProperty property2 = new SimpleProperty("Message", typeof(string));
            Entity         entity    = new Entity(new PropertyCollection()
            {
                property1, property2
            });

            entity.SetValue(property1, success);
            entity.SetValue(property2, message);

            return(entity);
        }
예제 #2
0
 public SimplePropertyDescriptor(SimpleProperty simpleProperty, params string[] parents)
     : base(simpleProperty.Name, null)
 {
     this._Parents        = parents;
     this._SimpleProperty = simpleProperty;
 }
예제 #3
0
파일: Entity.cs 프로젝트: zhouwb168/CodeHub
 public void SetValue(SimpleProperty simpleProperty, object value, params string[] parents)
 {
     this.GetEntity(parents).SetValue(simpleProperty.Name, value);
 }
예제 #4
0
파일: Entity.cs 프로젝트: zhouwb168/CodeHub
 public object GetValue(SimpleProperty simpleProperty, params string[] parents)
 {
     return(this.GetEntity(parents).GetValue(simpleProperty.Name));
 }