public BlogConfig(XmlElement configEl)
		{
			_homepageUrl = XmlUtil.ReadString(configEl, "homepageUrl", null);
			if (_homepageUrl == null)
				throw new ConfigurationException(GetType().FullName + " property class requires a 'homepageUrl' subelement");

			string path = XmlUtil.ReadPath(configEl, "path", null);
			if (path == null)
				throw new ConfigurationException(GetType().FullName + " property class requires a 'path' subelement");
			
			_blog = new XmlBlog(path);
			_blogId = XmlUtil.ReadString(configEl, "id", Path.GetFileNameWithoutExtension(path));
			_blogName = XmlUtil.ReadString(configEl, "displayName", _blogId);
			
			_username = XmlUtil.ReadString(configEl, "username", string.Empty);
			_password = XmlUtil.ReadString(configEl, "password", string.Empty);
			
			_uploadPath = XmlUtil.ReadString(configEl, "uploadPath", null);
			_uploadDir = XmlUtil.ReadPath(configEl, "uploadDir", null);
			if (_uploadPath != null ^ _uploadDir != null)
			{
				throw new ConfigurationException(GetType().FullName +
				                                 " property class requires uploadPath and uploadDir to both be present to support newMediaObject");
			}
		}
Beispiel #2
0
			public LockReleaser(Blog blog, bool write)
			{
				_blog = blog;
				_write = write;
			}