Beispiel #1
0
 private static void AddProperty(PropertyMataInfo info)
 {
     if (propertys_.ContainsKey(info.PropertyDefinition))
     {
         throw new ArgumentException(info.PropertyDefinition.FullName + " is already has");
     }
     propertys_.Add(info.PropertyDefinition, info);
 }
Beispiel #2
0
 private void Property()
 {
     if (model_.Propertys != null)
     {
         foreach (var propertyModel in model_.Propertys)
         {
             PropertyDefinition propertyDefinition = TypeDefinition.Properties.FirstOrDefault(i => i.Name == propertyModel.name);
             if (propertyDefinition == null)
             {
                 throw new ArgumentException(propertyModel.name + " is not found at " + TypeDefinition.FullName);
             }
             PropertyMataInfo info = new PropertyMataInfo(propertyDefinition, propertyModel);
             XmlMetaMaker.AddProperty(info);
         }
     }
 }