本文整理汇总了C#中System.Xml.XmlElement.GetIntAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:C# XmlElement.GetIntAttributeValue方法的具体用法?C# XmlElement.GetIntAttributeValue怎么用?C# XmlElement.GetIntAttributeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlElement
的用法示例。
在下文中一共展示了XmlElement.GetIntAttributeValue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsCategoryStillUsed
private static bool IsCategoryStillUsed(XmlElement category)
{
return category.GetIntAttributeValue("countkeywordonpag") > 0 ||
category.GetIntAttributeValue("countkeywordonpge") > 0 ||
category.GetIntAttributeValue("countkeywordonpgeandpag") > 0;
}
示例2: IsKeywordStillUsed
private static bool IsKeywordStillUsed(XmlElement keyword)
{
return keyword.GetIntAttributeValue("countkeywordonpag").GetValueOrDefault() > 0 ||
keyword.GetIntAttributeValue("countkeywordonpge") > 0 ||
keyword.GetIntAttributeValue("countkeywordonpgeandpag") > 0;
}
示例3: LoadXml
private void LoadXml(XmlElement element)
{
Link = (ILinkElement) PageElement.CreateElement(Project, element);
var start = element.GetOADate("startdate");
AppearenceStart = !start.HasValue ? DateTime.MinValue : start.Value;
var end = element.GetOADate("enddate");
AppearenceEnd = !end.HasValue ? DateTime.MaxValue : end.Value;
var dateState = element.GetIntAttributeValue("datestate").GetValueOrDefault();
IsActive = dateState == 1 || dateState == 3;
}
示例4: UserInfo
public UserInfo(IProject project, XmlElement user)
{
User = new User(project.Session, user.GetGuid()) {Name = user.GetName()};
HasUserReleasedPage = user.GetIntAttributeValue("released").GetValueOrDefault() == 1;
PageReleaseDate = user.GetOADate().GetValueOrDefault();
}
示例5: Locale
protected Locale(ISession session, XmlElement xmlElement)
{
_session = session;
LanguageAbbreviation = xmlElement.GetAttributeValue("id");
Country = xmlElement.GetAttributeValue("country");
Language = xmlElement.GetAttributeValue("language");
IsStandardLanguage = xmlElement.GetBoolAttributeValue("standardlanguage").GetValueOrDefault();
LCID = xmlElement.GetIntAttributeValue("lcid").GetValueOrDefault();
RFCLanguageId = xmlElement.GetAttributeValue("rfclanguageid");
DateTimeFormats = new IndexedCachedList<int, IDateTimeFormat>(GetFormats, x => x.TypeId, Caching.Enabled);
}
示例6: CreateFolder
internal static IFolder CreateFolder(IProject project, XmlElement element)
{
var folderType = element.GetIntAttributeValue("foldertype");
if (!folderType.HasValue)
{
throw new SmartAPIException(project.Session.ServerLogin, "Could not load folder information");
}
switch (folderType.Value)
{
case 0:
var isAssetManagerFolder = element.GetBoolAttributeValue("catalog").GetValueOrDefault();
if (!isAssetManagerFolder)
{
return new FileFolder(project, element);
}
return new AssetManagerFolder(project, element);
default:
throw new SmartAPIInternalException(string.Format("Unsupported folder type: {0}", folderType));
}
}
示例7: HasSupportedFolderType
public static bool HasSupportedFolderType(XmlElement element)
{
var folderType = element.GetIntAttributeValue("foldertype");
if (!folderType.HasValue)
{
return false;
}
switch (folderType)
{
case 0:
return true;
default:
return false;
}
}