public CommentsDoc Get() { var file = $"{AppDomain.CurrentDomain.BaseDirectory}App_Data\\PokemonIII.Domain.xml"; XmlSerializer deserializer = new XmlSerializer(typeof(CommentsDoc)); TextReader reader = new StreamReader(file); object obj = deserializer.Deserialize(reader); CommentsDoc commentsDoc = (CommentsDoc)obj; reader.Close(); return(commentsDoc); }
public CommentsMember GetTypeCommontsMember(CommentsDoc doc, Type type) { var member = doc.Members.Members.FirstOrDefault(item => Equals(item.Name, $"T:{type.FullName}")); return(member); }
public CommentsMember GetPropertyCommontsMember(CommentsDoc doc, Type type, PropertyInfo propertyInfo) { var member = doc.Members.Members.FirstOrDefault(item => Equals(item.Name, $"P:{type.FullName}.{propertyInfo.Name}")); return(member); }