public static ParseReleaseIdentifierType ( string identifierType ) : ReleaseIdentifierType | ||
identifierType | string | |
리턴 | ReleaseIdentifierType |
private ReleaseIdentifier ReadReleaseIdentifier(JObject source) { ReleaseIdentifier releaseIdentifier = new ReleaseIdentifier(); foreach (var item in source) { var v = item.Value; switch (item.Key) { case "type": releaseIdentifier.Type = DataReader.ParseReleaseIdentifierType(v.Value <string>()); break; case "value": releaseIdentifier.Value = v.Value <string>(); break; case "description": releaseIdentifier.Description = v.Value <string>(); break; default: this.ThrowIfStrict("Unknown key: " + item.Key); break; } } return(releaseIdentifier); }
private ReleaseIdentifier ReadReleaseIdentifier() { this.XmlReader.AssertElementStart("identifier"); this.XmlReader.AssertEmptyElement(); ReleaseIdentifier identifier = new ReleaseIdentifier(); identifier.Type = DataReader.ParseReleaseIdentifierType(this.XmlReader.GetAttribute("type")); identifier.Value = this.XmlReader.GetAttribute("value"); identifier.Description = this.XmlReader.GetAttribute("description"); return(identifier); }