當前位置: 首頁>>代碼示例>>C#>>正文


C# XmlElement.GetIntAttributeValue方法代碼示例

本文整理匯總了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;
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:6,代碼來源:ICategory.cs

示例2: IsKeywordStillUsed

 private static bool IsKeywordStillUsed(XmlElement keyword)
 {
     return keyword.GetIntAttributeValue("countkeywordonpag").GetValueOrDefault() > 0 ||
            keyword.GetIntAttributeValue("countkeywordonpge") > 0 ||
            keyword.GetIntAttributeValue("countkeywordonpgeandpag") > 0;
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:6,代碼來源:IKeyword.cs

示例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;
        }
開發者ID:erminas,項目名稱:smartapi,代碼行數:13,代碼來源:ILinkingAndAppearance.cs

示例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();
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:6,代碼來源:IPageSearch.cs

示例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);
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:11,代碼來源:Locales.cs

示例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));
     }
 }
開發者ID:erminas,項目名稱:smartapi,代碼行數:20,代碼來源:IFolder.cs

示例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;
            }
        }
開發者ID:erminas,項目名稱:smartapi,代碼行數:16,代碼來源:IFolder.cs


注:本文中的System.Xml.XmlElement.GetIntAttributeValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。