Пример #1
0
        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);
        }
Пример #2
0
        public CommentsMember GetTypeCommontsMember(CommentsDoc doc, Type type)
        {
            var member = doc.Members.Members.FirstOrDefault(item => Equals(item.Name, $"T:{type.FullName}"));

            return(member);
        }
Пример #3
0
        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);
        }