示例#1
0
        private IceComponentAttribute GetCustomAttribute(IceComponent comp)
        {
            if (comp.GetType().IsDefined(typeof(IceComponentAttribute), true))
            {
                IceComponentAttribute attrib = (IceComponentAttribute)comp.GetType().GetCustomAttributes(typeof(IceComponentAttribute), true)[0];
                return attrib;

            }
            return null;
        }
示例#2
0
 private static void WriteSceneComponent(XmlNode sceneComponent, IceComponent comp, XmlDocument doc)
 {
     foreach (var _property in comp.GetType().GetProperties())
     {
         if (_property.GetCustomAttributes(typeof(IceCream.Attributes.IceComponentPropertyAttribute), true).Length > 0)
         {
             sceneComponent.AppendChildIfNotNull(WriteProperty(_property.Name, comp, doc));
         }
     }
 }