本文整理汇总了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");
}
示例2: LoadFromXml
public override void LoadFromXml(XElement xElement)
{
base.LoadFromXml(xElement);
MininumVolume = xElement.GetElementValue<decimal>("MinimumVolume");
UnitOfMeasure = xElement.GetElementValue<string>("UnitOfMeasure");
}
示例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"));
}
示例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"));
}
示例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");
}
示例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");
}
示例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();
}
示例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;
}
示例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;
}
示例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");
}
示例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);
}
}
}
示例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);
}
示例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")
};
}
示例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");
}
示例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);
}