当前位置: 首页>>代码示例>>C#>>正文


C# XElement.GetElementValue方法代码示例

本文整理汇总了C#中System.Xml.Linq.XElement.GetElementValue方法的典型用法代码示例。如果您正苦于以下问题:C# XElement.GetElementValue方法的具体用法?C# XElement.GetElementValue怎么用?C# XElement.GetElementValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.Linq.XElement的用法示例。


在下文中一共展示了XElement.GetElementValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExecutionStatusMessageDto

 public ExecutionStatusMessageDto(XElement executionStatusMessageElement)
 {
     ExecutionStatusSeverity = executionStatusMessageElement.GetElementValue("ExecutionStatusSeverity");
     ExecutionStatusSourceOperation = executionStatusMessageElement.GetElementValue("ExecutionStatusSourceOperation");
     ExecutionStatusDescription = executionStatusMessageElement.GetElementValue("ExecutionStatusDescription");
     ExecutionStatusRecommendation = executionStatusMessageElement.GetElementValue("ExecutionStatusText");
 }
开发者ID:borealwinter,项目名称:simpl,代码行数:7,代码来源:ExecutionStatusMessageDto.cs

示例2: LoadFromXml

        public override void LoadFromXml(XElement xElement)
        {
            base.LoadFromXml(xElement);

            MininumVolume = xElement.GetElementValue<decimal>("MinimumVolume");
            UnitOfMeasure = xElement.GetElementValue<string>("UnitOfMeasure");
        }
开发者ID:fernandozamoraj,项目名称:XML-Project-For-Masters-Course,代码行数:7,代码来源:VolumeItem.cs

示例3: DigResults2Dto

 public DigResults2Dto(XElement digResults2Element)
 {
     NFullCount = digResults2Element.GetElementValue("nfullCount");
     LoopbackCount = digResults2Element.GetElementValue("loopbackCount");
     PerResCount = digResults2Element.GetElementValue("perresCount");
     RfcADslDigRes = new RfcADslDigResDto(digResults2Element.GetElement("rfc_a_dsldig_res"));
 }
开发者ID:borealwinter,项目名称:simpl,代码行数:7,代码来源:DigResults2Dto.cs

示例4: LineTestResultsDto

 public LineTestResultsDto(XElement lineTestResultsElement)
 {
     CompleteDate = lineTestResultsElement.GetElementValue("completeDate");
     CompleteTime = lineTestResultsElement.GetElementValue("completeTime");
     LineCircuit = new LineCircuitDto(lineTestResultsElement.GetElement("LineCircuit"));
     Summary = new SummaryDto(lineTestResultsElement.GetElement("Summary"));
 }
开发者ID:borealwinter,项目名称:simpl,代码行数:7,代码来源:LineTestResultsDto.cs

示例5: LoadFromXml

 public void LoadFromXml(XElement xmlElement)
 {
     Street = xmlElement.GetElementValue<string>("Street");
     City = xmlElement.GetElementValue<string>("City");
     State = xmlElement.GetElementValue<string>("State");
     Zip = xmlElement.GetElementValue<string>("Zip");
 }
开发者ID:fernandozamoraj,项目名称:XML-Project-For-Masters-Course,代码行数:7,代码来源:Address.cs

示例6: FlickrAuthInfo

 public FlickrAuthInfo(XElement element)
 {
     Token = element.GetElementValue("token");
     Permission = element.GetElementValue("perms");
     XElement user = element.Element("user");
     UserID = user.GetAttributeValue("nsid");
     Username = user.GetAttributeValue("username");
     Fullname = user.GetAttributeValue("fullname");
 }
开发者ID:yoykiee,项目名称:ShareX,代码行数:9,代码来源:FlickrUploader.cs

示例7: LoadUserData

        internal void LoadUserData(XElement node)
        {
            bool tryParseBool;
            TilesetView.TileIndexDrawMode tryParseTileIndices;

            if (node.GetElementValue("DarkBackground", out tryParseBool)) this.buttonBrightness.Checked = tryParseBool;
            if (node.GetElementValue("DisplayTileIndices", out tryParseTileIndices)) this.tileIndexDrawMode = tryParseTileIndices;

            this.ApplyBrightness();
            this.ApplyTileIndexDrawMode();
        }
开发者ID:SirePi,项目名称:duality,代码行数:11,代码来源:TilemapToolSourcePalette.cs

示例8: FromXml

 internal static File FromXml(XElement file)
 {
     File f = new File();
     f.FormatCode = file.GetAttribute("formatCode");
     f.Url = new Uri(file.GetElementValue(XName.Get("uri", Video.NamespaceMsnVideoCatalog)));
     return f;
 }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:7,代码来源:File.cs

示例9: FromXml

 internal static VideoFile FromXml(XElement videoFile)
 {
     VideoFile v = new VideoFile();
     v.FormatCode = videoFile.GetAttribute("formatCode");
     v.MsnFileId = videoFile.GetAttribute("msnFileId");
     v.Url = new Uri(videoFile.GetElementValue(XName.Get("uri", Video.NamespaceMsnVideoCatalog)));
     return v;
 }
开发者ID:Titaye,项目名称:SLExtensions,代码行数:8,代码来源:VideoFile.cs

示例10: MultiModeDto

 public MultiModeDto(XElement multiModeElement)
 {
     T1413ModeStatus = multiModeElement.GetElementValue("t1413");
     GdmtModeStatus = multiModeElement.GetElementValue("gdmt");
     GliteModeStatus = multiModeElement.GetElementValue("glite");
     Adsl2ModeStatus = multiModeElement.GetElementValue("adsl2");
     Adsl2PlusModeStatus = multiModeElement.GetElementValue("adsl2P");
     Adsl2AnnexMModeStatus = multiModeElement.GetElementValue("adsl2Axm");
     Readsl2ModeStatus = multiModeElement.GetElementValue("readsl2");
     Vdsl2ModeStatus = multiModeElement.GetElementValue("vdsl2");
 }
开发者ID:borealwinter,项目名称:simpl,代码行数:11,代码来源:MultiModeDto.cs

示例11: LoadFromXml

        public void LoadFromXml(XElement xElement)
        {
            Id = xElement.GetAttributeValue<string>("Id");
            //throw new NotImplementedException();
            Name = xElement.GetElementValue<string>("Name");
            PointOfContact = xElement.GetElementValue<string>("PointOfContact");
            PhoneNumber = xElement.GetElementValue<string>("PhoneNumber");
            Comments = xElement.GetElementValue<string>("Comments");

            foreach (XElement addressesElement in xElement.Elements("Addresses"))
            {
                foreach (XElement addressElement in addressesElement.Elements("Address"))
                {
                    Address address = new Address();

                    address.LoadFromXml(addressElement);

                    Addresses.Add(address);
                }
            }
        }
开发者ID:fernandozamoraj,项目名称:XML-Project-For-Masters-Course,代码行数:21,代码来源:Vendor.cs

示例12: LoadUserData

        internal void LoadUserData(XElement node)
        {
            bool tryParseBool;

            if (node.GetElementValue("ShowMessages", out tryParseBool)) this.buttonMessages.Checked = tryParseBool;
            if (node.GetElementValue("ShowWarnings", out tryParseBool)) this.buttonWarnings.Checked = tryParseBool;
            if (node.GetElementValue("ShowErrors", out tryParseBool))   this.buttonErrors.Checked = tryParseBool;
            if (node.GetElementValue("ShowCore", out tryParseBool))     this.buttonCore.Checked = tryParseBool;
            if (node.GetElementValue("ShowEditor", out tryParseBool))   this.buttonEditor.Checked = tryParseBool;
            if (node.GetElementValue("ShowGame", out tryParseBool))     this.buttonGame.Checked = tryParseBool;
            if (node.GetElementValue("AutoClear", out tryParseBool))    this.checkAutoClear.Checked = tryParseBool;
            if (node.GetElementValue("PauseOnError", out tryParseBool)) this.buttonPauseOnError.Checked = tryParseBool;

            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.SourceCore, this.buttonCore.Checked);
            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.SourceEditor, this.buttonEditor.Checked);
            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.SourceGame, this.buttonGame.Checked);
            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.TypeMessage, this.buttonMessages.Checked);
            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.TypeWarning, this.buttonWarnings.Checked);
            this.logEntryList.SetFilterFlag(LogEntryList.MessageFilter.TypeError, this.buttonErrors.Checked);
        }
开发者ID:ChrisLakeZA,项目名称:duality,代码行数:20,代码来源:LogView.cs

示例13: Parse

        public static YouTubeChannelVideo Parse(XElement xItem)
        {
            // Get namespaces
            XNamespace atom = xItem.GetNamespaceOfPrefix("atom");
            XNamespace media = xItem.GetNamespaceOfPrefix("media");
            XNamespace yt = xItem.GetNamespaceOfPrefix("yt");

            // Some pre-parsing
            XElement xMedia = xItem.Element(media + "group");
            XElement xDuration = xMedia.Element(yt + "duration");

            // Initialize and return the object
            return new YouTubeChannelVideo {
                Id = Regex.Match(xItem.GetElementValue("link"), "v=([v-]{11})").Groups[1].Value,
                Published = xItem.GetElementValue<DateTime>("pubDate"),
                LastUpdated = xItem.GetElementValue<DateTime>(atom + "updated"),
                Title = xItem.GetElementValue("title"),
                Description = xMedia.GetElementValue(media + "description"),
                Link = xItem.GetElementValue("link"),
                Author = xItem.GetElementValue("author"),
                Duration = xDuration.GetAttributeValue<int>("seconds")
            };
        }
开发者ID:Jeavon,项目名称:UmbracoExtensionMethods,代码行数:23,代码来源:YouTubeChannelVideo.cs

示例14: LoadFromXml

 public virtual void LoadFromXml(XElement xElement)
 {
     Id = xElement.GetAttributeValue<string>("Id");
     _vendorId = xElement.GetAttributeValue<string>("VendorId");
     VendorAssignedProductId = xElement.GetAttributeValue<string>("VendorAssignedProductId");
     Comments = xElement.GetElementValue<string>("Comments");
     Description = xElement.GetElementValue<string>("Description");
     UnitCost = xElement.GetElementValue<decimal>("UnitCost");
 }
开发者ID:fernandozamoraj,项目名称:XML-Project-For-Masters-Course,代码行数:9,代码来源:CatalogItem.cs

示例15: LoadUserData

		internal void LoadUserData(XElement node)
		{
			bool tryParseBool;

			if (node.GetElementValue("AutoRefresh", out tryParseBool)) this.buttonAutoRefresh.Checked = tryParseBool;
			if (node.GetElementValue("Locked", out tryParseBool)) this.buttonLock.Checked = tryParseBool;
			if (node.GetElementValue("DebugMode", out tryParseBool)) this.buttonDebug.Checked = tryParseBool;
			this.Text = node.GetElementValue("TitleText", this.Text);
		}
开发者ID:ChrisLakeZA,项目名称:duality,代码行数:9,代码来源:ObjectInspector.cs


注:本文中的System.Xml.Linq.XElement.GetElementValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。