///<summary> ///Returns a <see cref="T:System.String"/> that represents the current <see cref="UsbEndpointDescriptor"/>. ///</summary> /// ///<param name="prefixSeperator">The field prefix string.</param> ///<param name="entitySperator">The field/value seperator string.</param> ///<param name="suffixSeperator">The value suffix string.</param> ///<returns>A formatted representation of the <see cref="UsbEndpointDescriptor"/>.</returns> public string ToString(string prefixSeperator, string entitySperator, string suffixSeperator) { Object[] values = { Length, DescriptorType, "0x" + EndpointID.ToString("X2"), "0x" + Attributes.ToString("X2"), MaxPacketSize, Interval, Refresh, "0x" + SynchAddress.ToString("X2") }; string[] names = { "Length", "DescriptorType", "EndpointID", "Attributes", "MaxPacketSize", "Interval", "Refresh", "SynchAddress" }; return(Helper.ToString(prefixSeperator, names, entitySperator, values, suffixSeperator)); }
public XElement Serialize(string name = null) { return(new XElement(UblNames.Cac + (name ?? nameof(Party)), WebsiteURI?.Serialize(nameof(WebsiteURI)), EndpointID?.Serialize(nameof(EndpointID)), IndustryClassificationCode.Serialize(nameof(IndustryClassificationCode)), PartyIdentification?.Serialize(), PartyName?.Serialize(), PostalAddress?.Serialize(nameof(PostalAddress)), Contact?.Serialize(), Person?.Serialize(), AgentParty?.Serialize(nameof(AgentParty)), ServiceProviderParty?.Serialize(), PowerOfAttorneys?.Select(poa => poa?.Serialize()) )); }